Bug 1221352 - rlRun "" => PASS although I believe it should fail to warn user about potential error
Summary: rlRun "" => PASS although I believe it should fail to warn user about potenti...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: 23
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Dalibor Pospíšil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 545868
TreeView+ depends on / blocked
 
Reported: 2015-05-13 19:59 UTC by Jan Hutař
Modified: 2015-12-08 08:45 UTC (History)
6 users (show)

Fixed In Version: beakerlib-1.11-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 08:45:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1206272 0 low ASSIGNED [RFE] Add syntax check inside rlRun 2021-02-22 00:41:40 UTC

Internal Links: 1206272

Description Jan Hutař 2015-05-13 19:59:42 UTC
Description of problem:
`rlRun ""` => PASS although I believe it should fail to warn user about potential error. This can happen when you feed rlRun with some variable which is mistakenly left blank. It might make debugging bit harder.


Version-Release number of selected component (if applicable):
beakerlib-1.10-2.el5


How reproducible:
always


Steps to Reproduce:
# . /usr/bin/rhts-environment.sh
# . /usr/lib/beakerlib/beakerlib.sh
# rlJournalStart
# rlPhaseStartTest "Test rlRun"
[...]
# rlRun ""
:: [  BEGIN   ] :: Running ''
:: [   PASS   ] :: Command '' (Expected 0, got 0)


Actual results:
PASS


Expected results:
FAIL


Additional info:
This happened to me when I did `rlRun "$( ... )"` and '...' did not produced expected output.

Also I do not see valid use-case for intentionally running `rlRun ""` besides some testing so maybe this can be doable.

Comment 1 Dalibor Pospíšil 2015-05-14 08:39:52 UTC
Personally I do not see this very useful. Moreover other people may want to make it pass if the command is empty.

-1

Let see what others thinks of it.

Comment 2 Martin Kyral 2015-05-14 08:44:59 UTC
I'm not sure about the merit itself. However, if we decide to catch the empty input for rlRun, I'd suggest to make the check optional for the sake of keeping backwards compatibility.

Comment 3 Ales Zelinka 2015-05-14 10:29:28 UTC
I see ""=>PASS as a special case of "wrong  input" => "actual result". This falls into the same category (not a duplicate though) as 

BZ#1206272 - [RFE] Add syntax check inside rlRun


Both deal with the weird design feature that invalid input generates valid and misleading results instead of producing an error.

+1 by me.

Comment 4 Dalibor Pospíšil 2015-05-14 12:10:02 UTC
(In reply to Ales Zelinka from comment #3)
> Both deal with the weird design feature that invalid input generates valid
> and misleading results instead of producing an error.
We need to agree on what is valid and what is invalid. From bash point of view the empty code is valid.

Comment 5 Jakub Prokes 2015-05-14 13:40:41 UTC
I'm still not sure if we can/should change behavior, rlRun is implemented by by eval and there is possibility there are users using is like eval.

Generally it could be same solution like BZ#1206272 but I'm afraid to change current behavior.

Comment 6 Ales Zelinka 2015-05-14 14:08:09 UTC
(In reply to Dalibor Pospíšil from comment #4)
> We need to agree on what is valid and what is invalid. 

Agreed. Lets ask the actual users/customers. /me writes to beaker-user-list.

Comment 7 Petr Muller 2015-05-15 10:52:15 UTC
(In reply to Jakub Prokes from comment #5)
> I'm still not sure if we can/should change behavior, rlRun is implemented by
> by eval and there is possibility there are users using is like eval.

If people are relying on implementation rather than the contract (documentation), they are doint it wrong.

I'm generally in favor of sanity checking input. I've seen too many "working" (=PASSing) tests which were broken and really not testing anything.

Comment 8 Jan Kurik 2015-07-15 14:09:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 10 Fedora Update System 2015-11-03 12:42:23 UTC
beakerlib-1.11-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-f36ff57e84

Comment 11 Fedora Update System 2015-11-03 18:21:23 UTC
beakerlib-1.11-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update beakerlib'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-4c96e73472

Comment 12 Fedora Update System 2015-11-03 18:56:47 UTC
beakerlib-1.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update beakerlib'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-ba802d1bd6

Comment 13 Fedora Update System 2015-11-03 19:52:51 UTC
beakerlib-1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update beakerlib'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-7ab9feeb42

Comment 14 Fedora Update System 2015-11-03 21:50:40 UTC
beakerlib-1.11-1.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update beakerlib'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-0e03df1475

Comment 15 Fedora Update System 2015-11-05 17:19:45 UTC
beakerlib-1.11-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update beakerlib'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8f65d5290a

Comment 16 Fedora Update System 2015-11-05 20:18:41 UTC
beakerlib-1.11-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update beakerlib'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-f36ff57e84

Comment 17 Fedora Update System 2015-11-17 15:52:25 UTC
beakerlib-1.11-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2015-11-17 18:24:16 UTC
beakerlib-1.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-11-19 16:50:33 UTC
beakerlib-1.11-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-11-20 23:25:18 UTC
beakerlib-1.11-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2015-11-21 14:26:33 UTC
beakerlib-1.11-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2015-11-21 20:30:26 UTC
beakerlib-1.11-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.