tests/gnrc_sock_dns: port to scapy#10898
Conversation
|
|
||
| $ sudo dnsmasq -d -2 -z -i tap0 -q --no-resolv \ | ||
| --dhcp-range=::1,constructor:tap0,ra-only \ | ||
| --listen-address 2001:db8::1 \ |
There was a problem hiding this comment.
I mentioned this in the commit that does this change: this bind causes (at least my version of dnsmasq) to send RAs from that address. However, sending RAs from a non-link-local address is invalid.
|
Rebased to current master to include fixes from #10896. |
20a23c2 to
3c29512
Compare
I have to say that I don't like this. The files generated by the build (if the application was not built already) will be owned by root and it will create a mess with file permissions in the riot directory. For me this is also a big problem with automated tests but also for developers without root access on their machine. The same issue is already in master with 2 other gnrc test applications. If there is a way to use scapy without the need to be root, that would be more useful and it should also be documented. The purpose of tests is to be runnable by any developer, without strong knowledge of all the corner cases and setup details. It should also be easy to understand and help understand the code being tested. |
For the most part I agree with you (the tests are currently not run on Murdock btw for exactly that reason). Sadly, there is no way to run without root, since the scapy tests
To execute them without sudo, scapy (and thus python) would require certain permissions, like e. g. wireshark gets when the user is added to the wireshark group. Since we are talking raw networking capabilities for the python executionable here I rather like to not have that on a system like Murdock (unless we can ensure better isolation there). [edit: darn mobile interface] |
|
If and only if I find a way to send |
Apart for developers without administrative access to the machine |
To elaborate on that: the dependency-less alternative to |
Worked. The tests are now even simpler than with pure |
|
They still require a TAP interface though, so no way to run them with Murdock at the moment :( |
MrKevinWeiss
left a comment
There was a problem hiding this comment.
I looked at the changes. I really like the moving to shell tests and implementing logic in python. The fact that @aabadie comments regarding sudo have been addressed means it doesn't cost anything.
Though I am not a networking guy I was able to run the tests and they seem much more in depth than the test that is replaced.
I would be ok to move this forward if nobody else... @kaspar030... has an opinion as it appears to be an improvement to me.
|
Also rebase seems needed. |
c6e658f to
0337291
Compare
|
Rebased and adapted for master |
|
Well since no response, I trust @miri64 that is testing the correct thing. Please squash! |
Also remove binding of the DNS server to 2001:db8::1. It causes `dnsmasq` to send router advertisements from that address, which is not a [valid source for RAs][RFC 4861], so a default route is never configured on the RIOT to reach the DNS server. [RFC 4861]: https://tools.ietf.org/html/rfc4861#section-6.1.2
b85b0ec to
3bfaded
Compare
|
Squashed |
MrKevinWeiss
left a comment
There was a problem hiding this comment.
ACK. We can wait for the CI.
Contribution description
This
Testing procedure
Build and flash the application to a board of your choice (must support
ethosornetdev_tap). Create a TAP interface and runmake testThe tests should succeed.
Issues/PRs references
Adds tests for #10739
Requires #10896(merged) for tests to finish successfully.