Bug 1022749 - traceback on empty results.xml file
Summary: traceback on empty results.xml file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Test Suite (harness)
Version: 1.6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Qian Cai
QA Contact: William Gomeringer
URL:
Whiteboard:
Depends On:
Blocks: 1052387
TreeView+ depends on / blocked
 
Reported: 2013-10-23 23:30 UTC by Brian Brock
Modified: 2014-05-21 19:19 UTC (History)
4 users (show)

Fixed In Version: hwcert-client 1.6.5-20140113
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1052321 (view as bug list)
Environment:
Last Closed: 2014-05-21 19:19:02 UTC
Embargoed:


Attachments (Terms of Use)
Fix the traceback when the xml file is not valid (3.50 KB, patch)
2013-12-09 07:04 UTC, Dong Zhu
gnichols: review-
Details | Diff
Patch V2 Fix the traceback when the xml file is not valid (3.53 KB, patch)
2013-12-11 02:25 UTC, Dong Zhu
gnichols: review+
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0532 0 normal SHIPPED_LIVE hwcert-client-1.6.5 bug fix and enhancement update 2014-05-21 23:18:09 UTC

Description Brian Brock 2013-10-23 23:30:59 UTC
Description of problem:
traceback after several hwcert automated tests ran.

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


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
    self.load()
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 57, in load
    self.certification.load(self.environment.getResultsPath())
  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 23:38:44 UTC
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 23:55:46 UTC
traceback on the same system.  Test results cleaned before this run:

https://bugzilla.redhat.com/show_bug.cgi?id=1022752

Comment 6 Greg Nichols 2013-10-24 01:28:10 UTC
I suspect bug 1022752 caused the empty results.xml, causing this bug.

Comment 9 Dong Zhu 2013-12-09 07:04:39 UTC
Created attachment 834217 [details]
Fix the traceback when the xml file is not valid

Comment 11 Dong Zhu 2013-12-11 02:25:06 UTC
Created attachment 835025 [details]
Patch V2 Fix the traceback when the xml file is not valid

Comment 15 errata-xmlrpc 2014-05-21 19:19:02 UTC
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.

http://rhn.redhat.com/errata/RHBA-2014-0532.html


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