the tests on the fly alongside with easier-to-read functions.
While doing this, split the big monolithic test program into more granular
but cohesive test programs.
Phew, this one was tough. And it's horrible to see that many these tests
(yes, the tests themselves probably) are broken.
It fails in a number of different ways. Some of them seem to appear
as a function of the file system size (i'm not sure if it's because
the lack of the cleaner or not. i'm guessing ``no'', though).
ok njoly
still a lot of work to do here, but I want to get to testbuilding
the tree ;)
TODO examples:
* integrate this with rump_syspuffs (and remove the stupid ``sys'' from there)
* integrate with njoly's fs-independent tests
* cleanup a lot
* write more tests
*sigh*, I wish we'd had testing tools like this 5 years ago when
I was writing puffs. It would have made a lot of things a lot
better and a lot easier.
the API? Most likely; will revise it.
Fixes atf-run breaking when running t_psshfs. This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think). (I'm now wondering
if atf should be bothering about unmounting stuff at all. Maybe not. It is
a tricky and uncommon thing.)
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.
get tmpfs rename to "tstile".
Note1: triggering this on any non-SMP system is not as easy (because
one system call tends to run from start to finish in one go) and
therefore I've limited it to i386 and amd64. Incidentally, I'm
still waiting for the eternally elusive MI CPU_INFO_FOREACH (or at
least something else than a stupid macro) ...
Note2: this is a "race condition" test. I tested it on my development
host and in qemu and it triggers pretty instantly. But YMMV.