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):
Steps to Reproduce:
1.v7 run -t storage
2.Check dt print
Every write operation has same records
Every write operation should have different records to cover the test size
Created attachment 522104 [details]
This patch also fix:
bug 736638 , bug 736666 and bug 736679
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.
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.