Commit Graph

222 Commits

Author SHA1 Message Date
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
pooka
2327d76dfc If kernel modules are set to autoload, skip the vfslist part of
the check when determining if there is kernel support for a given
fs.  Makes tmpfs tests run and fixes PR misc/43304.
2010-06-23 11:19:17 +00:00
pooka
2f312a0c44 check etfs mappings with offsets 2010-06-21 14:39:35 +00:00
pooka
ec25c2dafe Check that etfs block mapping works for >2TB devices. 2010-06-20 17:43:33 +00:00
pooka
18f65594ec ... and remove the not-supposed-to-be-committed call to rump_sys_reboot() 2010-06-19 13:44:11 +00:00
pooka
b7c691f4b9 fix pasto, sprinkle ATF_REQUIRE_EQ()
ATF_REQUIRE_ERRNO, oh ATF_REQUIRE_ERRNO, wherefore art thou ATF_REQUIRE_ERRNO?
2010-06-19 13:43:29 +00:00
pooka
6457f5fabe add test for block device support 2010-06-19 13:40:09 +00:00
pooka
de8c66c7a5 * remove pasto
* set short timeout for the blockwait test
2010-06-17 09:37:50 +00:00
pooka
c6b3a389bf tp_glob -> tp-glob (i.e. better use correct keywords ..) 2010-06-17 08:31:20 +00:00
pooka
1647962cb4 Add simple etfs test which almost tests for bug fixed yesterday
(the yesterday bug was against an emulated block device, so slighlty
different).  But at least this test uncovered a few bugs already.
2010-06-16 19:29:33 +00:00
pooka
4c4df11b4b Fix test: we need to mount /dev/pts to /null/dev/pts, not /dev to
/null/dev: we're interested in /dev/pts and nullfs doesn't traverse
underlying mountpoints.

(I had code for nullfs mountpoint traversal in the tree i used to
test this originally... but I assume the rest of the world doesn't.
Before this change the test would still fail, but fail in the wrong
place and due to the wrong reason.)
2010-06-16 15:57:11 +00:00
pooka
a17a919421 Set xfail for tests which have a PR for them. 2010-06-16 15:39:41 +00:00
pooka
e094e235ab add a vm allocator test which tests that:
* RUMP_MEMLIMIT works
* allocating memory with PR_NOWAIT will fail immediately if no memory
  is available and PR_WAITOK will wait for memory to be available
2010-06-14 21:06:09 +00:00
pooka
08fa5b6e7e annotate failing testcase with PR number 2010-06-14 16:12:41 +00:00
pooka
0420748b8f Descend into ptyfs tests now that the necessary rump components are there. 2010-06-14 14:51:41 +00:00
pooka
7bf6b262ee Function which does not return needs to return a value. 2010-06-12 22:59:59 +00:00
wiz
8506af6473 Fix typo in comment. 2010-06-12 15:01:04 +00:00