Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arp ping size tests #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ffainelli
Copy link
Contributor

This adds more tests: different ping sizes and an ARP test, please review!

bench/machine.py Outdated
_, stdout, _ = self.control.exec(cmd)
for line in stdout.splitlines():
words = line.split()
if words[0] == address and words[1] == '0x1':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ffainelli ffainelli force-pushed the arp-ping-size-tests branch 2 times, most recently from 4b8201d to c481ec1 Compare October 13, 2017 23:44
@ffainelli
Copy link
Contributor Author

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.
@ffainelli ffainelli force-pushed the arp-ping-size-tests branch from c481ec1 to 125745c Compare January 16, 2018 01:28
@ffainelli
Copy link
Contributor Author

Rebased the branch to the latest head, this should apply correctly again now.

@d-k-c d-k-c force-pushed the master branch 2 times, most recently from ac6b5fe to fed2b04 Compare March 15, 2018 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants