quite slowly when run under qemu.
Also, change the switch variable from "RESIZE_FFS_BIG_TESTS" to
"RESIZE_FFS_ALL_TESTS", and only check if it's set or not.
network with one router in the middle and checks traceroute from
one endpoint to another with both UDP and ICMP.
(i guess these test networking at least as much as traceroute
itself, but then again that's not a bad thing)
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.
Put real data into file systems before resizing: the test data
was randomly generated and is in pairs of files each a power-of-two and
power-of-two plus one bytes to hopefully catch block and frag issues.
Each test fills (nearly) the file system with test data. If shrinking,
it removes enough data so that the shrunken file system will be large enough
to accomodate the data. (It's done this way to hopefully ensure some or
most of the data will need to be moved when shrinking). The files are
then checked with MD5 against the known list. This particular method
was chosen to reduce the amount of data checked in while still retaining
reproducibility.
There are more tests to come; since resize_ffs(8) currently does not
support ffsv2 or byteswapped file systems, only a couple token expected-fail
test cases for those were added. Also, only 8:1 blocksize:fragsize
combinations are currently tested.
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.
tests being done, vnd isn't needed and adds a potential resource
conflict issue on the system running the test. As a bonus, the
tests run faster because less data is being shuffled around.
- Cannot test because make test prints:
.: Can't open /usr/share/atf/atf.header.subr
- The shell script common code needs to be fixed to follow regular shell
style.
- variables are underquoted
- uses `` instead of $()
- does not use local for local variables, prefixes with undescore
- needlessly uses braces for numeric and symbolic variables.
- uses a fifo to grab output, and does not clean it up properly on error
- should not exit with > 127 !!!
- PR bin/44177 is fixed
- test grow/shrink on a ffsv1 with 64k blocksize, which was broken until
recently
- make sure the partial cylinder left over is big enough so it doesn't
get thrown away now that resize_ffs properly uses the last cyl.
XXX TODO: add tests which ensure data integrity.
more than create an empty file system, grow it, and makes sure fsck
finds the result clean. The 'shrink' test does likewise for shrinking,
but is an expected failure at the moment due to PR bin/44177.
Fun fact: since the server daemonizes into its own process group,
it's not in atf's pgrp. Use rump_sys_reboot() in atf cleanup to
kill the server after the test.