Commit Graph

238 Commits

Author SHA1 Message Date
njoly
fb13fa89fd Add testcase data argument to all fstest helper functions.
Needed by pooka for puffs fstest support.
2010-07-13 15:50:31 +00:00
pooka
e9ce0fb090 make compile on HEAD 2010-07-13 11:53:47 +00:00
pooka
6463b41236 Add basic tests for vfsops.
tfilehandle is a test for PR kern/43605
2010-07-13 11:51:59 +00:00
pooka
5b92553888 Make the FSTYPE macros take tc instead of derivative type "type".
ok njoly
2010-07-13 11:12:19 +00:00
enami
5559382642 Make this compile again. 2010-07-13 01:42:21 +00:00
njoly
95f6e757bd Update filesystem helper functions namespace (from XXX_mount to
XXX_fstest_mount) to avoid conflicts with existing functions such as
puffs_mount.
2010-07-12 21:37:47 +00:00
njoly
e4723ab868 Pass down the test case data to the test function, to be able to use
meta-data informations such as srcdir. Requested by pooka.

While here remove fstype argument, and define it as a custom meta-data
(X-fs.type) instead.
2010-07-12 21:05:19 +00:00
pooka
84244a9f10 put stuff requiring -lpuffs behind -DPUFFSDUMP 2010-07-12 13:09:19 +00:00
pooka
373c282cc2 WARNS=2 2010-07-11 12:33:38 +00:00
pooka
a436045559 Add some basic tests for inactive/reclaim. To make this possible,
adjust the read/write shovel threads so, that we can tap into the
operations between puffs(9) and the file server.
2010-07-11 12:26:19 +00:00
pooka
3909f0ed5c Remove the lfs race condition hack now that it's properly in the
test instead of the fs-specific part.
2010-07-11 11:25:22 +00:00
mrg
6479f6e5b4 ldap is configured to depend upon MKCRYPTO no, so force MKLAP=no if
MKCRYPTO=no.
don't build pkg_install, libcrypto tests or rump_smbfs if MKCRYPTO=no.
mark librumpcrypto, rump_smb, pkg_*

fix set lists as appropriate.
2010-07-11 06:16:54 +00:00
jmmv
f8a35c46be Do not use awk to generate the test program. Use some eval magic to generate
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.
2010-07-10 17:28:36 +00:00
jmmv
b9866b6c00 Do not use awk to generate the test program. Instead, just expand the
code.

While doing this, split the big monolithic test program into more granular
but cohesive test programs.
2010-07-10 16:43:25 +00:00
jmmv
2c43c89bca Do not use awk to generate the test program. Instead, replace it with some
eval magic (which is less magic than the previous awk stuff).
2010-07-10 16:16:12 +00:00
jmmv
f6debdb0e0 Add xfail test case for PR bin/43597 that I just submitted. 2010-07-10 15:57:37 +00:00
njoly
14f486761f Get rid of home made filesystem type strings and use MOUNT_xxx ones
instead. While here provide some macros which do test for a specific
type.
2010-07-09 14:30:53 +00:00
njoly
136ff61968 Pass down the filesystem type to the test funtion to allow fs-specific
callpoints.

Adjust t_rmdirrace by moving LFS test specific code from common/lfs.c,
and do skip sysvbfs which does not support rmdir(2).

