Bug 711161

Summary: v7 usb test Error: test raised exception on zero-length/non-integer prompt response
Product: [Retired] Red Hat Hardware Certification Program Reporter: Russ Anderson <randerso>
Component: Test Suite (tests)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Guangze Bai <gbai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: czhang, gbai, gbeshers, peterm, rja, rlandry, ykun, yshao
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
v7 1.3 usb test may raise an exception on zero-length/non-integer prompt repsonse, this issue has been fixed in v7 1.4, now usb test is able to recognize invalid user input and prompt user to give a correct input.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-08 15:42:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
usb patch using new promptInteger method
none
commandLineUI patch adding promptInteger method none

Description Russ Anderson 2011-06-06 17:13:44 UTC
Description of problem:

When running the v7 usb test with a USB keyboard with a built in USB hub,
the v7 usb test took an exception.

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

  rh-tests-distribution-v7-common-1.3-20.noarch
  v7-1.3-46.el6.noarch
  rh-tests-distribution-v7-single-1.3-32.noarch

How reproducible:

100%

Steps to Reproduce:
1.  Plug in a keyboard with a built in USB hub.
2.  Start the v7 usb test
  
Actual results:

  How many USB sockets are required to be tested? Error: test raised exception:
  invalid literal for int() with base 10: ''

Expected results:

Not expecting an exception.

Additional info:

The full console output:
------------------------------------------------------------------------
[root@uv182-sys ~]# v7 run --test=usb --test=video --server 137.38.229.203
loaded results /var/v7/results.xml
Verifying V7 Server...
Warning: The v7 server on 137.38.229.203 is reporting errors
137.38.229.203 says: Error: /var/v7/export is not available
Set server to 137.38.229.203 for  2 test(s)
saved test plan to /var/v7/results.xml
Warning: the test results may be too large to submit to the hardware catalog.
File: /var/v7/results.xml is 28 MB
Would you like to package the current results first? (y|n) n
response: n

Running the following tests:
usb                                                       
video                 pci_102b_522                        
info                                                      

Test Verification Passed
Run these tests? (y|n) y
response: y
usb                                                        
video                 pci_102b_522                         
info                                                       


running usb on 
sh: kudzu: command not found
installing test from /usr/share/v7/tests/usb into /tmp/v7-usb-SR92LJ
mkdir -p /tmp/v7-usb-SR92LJ
cp -a runtest.sh usb.py Makefile /tmp/v7-usb-SR92LJ
chmod a+x ./runtest.sh ./usb.py
Test Parameters: OUTPUTFILE=/var/log/v7/runs/1/usb/output.log DEVICE= TESTSERVER=137.38.229.203 RUNMODE=normal DEBUG=off UDI= 
USB test:
USB Hub Interface appears to be plugged into bus 2 port 0
USB Hub Interface appears to be plugged into bus 8 port 0
USB Hub Interface appears to be plugged into bus 7 port 0
USB Hub Interface appears to be plugged into bus 6 port 1
USB HID Interface appears to be plugged into bus 6 port 1
Optical Wheel Mouse appears to be plugged into bus 6 port 1
USB HID Interface appears to be plugged into bus 6 port 1
USB HID Interface appears to be plugged into bus 6 port 1
SK-8125 Keyboard appears to be plugged into bus 6 port 1
Keyboard Hub appears to be plugged into bus 6 port 1
USB Hub Interface appears to be plugged into bus 6 port 0
USB Mass Storage Interface appears to be plugged into bus 1 port 4
Composite Device appears to be plugged into bus 1 port 4
USB Hub Interface appears to be plugged into bus 1 port 0
USB Hub Interface appears to be plugged into bus 5 port 0
USB HID Interface appears to be plugged into bus 4 port 1
USB HID Interface appears to be plugged into bus 4 port 1
Virtual Keyboard and Mouse appears to be plugged into bus 4 port 1
USB Hub Interface appears to be plugged into bus 4 port 0
USB Hub Interface appears to be plugged into bus 3 port 0
How many USB sockets are required to be tested? Error: test raised exception:
invalid literal for int() with base 10: ''
copying attachments...
checking directory /var/log/v7/runs/1/usb 
Skipping output.log
saveOutput: /var/log/v7/runs/1/usb/output.log
Warning: could not merge output XML, reading as text file.
no element found: line 24, column 48
Return value was 1
saved to /var/v7/results.xml
------------------------------------------------------------------------

Comment 1 Greg Nichols 2011-07-20 16:15:09 UTC
Created attachment 514049 [details]
usb patch using new promptInteger method

Comment 2 Greg Nichols 2011-07-20 16:16:14 UTC
Created attachment 514051 [details]
commandLineUI patch adding promptInteger method

The promptInteger method requires the user to enter an integer.  The prompt repeats until the user does this.

Comment 6 Caspar Zhang 2011-10-21 13:26:10 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
v7 1.3 usb test may raise an exception on zero-length/non-integer prompt repsonse, this issue has been fixed in v7 1.4, now usb test is able to recognize invalid user input and prompt user to give a correct input.

Comment 7 errata-xmlrpc 2011-11-08 15:42:15 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-2011-1436.html

Comment 8 errata-xmlrpc 2011-11-08 18:31:06 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-2011-1436.html