Ido Barkan has posted comments on this change.
Change subject: net stats: add tx/rx statistic to getInterfacesStat
......................................................................
Patch Set 15: Code-Review-1
(2 comments)
http://gerrit.ovirt.org/#/c/35061/15/tests/functional/networkTests.py
File tests/functional/networkTests.py:
Line 418:
Line 419: @cleanupNet
Line 420: @RequireVethMod
Line 421: @ValidateRunningAsRoot
Line 422: def testSetupNetworksStatistics(self):
Please consider changing the test name as there is no setupNetworks call during. Maybe
testgetVdsStatsReportsRxTxStats ?
Line 423: """This Test will send an ARP request on a created veth
interface
Line 424: and checks that the TX bytes is in range between 42 and 384 bytes
Line 425: the range is set due to DHCP packets that may corrupt the
statistics"""
Line 426: # TODO disable DHCP service on the veth
Line 458: '-c', '1',
IP_ADDRESS_IN_NETWORK])
Line 459: if rc != 0:
Line 460: raise SkipTest('Could not run sysctl command', out,
err)
Line 461: # Sleep 2 seconds for the statistics to be updated
Line 462: time.sleep(2)
can we replace the sleep with retryAssert? it might require yet another inner function,
but it's safer for slower machines
Line 463: curTxStat = getTxStatsFromInterface(left)
Line 464: diff = (curTxStat - prevTxStat)
Line 465: self.assertTrue(ARP_REQUEST_SIZE <= diff
Line 466: <= (ARP_REQUEST_SIZE + DHCP_PACKET_SIZE),
--
To view, visit
http://gerrit.ovirt.org/35061
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I314a04570dec56677168e0fdb4a7824d299dbd65
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amir Shladovsky <a.shlado(a)gmail.com>
Gerrit-Reviewer: Amador Pahim <apahim(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Lior Vernia <lvernia(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes