Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 984742

Summary: Hwcert Traceback when selecting n to submitting to test server
Product: [Retired] Red Hat Hardware Certification Program Reporter: Rob Landry <rlandry>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED EOL QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.7.0CC: rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1004985 1010414 (view as bug list) Environment:
Last Closed: 2020-03-27 15:51:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
harness.py patch to catch exception when http:// is entered as part of server host name none

Description Rob Landry 2013-07-15 20:57:48 UTC
Description of problem:

hwcert tracebacked after not submitting the results to the catalog nor to the test server.

I'm guessing this applies to 5,6, & 7 but I've only tested on RHEL6.2.


[root@unused ~]# hwcert
The Red Hat Hardware Certification Test Suite

Would you like to submit the results to the hardware catalog? (y|n) n
response: n
Saving current results to:
/var/hwcert/store/LENOVO/ThinkPad/x220-4291CL9/x86_64/RHEL/6.4/hwcert-results-unused-20130715202139.xml.gz

Copy results to test server http://hwcert.boston.devel.redhat.com/? (y|n) n
Traceback (most recent call last):
  File "/usr/bin/hwcert", line 31, in <module>
    if not hwcert.run():
  File "/usr/share/hwcert/lib/hwcert/hardwarecertification.py", line 86, in run
    if not self.certify():
  File "/usr/share/hwcert/lib/hwcert/hardwarecertification.py", line 115, in certify
    if not self.doPlan():
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 146, in doPlan
    self.doDiscover()
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 86, in doDiscover
    self.checkTestServer(self.options.server)
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 319, in checkTestServer
    response = opener.open(request).readlines()
  File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.6/urllib2.py", line 1136, in do_open
    h = http_class(host, timeout=req.timeout) # will parse host:port
  File "/usr/lib64/python2.6/httplib.py", line 661, in __init__
    self._set_hostport(host, port)
  File "/usr/lib64/python2.6/httplib.py", line 686, in _set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: ''


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

[root@unused ~]# rpm -q hwcert-client
hwcert-client-1.6.4-57.el6.noarch

How reproducible:

Everytime :(

Steps to Reproduce:
1.run hwcert
2.disable everything
3.enable audio test
4.run tests
5. say no to suspend questions
6. wait for info test
7. say no to upload to catalog
8. say no to upload to test server


Actual results:

traceback

Expected results:

hwcert to exit cleanly

Additional info:

Comment 1 Rob Landry 2013-07-15 21:30:03 UTC
This only happens if a test server is provided.  When I didn't supply one, the traceback did not occur.

Comment 2 Rob Landry 2013-07-15 21:39:36 UTC
traceback happens when the local test server value includes  http://; removing these and just including the host name avoids the traceback.

Comment 3 Greg Nichols 2013-07-23 20:53:06 UTC
Created attachment 777475 [details]
harness.py patch to catch exception when http:// is entered as part of server host name

Comment 6 Brian Brock 2013-10-08 13:52:29 UTC
fix verified in hwcert-client-1.6.5-21.el6.noarch