Commit Graph

306 Commits

Author SHA1 Message Date
hannken
032b3dee5f Fix file handle operations for tmpfs by removing a now bogus test and
fixing the return value of tmpfs_fhtovp() in the not-found case.

When vmlocking2 was merged to head (Jan 2008 !!) the inode numbering was
changed.  Before inodes were numbered 2..tm_nodes_max-1 and after the
merge the numbers are derived from the nodes memory address.

Fixes PR #43605 (tmpfs file handles are broken)
2011-04-02 14:24:53 +00:00
hannken
5515232cfd Make zero length symlinks work on tmpfs.
Fixes PR #43843 (tmpfs dies with kassert panic for 0 length symlink target)
2011-04-01 17:40:54 +00:00
pooka
471b2e43aa Make sure test doesn't pass if file system could not be read at all. 2011-03-31 12:56:03 +00:00
jmmv
27486724f4 Prevent failures from cleanup routines. Do so by only attempting to do the
cleanup if the test case did not succeed (as, when it succeeds, the cleanup
has already happened).
2011-03-24 21:52:51 +00:00
jmmv
9a17a325dd Remove unnecessary (and broken) cleanup routines.
The cleanup routines were being used to kill the rump process and to delete
the temporary image file.  These are things automatically done by atf-run,
but it looks like this code was added here to workaround a previous bug in
the atf-run code.

Note that, in the existing form, the cleanup routines segfault (haven't
spent the time to track down why).  atf-run does not care about this
(although it should), buy Kyua does.

As a side effect, this has a teeny-tiny performance speedup in the execution
of the tests including this file.

OKed by njoly@.
2011-03-22 16:50:16 +00:00
hannken
d8c44cec40 Remove a vnode reference leak from msdosfs_rename. Release tdvp if either
doscheckpath() or relookup() fails.

Adjust test fs/vfs/t_vnops.c and remove the link count test for msdos.

Fixes PR #44661
2011-03-19 20:05:21 +00:00
jmmv
cfadf0aa6e Remove hack introduced in revision 1.6 to workaround a bug in atf-run that
would cause it to lock up while waiting for the p2k_ffs_fillfs test case
to complete (in some cases only).

This has been fixed by the upstream revision
3dd2481ec97b2fde76521939b6451d03ce989745 which I have just pulled into
our copy of atf.
2011-03-17 19:48:37 +00:00
pooka
bc1269c4f5 Apparently this way of triggering the msdosfs rename vnode leak
does not bite every time (most commonly observed on the amd64/qemu
runs), so add a race condition catcher.
2011-03-14 19:05:19 +00:00
bouyer
fa4ca53da4 Add a test for rpc.rquotad(8) 2011-03-12 14:03:38 +00:00
bouyer
577c32edc7 Add support for multiple rump servers in shutdown and cleanup 2011-03-12 13:43:58 +00:00
pooka
2385406381 Add one simple test case which checks that zpool create results in
a mounted file system.  Then run away as quickly as possible.
2011-03-10 20:02:26 +00:00
tron
4339a30cbc Don't descend into non-existing subdirectory "clients". 2011-03-09 20:13:47 +00:00
bouyer
37628c8c74 Use librumphijack for quota commands instead of rumpifed versions. 2011-03-09 19:04:57 +00:00
enami
08376a9153 Fix link error. 2011-03-07 03:29:26 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
pooka
951e801a6b Add a race catcher for p2k_ffs renamerace -- it seems like the
problem doesn't trigger always especially in a qemu env (but triggers
100% of the time on my desktop).
2011-03-06 16:00:16 +00:00
pooka
172587ab09 Add a kludge to prevent a test run from completely hanging.
Some analysis:

1) p2k_ffs test program opens a socketpair and forks off rump_ffs
2) after mounting the file system, test program decides it
   wants to skip the test and exits
3) somehow, the puffs event thread of rump_ffs stays in kqueue
   waiting for activity.  fstat+gdb suggests it's waiting for the
   now-orphaned socketpair (but I didn't fully verify.  is there
   an easy way to dump the state of a kqueue descriptor?).
4) test program is a zombie
5) atf-run waits forever

Note: this doesn't trigger always.

So, it seems there are at least two bugs: 1) test case doesn't
timeout 2) the kevent call in rump_ffs never returns even though
the sockerpair is orphaned

