Arp ping size tests#17
Conversation
| _, stdout, _ = self.control.exec(cmd) | ||
| for line in stdout.splitlines(): | ||
| words = line.split() | ||
| if words[0] == address and words[1] == '0x1': |
There was a problem hiding this comment.
When cat-ing /proc/net/arp on my machine, I might get multiple lines with this condition to true (my laptop is connected with Wi-Fi and ethernet):
IP address HW type Flags HW address Mask Device
[...]
192.168.48.243 0x1 0x2 98:e7:f4:7f:d9:16 * wlp4s0
[...]
192.168.48.243 0x1 0x2 98:e7:f4:7f:d9:16 * enp0s31f6
[...]
Moreover, when the function is called on an instance of "Interface", we would expect arpGet to return something valid only if the match corresponds to the interface.
Finally, do you think it would be worth it to create a class Arp to wrap such operations?
There was a problem hiding this comment.
I guess we could extend the test to also check that the network interface name appears there, which should return an unique entry within /proc/net/arp
We could indeed create an Arp class with a bunch of methods associated with it: arpGet() to start, and maybe arpSet() if we need to configure a static ARP entry. I will respin this patch series with that addressed.
Thanks
4b8201d to
c481ec1
Compare
|
This has been updated and now depends on https://github.com/d-k-c/dsatest/tree/arp-support |
Done via the '-s' argument, optional, if not specified, the default command size is used.
c481ec1 to
125745c
Compare
|
Rebased the branch to the latest head, this should apply correctly again now. |
ac6b5fe to
fed2b04
Compare
This adds more tests: different ping sizes and an ARP test, please review!