Francesco Romani has posted comments on this change.

Change subject: storage: support new dd output
......................................................................


Patch Set 1:

(4 comments)

https://gerrit.ovirt.org/#/c/56091/1/tests/Makefile.am
File tests/Makefile.am:

Line 138:       storageMailboxTests.py \
Line 139:       storageMonitorTests.py \
Line 140:       storageServerTests.py \
Line 141:       storagetestlibTests.py \
Line 142:       storage_misc_test.py \
> Did  you look at miscTests.py?
nope! I'm guilty, i cut corners here :)
But will move those tests in the place you suggested in another comment :)
Line 143:       storage_sdm_api_test.py \
Line 144:       storage_sdm_create_volume_test.py \
Line 145:       storage_volume_artifacts_test.py \
Line 146:       tasksetTests.py \


https://gerrit.ovirt.org/#/c/56091/1/tests/storage_misc_test.py
File tests/storage_misc_test.py:

Line 23: 
Line 24: from monkeypatch import MonkeyPatchScope
Line 25: 
Line 26: 
Line 27: class TestReadSpeed(VdsmTestCase):
> We already test this in miscTests.py:ReadSpeed.testReadSpeedRegExp.
sure thing
Line 28: 
Line 29:     def test_zero_size(self):
Line 30:         output = (
Line 31:             "0+0 records in",


Line 44:         output = (
Line 45:             "1+0 records in",
Line 46:             "1+0 records out",
Line 47:             "4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00887814 s, 461 
kB/s")
Line 48:         self.assertNotRaises(self._speed_from_output, output)
> assert not raises is not good enough, we want to get the time from that str
ok, will change the tests accordingly.
Line 49: 
Line 50:     def test_read_30_bytes_human_readable(self):
Line 51:         output = (
Line 52:             "0+1 records in",


https://gerrit.ovirt.org/#/c/56091/1/vdsm/storage/misc.py
File vdsm/storage/misc.py:

Line 188:     return str(ctime)
Line 189: 
Line 190: _readspeed_regex = re.compile(
Line 191:     "(?P<bytes>\d+) bytes?"
Line 192:     "(|( \([\de\-.]+ [kMGT]*B(|, [\de\-.]+ [KMGT]*iB)\))) copied, "
> This probably works but too fragile. We don't care about the values which d
OK, do you want me to simplify the regex first then (perhaps?) replace it with 
string.split() and friends or should I just rewrite the parsing?
Line 193:     "(?P<seconds>[\de\-.]+) s, "
Line 194:     "([\de\-.]+|Infinity) [kMGT]*B/s"
Line 195: )
Line 196: 


-- 
To view, visit https://gerrit.ovirt.org/56091
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I632d99cdc2b41e96a75bdce12e86710241fa0939
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to