Bug 141477 - CORE fails because of verbose bash output
Summary: CORE fails because of verbose bash output
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Ready Certification Tests
Classification: Retired
Component: backend
Version: beta
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rob Landry
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-01 14:09 UTC by Jay Turner
Modified: 2015-01-08 00:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-29 15:26:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Turner 2004-12-01 14:09:24 UTC
Description of problem:
Might just be that I have a special verbose version of the code, but with 
rhr2-rhel4-0.9-14.9e.dummyrun, the xtrace option is causing something like this
to land in the CORE output.log:

++ awk ' /Wrote/ { print $2; } ' /var/log/rhr/tests/CORE/0/output.log

Net result is that very command ends up then returning the names of the packages
written with "awk" at the end:

+ rpm -qlip /usr/src/redhat/RPMS/i686/kernel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-devel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-smp-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-smp-devel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-hugemem-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-hugemem-devel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-debuginfo-2.6.9-1.784_EL.root.i686.rpm awk

Which causes CORE to fail.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Rob Landry 2004-12-01 15:39:24 UTC
?  While CORE might and probably does fail (since I haven't run it through
lately as it takes forever on my machines; though it's on the list of things to
do); the contents of output.log should no longer effect the return status.  It's
possible that it's this awk line if it doesn't exit cleanly though.  Can you
attach the output.log; with any luck I can use that to figure out what's up.

Comment 2 Jay Turner 2004-12-02 10:18:10 UTC
It's not that the content of output.log is affecting the return status directly,
but rather that the contest of output.log results in a failure which affects the
return status.  The only output which matters is at the top of the bug report. 
The CORE script runs:

rpm -qlip `awk ' /Wrote/ { print $2; } ' $output_log`

This ends up in output.log as:

++ awk ' /Wrote/ { print $2; } ' /var/log/rhr/tests/CORE/0/output.log

And then awk actually executes, which has the net result of not only picking up
the names of all the files which were written, but it also picks up the line
"++ awk ' /Wrote/ { print $2; } ' /var/log/rhr/tests/CORE/0/output.log" and
returns field 2, which is "awk".  This has the net result of making the original
command look like this:

rpm -qlip /usr/src/redhat/RPMS/i686/kernel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-devel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-smp-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-smp-devel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-hugemem-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-hugemem-devel-2.6.9-1.784_EL.root.i686.rpm
/usr/src/redhat/RPMS/i686/kernel-debuginfo-2.6.9-1.784_EL.root.i686.rpm 
awk

So rpm executes, lists all of the files in the various packages, then gets to
'awk' and runs

rpm -qlip awk

which of course fails and sets the exit code to "1"

Comment 3 Rob Landry 2004-12-06 21:22:55 UTC
ah; gotcha.  "grep -v awk" should help I do believe.  Checked into CVS

Comment 4 Rob Landry 2005-04-14 18:16:57 UTC
should be corrected in any rhr2-1.0 package.


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