shell script and using rump_server, rump.ifconfig and rump.ping.
XXX: uses rump_allserver for now, though, since i noticed a problem
where the rump kernel syscall vector does not get updated for
dlopen()'d libraries (and hence if you dlopen librumpnet.so, socket()
still gives ENOSYS). Me be fixink it later.
This is yet another example of a simple test which would be much
trickier to execute against the host kernel. You would either need
to put networking in a complete lockdown, or do some "statistical"
methods where you trigger the bug many many times and attempt to
ascertain a rising trend in mbuf count. And, of course, the leaked
mbufs don't go away from the host kernel once the test ends. In
contrast, we *know* that there is no other networking activity in
a rump kernel, so we can execute the operation exactly once, plus
the leaked mbuf "disappears" when the test is done.
- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
XXX: there's apparently some race condition which appears to trigger
if a broadcast arp arrives around the same time as the arpwhohas
is sent. This causes original packet to never be sent by the
arpwhohas requestor. If this rings a bell to someone, please let
me know.
be triggered which appears to cause one host to go berzerk with
sending carp advertisements and ignore ping requests.
I'll get to the bottom of this eventually, but this is a stopgap
to prevent the test from failing, hopefully -- the race doesn't
appear to trigger for me even with 0.1s on a loaded machine, so
0.5s should be better than fine.
(hi jmmv ;)
configures carp in each of them, and after verifying that the shared
address responds to ping it brutally kills the master like a proper
carnivore (none of that ifconfig down sissy vegan nonsense). Then
the test checks if the backup got its act together by pinging the
shared address and passes verdict.
Due to the nature of the feature under test, this one is a little
different, so let me explain how it works.
The test program forks and bootstraps a rump kernel in both processes.
It then configures shared memory interfaces in both. shmif is nice
in that it uses a mmaped file as the bus and does not require root
privileges for communication between two (or more) processes. The
child process then proceeds to increase icmp.returndatabytes as
indicated by the PR, while the parent process sets the global TTL
of the rump kernel to 1 (note: both values only affect the respective
rump kernels, not each other or more importantly the host kernel).
The parent then sends the bad packet which is supposed to be routed
by the child. If ip_icmp.c was too old, *boom* + fail; otherwise
nothing bad happens and the test exists with success after one
second.
Eventually this test can be extended into a framework for automated
testing of any networking code which requires (arbitrarily complex)
routing setups.
in non-routed setups b) avoid the dubious security implications.
Also, to make the test actually do what it claims to do, call
getsockname() and verify we got a low port.