So, explicitly unmount the file system before skipping the test.
Obviously the above bugs needs to be properly fixed, since other
skipping test cases can unbeknowingly trigger the issue.
2011-03-06 10:33:40 +00:00
pooka
f8a62255a4 Put p2k_ffs back there -- i can't repeat any problems in my qemu/anita
runs.
2011-03-05 20:56:28 +00:00
pooka
4adfadb23c chown the workdir to unpriv user instead of chmod 711. Otherwise,
if your (root's) login shell is {t,}csh, su -m gets outoutsmarted.
2011-03-05 07:41:11 +00:00
pooka
814186ded7 The re-enabled renamerace test also triggers the recent msdosfs
vnode leak.  xfail this under the blanket of PR kern/44661.
2011-03-03 11:01:27 +00:00
pooka
61dcfafee6 Apparently my last commit to msdosfs_vnops.c fixed the (harmless?)
buffer overrun in rename (>15 years old bug), so re-enable other
msdosfs rename tests too.
2011-03-03 10:57:30 +00:00
pooka
1939d9d97e msdosfs xfail for PR kern/44661 2011-03-01 20:16:33 +00:00
pooka
bb225c94f3 xfail dir_rmdirdotdot for tmpfs (PR kern/44657) 2011-03-01 15:33:35 +00:00
pooka
da0742f9b8 Reset node's parent pointer when it's removed. Technically the
parent still exists, but allows us to avoid complicated g/c algorithms
if the parent *is* removed.
2011-03-01 15:14:35 +00:00
pooka
878d41e6e9 Rmdir the dir you're in and its parent and try to cd ..
Fails on tmpfs (crash), puffs (cd .. succeeds) and rumpfs (cd .. succeeds).

another testcase derived from the bugfinding genious of Taylor R Campbell
2011-03-01 15:04:47 +00:00
pooka
8a3bb78f03 Comment out msdosfs skip -- i'm not sure if it will still fail with
the "stack size" problem, but at least it fails due to yet another
refcounting snafu in the msdosfs rename method.
2011-03-01 14:27:32 +00:00
pooka
1157445be6 augment rename test case with the failure from PR kern/44288 2011-03-01 14:21:46 +00:00
pooka
c87fb89aa0 make netcfg produce sensible results in a non-atf env 2011-02-28 21:21:14 +00:00
pooka
ab076a3e59 g/c use of unused variable too 2011-02-28 21:08:46 +00:00
pooka
cb7e71e280 g/c unused variable 2011-02-28 21:08:13 +00:00
pooka
d7421024b5 bump nfdsargv[] size belatedly (and add a few extra for needs of future bugs) 2011-02-28 21:03:15 +00:00
pooka
6ae16092a5 Add simple test case for access(2), including panicky scenario from
PR kern/44648.
2011-02-28 03:40:45 +00:00
njoly
3b61a87b12 Add a small testcase that shrink a file using 2 consecutive ftruncate
calls.
2011-02-27 15:16:31 +00:00
martin
0d52446307 Remove xfail for sparc64, alignement issues have been fixed 2011-02-25 20:54:18 +00:00
pooka
899e147859 adjust location of xfail in previous for more accuracy 2011-02-24 17:29:48 +00:00
pooka
66864f8999 xfail PR kern/44631 on sparc64 2011-02-24 17:26:46 +00:00
yamt
0aabb9242a add some tests 2011-02-22 21:23:19 +00:00
pooka
02b6060dda make the timeouts a bit more generous for really slow systems 2011-02-22 18:41:04 +00:00
pooka
91971b5261 Skip instead of fail test if tmpfs cannot be mounted and the
error is "Operation not supported".

makes the tmpfs tests produce a sensible result on platforms where
tmpfs is not available (such as the hpc* test runs)
2011-02-21 10:14:29 +00:00
pooka
7e9c3f5ca7 Add test case for /->: conversion from PR kern/44523 by
Taylor R Campbell.

I adjusted the test to uudecode + bunzip2 the supplied image, and
removed the "null-finder" from the dirent code, since it had an
off-by-one which made the test fail.
2011-02-18 13:07:54 +00:00
bouyer
c6bd32e710 Test the right fd after rump_sys_open(). 2011-02-12 18:13:46 +00:00
pooka
bec0b44f57 Use sshd's pidfile instead of $! and wait for the pidfile to appear.
This plugs a race condition where sshd did not have a chance to
open a sucket before we attempted to connect to it.
2011-02-11 13:19:46 +00:00
pooka
9285c5cc41 update /dev/null rump minor to make test pass again 2011-02-10 20:10:54 +00:00
njoly
96506c0e2a Do initialise allocated file system args structures for puffs and nfs
(fix some puffs tests failures with MALLOC_OPTIONS=J).
While here, detect and report args allocation failure.

ok from pooka.
2011-02-10 16:35:01 +00:00
pooka
6ebb7d5324 add a few overwrite-related tests 2011-02-02 14:42:15 +00:00
njoly
9634a49aaa Now that PR/44302 is fixed, fs/vfs/t_ro:sysvbfs_rmfile should not fail
anymore.
2011-01-31 18:53:29 +00:00
pooka
e8bcfa54fd Add test case for F_GETLK pid-oddness from PR kern/44494.
I found the test case a little difficult to understand (because of
many indices), so I added a few more comments after I think I
figured out what was going on.
2011-01-31 10:01:26 +00:00
martin
2f62f26a09 Fix off by one that made most of these tests die with a bus error in the
sparc64 runs.
2011-01-15 20:16:57 +00:00
pooka
e05c64d657 wrap system() in SIG_DFL so that child-bearing fs tests (puffs,
nfs) don't go cuckoo when the process executed by system() takes a
backstage left.
2011-01-13 12:55:19 +00:00
pooka
d83ec60314 xfail PR kern/44383: whiteouts are generally speaking kaput 2011-01-13 11:00:19 +00:00