Bug 1022749 - traceback on empty results.xml file
traceback on empty results.xml file
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Test Suite (harness) (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: CAI Qian
William Gomeringer
Depends On:
Blocks: 1052387
  Show dependency treegraph
Reported: 2013-10-23 19:30 EDT by Brian Brock
Modified: 2014-05-21 15:19 EDT (History)
4 users (show)

See Also:
Fixed In Version: hwcert-client 1.6.5-20140113
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1052321 (view as bug list)
Last Closed: 2014-05-21 15:19:02 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)
Fix the traceback when the xml file is not valid (3.50 KB, patch)
2013-12-09 02:04 EST, Dong Zhu
gnichols: review-
Details | Diff
Patch V2 Fix the traceback when the xml file is not valid (3.53 KB, patch)
2013-12-10 21:25 EST, Dong Zhu
gnichols: review+
Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0532 normal SHIPPED_LIVE hwcert-client-1.6.5 bug fix and enhancement update 2014-05-21 19:18:09 EDT

  None (edit)
Description Brian Brock 2013-10-23 19:30:59 EDT
Description of problem:
traceback after several hwcert automated tests ran.

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

How reproducible:

Steps to Reproduce:
1. run beaker test /distribution/hwcert-client/single test in beaker, reserving afterward to diagnose problems.
2. run hwcert-backend print

Actual results:
$ hwc print
Traceback (most recent call last):
  File "/usr/bin/hwcert-backend", line 45, in <module>
    success = hwcertBackend.do(args)
  File "/usr/share/hwcert/lib/hwcert/backend.py", line 182, in do
    result = self.commands[self.command]()
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 702, in doPrint
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 57, in load
  File "/usr/share/hwcert/lib/hwcert/certificationtest.py", line 182, in load
    DocumentBase.load(self, filename)
  File "/usr/share/hwcert/lib/hwcert/documentbase.py", line 275, in load
    self.document = parse(file)
  File "/usr/lib64/python2.7/site-packages/_xmlplus/dom/minidom.py", line 1915, in parse
    return expatbuilder.parse(file)
  File "/usr/lib64/python2.7/site-packages/_xmlplus/dom/expatbuilder.py", line 930, in parse
    result = builder.parseFile(file)
  File "/usr/lib64/python2.7/site-packages/_xmlplus/dom/expatbuilder.py", line 211, in parseFile
    parser.Parse("", True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0

Expected results:
output listing hwcert tests planned, passed, or failed.

Additional info:
/var/lock/subsys/hwcert may have already existed, so will post new results after cleaning and trying to reproduce the problem under different conditions.

most other hwcert-backend commands appear to fail with the same traceback.

clean does not fail, but fixes the problem.
Comment 4 Brian Brock 2013-10-23 19:38:44 EDT
I didn't see any errors in the /var/log

two test runs completed with PASS immediately prior

/var/hwcert/results.xml is empty
Comment 5 Brian Brock 2013-10-23 19:55:46 EDT
traceback on the same system.  Test results cleaned before this run:

Comment 6 Greg Nichols 2013-10-23 21:28:10 EDT
I suspect bug 1022752 caused the empty results.xml, causing this bug.
Comment 9 Dong Zhu 2013-12-09 02:04:39 EST
Created attachment 834217 [details]
Fix the traceback when the xml file is not valid
Comment 11 Dong Zhu 2013-12-10 21:25:06 EST
Created attachment 835025 [details]
Patch V2 Fix the traceback when the xml file is not valid
Comment 15 errata-xmlrpc 2014-05-21 15:19:02 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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