Bug 736675

Summary: v7 storage test sets an improper I/O records
Product: [Retired] Red Hat Hardware Certification Program Reporter: WANG Chao <chaowang>
Component: Test Suite (tests)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Caspar Zhang <czhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: chaowang, czhang, fge, gbai, qcai, rlandry, ruyang, ykun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-08 15:41:54 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
patch fix none

Description WANG Chao 2011-09-08 12:02:36 UTC
Description of problem:
After code review of /usr/share/v7/tests/storage/storage.py, I found that storage.py run dt with an static option 'records=X' and X is incorrectly static.
Here's the buggy code of storage.py, check line 113:
   110	    def dtTest(self, minBs, maxBs, file, size, otherOptions):
   111	        """Do a few passes of read/write testing on the given device."""
   112	        # Find out how many maxBs-sized blocks we can fit on the test file/dev
   113	        blocks = ((size/(maxBs/1024)))
'blocks' is the records that will give to dt as an option 'records=%d' % blocks.
And the records is static as line 113 wrote.I think records should be dynamically assigned as size*1024/bs.
If test size is set as 64k, as maxBs is 64k too, we will get blocks=1.Not matter what bs is set, it will write/read only 1 record, and can't cover all the test size.


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

How reproducible:
100%

Steps to Reproduce:
1.v7 run -t storage
2.Check dt print
3.
  
Actual results:
Every write operation has same records

Expected results:
Every write operation should have different records to cover the test size

Additional info:

Comment 1 WANG Chao 2011-09-08 12:28:48 UTC
Created attachment 522104 [details]
patch fix

This patch also fix:
bug 736638 , bug 736666 and bug 736679

Comment 4 Caspar Zhang 2011-10-21 14:35:46 UTC
The fix for this bug caused storage testing time abnormally long (see bug 739967) and I have withdrew the patch. Seems that we don't need to verify _every_ block of the device, the original code was just right.

So setting SanityOnly in the verified field, and no need to verify it. Also no TechNote is needed.

Comment 5 errata-xmlrpc 2011-11-08 15:41:54 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 6 errata-xmlrpc 2011-11-08 18:33:07 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