Bug 598544

Summary: Control-C interrupt of v7 often results in broken results.xml
Product: [Retired] Red Hat Hardware Certification Program Reporter: Greg Nichols <gnichols>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Qian Cai <qcai>
Severity: medium Docs Contact:
Priority: low    
Version: 1.1CC: czhang, qcai, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Interrupting the v7 process using the Control-C keystroke now does not result in corrupted test results.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-20 12:14:21 UTC Type: ---
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
documentbase.py patch with exception handling
none
documentbase.py patch with exception handling none

Description Greg Nichols 2010-06-01 15:31:30 UTC
Description of problem:

When v7 is interrupted by the user via Control-C, a broken results.xml file is often produced.

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

v7 1.1, 1.2

How reproducible:

very

Steps to Reproduce:

When a test is running, or at a test prompt, hit control-c twice - once to kill the test, then again for the v7 harness.

Then try "v7 print" and look for a traceback as v7 tries to parse the results.xml file.

Comment 1 Greg Nichols 2010-06-01 15:38:20 UTC
Created attachment 418689 [details]
documentbase.py patch with exception handling

This patch handles the KeyboardInterupt exception generated via control-c during saving of v7's results.xml file.  The handler prints a message asking the user to wait for the file to be saved, then raises the exception.   

This allows v7 to be killed via control-c, but minimizes the chance of it breaking the results.xml.

Comment 2 Greg Nichols 2010-06-01 23:19:23 UTC
Created attachment 418855 [details]
documentbase.py patch with exception handling

Removed spurious change found in previous patch.

Comment 5 Caspar Zhang 2010-09-09 08:42:16 UTC
(In reply to comment #1)
> Created attachment 418689 [details]
> documentbase.py patch with exception handling
> 
> This patch handles the KeyboardInterupt exception generated via control-c
> during saving of v7's results.xml file.  The handler prints a message asking
> the user to wait for the file to be saved, then raises the exception.   
> 
> This allows v7 to be killed via control-c, but minimizes the chance of it
> breaking the results.xml.

>=v7-1.2-R21 does print a message asking the user to wait. So we can move the bug state to 'VERIFIED'.

Comment 8 errata-xmlrpc 2010-09-20 12:14:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0702.html

Comment 9 Jaromir Hradilek 2010-09-21 12:54:19 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:
Interrupting the v7 process using the Control-C keystroke now does not result in corrupted test results.