from pooka.
2010-07-09 14:16:05 +00:00
pooka
fbcc1c5736 fill in PR number now that we have one 2010-07-08 13:30:53 +00:00
pooka
df74e53708 Add LFS to vfs test list. TODO: start cleanerd too.
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
2010-07-08 13:21:02 +00:00
pooka
5544227ec7 Add test cases for file servers which present the root node not as
a directory but as a regular file, symbolic link (although that
can't be unmounted without killing the server!), fifo or character
device.
2010-07-07 10:49:51 +00:00
pooka
a8b198e2fa fix TESTSDIR 2010-07-06 16:44:26 +00:00
pooka
34edcf6bbe * need TESTSDIR
* remove force-fed -g
2010-07-06 16:43:48 +00:00
pooka
3d327ac6a6 NO ATFFILE HERE 2010-07-06 16:32:35 +00:00
pooka
42f6cd1ef7 Call rump_init() only after we have fork&exec'd the file server.
Otherwise the test would on rare occasions hang (I guess this was
due to calling sprintf/close between fork&exec in a threaded
program?).
2010-07-06 15:42:24 +00:00
pooka
81a57dd008 Add the most basic test for puffs(dtfs): mount/unmount. There's
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.
2010-07-06 14:44:29 +00:00
pooka
3626443e21 Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
2010-07-06 14:16:44 +00:00
pooka
7f396ca714 Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
2010-07-06 14:06:21 +00:00
pooka
83eca23e73 * fill PR number to xfail now that we have one -- let's try not
to add any xfail tests without an associated PR
* move xfail to the correct place
2010-07-05 17:12:48 +00:00
jmmv
9c8ebeed66 Use expect_fail instead of defining xfail. Looks like I missed this one
during the import of atf 0.10.  Thanks pooka@.
2010-07-05 16:34:41 +00:00
jmmv
e834f57d5e Properly mark some test cases as having a cleanup routine. Stupidity of
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.)
2010-07-05 16:27:08 +00:00
njoly
41df35f7e1 Fix more copyrights, where i forgot to add my name. 2010-07-05 14:53:03 +00:00
njoly
78043be0cf Fix copyright, noted by Jukka Ruohonen. 2010-07-05 13:03:19 +00:00
njoly
1511eb19e2 Add test program that use sample code from kern/41937, and fs rump
helpers to check currently supported filesystems.

t_rmdirrace (1/1): 5 test cases
    ext2fs_race: Passed.
    ffs_race: Passed.
    msdosfs_race: Passed.
    sysvbfs_race: Passed.
    tmpfs_race: Passed.
2010-07-05 12:53:58 +00:00
pooka
369e70628a descend into icmp 2010-07-04 19:31:30 +00:00
pooka
3665ca1dbf Add test case for PR kern/43548
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.
2010-07-04 19:30:59 +00:00
pooka
d2c2528c3b Add a test case for PR kern/36681 demonstrating how easy it is to
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.
2010-07-04 12:43:23 +00:00
pooka
44307e8d84 Improve previous a bit more: now it works correctly in all cases
with or without xfail.

There is still room for improvement, though: with xfail the
errno != EROFS branch does not report why open failed.
2010-07-03 13:37:22 +00:00
pooka
a8bfb4f650 enhance fail check 2010-07-03 12:23:04 +00:00
pooka
8da786abde Remove ufs mount where not necessary due to rumpfs now supporting
VOP_WHITEOUT.
2010-07-03 12:10:35 +00:00
pooka
4fbc020440 Add xfail tests for two cases described in PR kern/43560. 2010-07-03 12:08:37 +00:00
jmmv
56e49f7fbe Re-add PR number and expected failure condition (as a comment, because the
problem is resolved).  Per pooka's request.
2010-07-03 08:31:37 +00:00
jmmv
7562f3f929 Replace custom xfail settings with the new expected failure support in
atf 0.10.
2010-07-03 08:18:30 +00:00
njoly
24850d26c8 Small xfail testcase to exercise 48k ffs image mount, from problem
reported by Hubert Feyrer on netbsd-users@.
2010-06-30 21:54:56 +00:00
njoly
1bb5701860 Add helper code and macros to ease writing filesystem tests with rump.
Support currently limited to ext2fs, ffs, msdos, sysvbfs and tmpfs.
2010-06-30 20:39:39 +00:00
pooka
51f4669ad3 qemu has been fixed, so remove timeout
(not that it helped in the first place ...)
2010-06-30 16:37:12 +00:00
hannken
a377d2aa24 Test no longer fails with rev. 1.62 of src/sys/fs/union/union_vfsops.c. 2010-06-30 14:10:14 +00:00
pooka
73a09406dc xfail test for problem described in PR kern/23986 2010-06-29 15:25:28 +00:00
pooka
59b613aa00 xfail test for kernel panicky in PR kern/40688 2010-06-28 19:03:59 +00:00
pooka
61ee6255d1 add test for PR kern/43503 2010-06-28 09:45:06 +00:00