Add test cases for ping with IP options in the response
MFC after: 1 week
Differential D37210
Add test cases for ping with IP options in the response asomers on Oct 29 2022, 10:07 PM. Authored by Tags None Referenced Files
Details Add test cases for ping with IP options in the response MFC after: 1 week ATF tests included
Diff Detail
Event Timeline
Comment Actions Although fearing my suggestions could make the tests more brittle, I'm still interested to know what do you think?
Comment Actions I may also have a slight suspicion you applied your diff to a different ping.c base. After all, the idea was just to add test cases. Comment Actions Yes I did. But I can't figure out how to make the ping.c changes go away from phabricator. Can we just pretend, for the sake of review, that they aren't there? Comment Actions 😂 that changes everything! atf_check -s exit:2 \ -o match:"Destination Host Unreachable" \ -o match:"(01){40}" \ python3 $(atf_get_srcdir)/injection.py pip Comment Actions Yes, but the bug fix is being reviewed separately. I couldn't figure out how to add my test changes to that review, so I opened a second one. Let's ignore the bug fix here. Comment Actions Remembering the late Mike Muuss, I decided to take a stab at this problem while we wait for the cavalry to arrive.
I plan on keep this going for ping6 (ping -6) as well, depending on your feedback. Comment Actions One problem I noticed is that the tests can spuriously fail with some error messages from scapy: markj@nuc> sudo kyua debug ping_test:inject_opts Executing command [ python3 /usr/tests/sbin/ping/injection.py opts ] Fail: stderr not empty --- /dev/null 2022-11-30 14:43:29.782039000 +0000 +++ /tmp/kyua.FOws6H/2/work/check.VgUqKM/stderr 2022-11-30 14:43:27.574257000 +0000 @@ -0,0 +1,5 @@ + +(injection.py:37468): dbind-WARNING **: 14:43:27.258: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/kyua.y0IpE0/7/work/.cache/at-spi/bus_0: No such file or directory +WARNING: No IPv4 address found on bridge0 ! +WARNING: No IPv4 address found on epair0a ! +WARNING: more No IPv4 address found on epair0b ! Files left in work directory after failure: .cache, .config, tun.txt ping_test:inject_opts -> failed: atf-check failed; see the output of the test for details Comment Actions I see that. It worked when I ran it in a VM, but now that I run it on bare metal with unused ethernet ports I get these warnings. The warnings come from Scapy and are harmless, but Kyua isn't expecting them. I'll try to figure out how to suppress them. Comment Actions The sledgehammer approach would be to just add -e ignore to the atf_check parameters, but hopefully there's a better way than that. Comment Actions
Comment Actions @markj @jlduran_gmail.com I fixed the network errors that markj found. A necessary side effect seems to be the pep-8 style warnings, and I don't see any way to suppress those. Are there any other problems here? Comment Actions The test inject_pip_body is currently passing, however, at the moment it should be failing.
Comment Actions The network errors are gone, but I still see markj@nuc> sudo kyua debug ping_test:inject_pip Executing command [ python3 /usr/tests/sbin/ping/injection.py pip ] Fail: stderr not empty --- /dev/null 2022-12-19 15:56:11.362786000 +0000 +++ /tmp/kyua.Y6LlPJ/2/work/check.u8irfX/stderr 2022-12-19 15:56:07.798303000 +0000 @@ -0,0 +1,2 @@ + +(injection.py:7882): dbind-WARNING **: 15:56:07.798: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/kyua.y0IpE0/7/work/.cache/at-spi/bus_0: No such file or directory Files left in work directory after failure: .cache, .config, tun.txt ping_test:inject_pip -> failed: atf-check failed; see the output of the test for details Unsetting DISPLAY in the environment seems to fix the problem but that's a weird thing to have to do. OTOH, there are other network tests that fail for me in the same way. I didn't notice since I usually run tests in a VM. So the problem shouldn't block this patch.
Comment Actions I can't reproduce markj's problem about dbind, whether I run on a system with or without X . I'm going to guess that it's something about his particular environment. I'll fix the braces and commit.
|