Bug 828772

Summary: Test case failure: /CoreOS/setup/Regression/bz461515-tcsh-source-profile
Product: Red Hat Enterprise Linux 6 Reporter: Karel Volný <kvolny>
Component: tcshAssignee: Roman Kollár <rkollar>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: medium    
Version: 6.3CC: ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-28 11:55:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Volný 2012-06-05 10:46:40 UTC
Filed from caserun https://tcms.engineering.redhat.com/run/40402/#caserun_1177496

see also https://beaker.engineering.redhat.com/jobs/243528

this seems to happen only on i386


Version-Release number of selected component (if applicable):
RHEL6.3-20120531.0

Steps to Reproduce: 
run the test /CoreOS/setup/Regression/bz461515-tcsh-source-profile


Actual results: 
:: [   PASS   ] :: File /tmp/tmp.DVUPkSafvd should exist
bz461515: Undefined variable.
:: [   FAIL   ] :: Running testscript (Expected 0, got 1)
cat: /tmp/tmp.DVUPkSafvd/bz461515: No such file or directory
:: [06:22:42] ::  Testing whether the output file contains the pattern defined in profile file ...
:: [   FAIL   ] :: rlAssertGrep: failed to find file /tmp/tmp.DVUPkSafvd/bz461515 


Expected results:
:: [   PASS   ] :: File /tmp/tmp.0iBdkidlK7 should exist
:: [   PASS   ] :: Running testscript
VALUE
:: [05:28:53] ::  Testing whether the output file contains the pattern defined in profile file ...
:: [   PASS   ] :: File '/tmp/tmp.0iBdkidlK7/bz461515' should contain 'VALUE'

Comment 1 Ondrej Vasik 2012-06-05 15:47:54 UTC
Reading the output of the script, I assume something went wrong in your setup and your test doesn't handle it properly.

As the file doesn't exist, although you should have been created as empty file in the setup phase, I don't think that the issue is in the setup package - especially when setup is noarch subpackage and this failed only on i386 as you said.

Feel free to reassign it wherever you want, but I don't see anything to fix in the setup package from your report.

Comment 2 Karel Volný 2012-06-08 11:56:54 UTC
(In reply to comment #1)
> Reading the output of the script, I assume something went wrong in your
> setup and your test doesn't handle it properly.

hm, could you specify the "something"?

reading the log of the setup phase, there is:

:: [   PASS   ] :: Creating testing profile file
cat /etc/profile.d/bz461515.csh:
set bz461515 = ( VALUE )
:: [   PASS   ] :: Creating testscript
cat /tmp/tmp.DVUPkSafvd/bz461515.sh:
#!/bin/tcsh
echo $bz461515 > /tmp/tmp.DVUPkSafvd/bz461515


so the profile file exists with correct contents, the testscript file exists with correct contents too ... I see nothing going wrong here

> As the file doesn't exist,

you mean the testscript output file?

> although you should have been created as empty
> file in the setup phase,

- it should not have been created in the Setup phase, but rather in the Testing phase by running the testscript

however, the testscript complained "bz461515: Undefined variable." so the output was empty => the testscript output file was not created

(although I thought that "echo $emptystring > file" should act like "touch file" = creating empty file ... but that is another story)

> I don't think that the issue is in the setup package - especially when setup
> is noarch subpackage and this failed only on i386 as you said.

it was created as setup bug because the test was written for a bug reported for setup ... this doesn't necesarily mean that setup is to blame this time; if you don't think so then the next possible culprit is tcsh, reassigning

btw, feel free to examine the test source code in git, or stop by my cube to take a look together, in no way I'm ruling out a testbug, but I just simply don't see what could be wrong with the test (especially if the test is just a shell script - nothing i386 specific here too ...)

Comment 4 Roman Kollár 2012-08-28 11:55:06 UTC
The source command is completely broken at the moment, especially on i386, that's why it doesn't source your script in /etc/profile.d/ and $bz461515 is undefined.

*** This bug has been marked as a duplicate of bug 847102 ***