Bug 982728 - Running rpm.t test in DEBUG mode causes test failure
Running rpm.t test in DEBUG mode causes test failure
Product: GlusterFS
Classification: Community
Component: tests (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Niels de Vos
Depends On:
  Show dependency treegraph
Reported: 2013-07-09 12:49 EDT by Justin Clift
Modified: 2015-10-22 11:40 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-10-22 11:40:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Justin Clift 2013-07-09 12:49:44 EDT
Description of problem:

  When running the GlusterFS Test Framework on EL6.4, the rpm.t test
  incorrectly reports itself as failing if the DEBUG environment
  variable is set.

  It's caused by this line of code near the top of the test:

    exec &> ${RESULT_DIR}/log

  Commenting it out stops the incorrect "fail" reporting.

  Looking at the log file generated when DEBUG=1, all of the tests
  are actually passing ("ok").

  There's just something going wrong passing that result back to
  the test framework.

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

  Upstream GlusterFS git master, as of Tue 9th July 2013
  commit 60bdca792b7e572b4d79382dada1c6b93bebdd0e

How reproducible:

  Every time.

Steps to Reproduce:
1.  Setup the Gluster Test Framework on EL 6.4 (either RHEL or CentOS)
2.  export DEBUG=1
3.  Run the test suite ($ sudo ./run-tests.sh)

    The failure occurs here.

Actual results:

  # export DEBUG=1
  # prove -vf tests/basic/rpm.t 
  tests/basic/rpm.t .. 
  Failed 5/5 subtests 

  Test Summary Report
  tests/basic/rpm.t (Wstat: 0 Tests: 0 Failed: 0)
    Parse errors: Bad plan.  You planned 5 tests but ran 0.
  Files=1, Tests=0, 283 wallclock secs ( 0.01 usr  0.03 sys + 133.63 cusr 45.61 csys = 179.28 CPU)
  Result: FAIL

  (and now showing a completely separate run without DEBUG set)

  # prove -vf tests/basic/rpm.t 
  tests/basic/rpm.t .. 
  [extra stuff snipped]
  All tests successful.
  Files=1, Tests=5, 287 wallclock secs ( 0.02 usr  0.04 sys + 131.02 cusr 53.90 csys = 184.98 CPU)
  Result: PASS

Expected results:

  Setting debug mode shouldn't cause test failure to be incorrectly reported.

Additional info:
Comment 2 Kaleb KEITHLEY 2015-10-22 11:40:20 EDT
pre-release version is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.

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