Bug 141477 - CORE fails because of verbose bash output
CORE fails because of verbose bash output
Status: CLOSED CURRENTRELEASE
Product: Red Hat Ready Certification Tests
Classification: Retired
Component: backend (Show other bugs)
beta
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rob Landry
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-01 09:09 EST by Jay Turner
Modified: 2015-01-07 19:08 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-29 11:26:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jay Turner 2004-12-01 09:09:24 EST
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 10:39:24 EST
?  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 05:18:10 EST
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 16:22:55 EST
ah; gotcha.  "grep -v awk" should help I do believe.  Checked into CVS
Comment 4 Rob Landry 2005-04-14 14:16:57 EDT
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.