Dan Kenigsberg has posted comments on this change.

Change subject: Basic tests for the tc module
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(6 inline comments)

Thank you very much!

I am slightly worried about your choice of tun device instead of bridge (bridge 
is going to be used in production).

Can this be avoided?

....................................................
File tests/tcTests.py
Line 25: from subprocess import Popen, check_output
we try hard to make vdsm work and build in el6 which has Python 2.6 which lacks 
check_output.

Line 109:         self.dev = dev
self.dev should better be called self._dev as it is used only inside the object.

Line 124:         self.cloneDevice = open('/dev/net/tun', 'r+b')
self.cloneDevice seems to be really needed only inside this function - better 
make it a local entity.

Line 152:         sleep(1)
I guess this sleep is intended to give tcpdump enough time to start up. 
Couldn't it be less than a second?

I usually dislike "sleep" as a means of synchronization. Since this is "only" a 
test, we can keep it - with a comment and disclaimer, because it is bad 
education for others.

Line 153:         self.ping = Popen([EXT_PING, "-I",
is there any reason to put self.ping as a data member for posterity?

same goes for tcpdump - it would be more pretty to have this function return 
True iff the ping packet has been heard.

Line 157:         sleep(1)
why do you need a sleep here?

--
To view, visit http://gerrit.ovirt.org/6225
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iee9437d1b5a96b3896df157f13888485ae7292d2
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Roman Fenkhuber <ro...@fenkhuber.at>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Roman Fenkhuber <ro...@fenkhuber.at>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to