Commit Graph

394 Commits

Author SHA1 Message Date
dholland f9735fd481 Reimplement repquota -x to print in tabular form instead of XML. 2012-02-01 05:12:45 +00:00
njoly dcea8cfc3c owner testcase now succeed with rumpfs. 2012-01-31 19:02:49 +00:00
njoly 8e54f08b1f Check directory write access for DELETE operation. And while here,
small indentation adjust.
2012-01-31 18:56:07 +00:00
njoly 24d0234070 unpriv owner test now pass for sysvbfs. 2012-01-27 21:53:50 +00:00
christos 1897181a72 From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
2012-01-22 18:36:14 +00:00
bouyer 9427679519 Make parts of the quota tests useable for more than quotas:
- rename h_quota2_server to h_ffs_server, there's nothing about quotas
  in there.
- extract non-quota parts of quotas_common.sh to ffs_common.sh
2012-01-18 20:51:23 +00:00
christos 6ac73dbd87 correct install dir 2011-12-21 01:56:16 +00:00
christos 013de02143 Add a test for the latest fifofs fix. 2011-12-21 00:17:06 +00:00
njoly 973e485533 Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.
2011-12-12 19:11:21 +00:00
njoly 826079e36b Remove expected failure now that PR/44708 is fixed. 2011-12-06 18:18:59 +00:00
plunky f65a48c2ec max WARNS is 4 2011-10-13 17:23:28 +00:00
njoly 7557af291b Slightly adjust skipped messages, makes output more consistent. 2011-10-08 13:08:54 +00:00
njoly 0a1fcf8f89 USE_OWNER -> USES_OWNER for consistency with other macros. 2011-10-08 13:00:55 +00:00
jruoho 354930c19a Point to PR misc/44708 when failing. XXX: Remove once the test is fixed. 2011-09-19 06:38:02 +00:00
plunky 2b8aaed8cd NULL does not need a cast, here 2011-09-16 16:13:16 +00:00
plunky 87d4f6076b Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is
a different kind of pointer.
2011-08-30 17:06:20 +00:00
riastradh 0ed1cdc740 Add test for `ln -s / foo && cd foo'. 2011-08-19 01:25:27 +00:00
riastradh 4b12d41728 No more xfail for PR kern/36681. 2011-08-18 21:44:55 +00:00
riastradh 772f45cfc9 Cache vattr in psshfs's setattr.
This means within the cache window, a setattr that wouldn't change the
remote file's attributes from our current view of them will not be
relayed to the server and wait for the server to answer.  Thus, e.g., a
process with a periodic timer interrupt that calls open(2) in a loop
can make progress with much higher probability than without caching.

XXX The test case doesn't work, so it's currently disabled.  It needs
to stop the child of sshd that is handling an sftp session, not sshd
itself, and it's not obvious how to do that.

ok pooka
2011-08-12 04:14:00 +00:00
uch 154297fd6a add ATF tests for v7fs. patch by njoly@. thank you. 2011-08-11 10:52:12 +00:00
hannken b80057eeb2 For devices, sockets and fifos ignore setting the file size to zero to make
open(..., O_TRUNC) happy and allow them to write through the lower layer.

Fixes PR #43560 (writing to null device in unionfs fails)
2011-08-10 06:27:02 +00:00
hannken 342315ffad Change union rmdir semantics to fail directory removal for
non-empty directories like all other file systems do.

Change test accordingly.
2011-08-07 06:01:51 +00:00
hannken efc3d2ec25 When union_lookup() creates a shadow directory and nameiop is not LOOKUP
it has to restart the lookup to get the componentname right.

Fixes PR #44383 (an endless stream of whiteout and opaque dir problems ...)
2011-08-05 08:17:47 +00:00
hannken e8c9988bef Make whiteouts work on journaling ffs file system by adding the missing
UFS_WAPBL_BEGIN() / UFS_WAPBL_END() around CREATE and DELETE ops.

Fixes PR #44377 (union whiteouts don't work on ffs -o log)
2011-08-03 10:03:51 +00:00
alnsn f60611afcd Don't assume that "first lock that blocks" is a lock with the lowest
start offset and change the test to work when F_GETLK returns any
lock that blocks.
2011-07-23 09:59:14 +00:00
hannken 9f9c02f1cd Even though msdosfs never truncates file names it advertises _PC_NO_TRUNC
as zero.  Make it advertise one (no_trunc == true).

Names longer than NAME_MAX (255) will never pass namei() btw.

Fixes PR #43670 (msdosfs claims support for filenames longer than {NAME_MAX},
                 but fails)
2011-07-20 11:52:00 +00:00
dholland 0d0aaf26a0 Remove nonexistent include directory from CPPFLAGS.
PR 45068 from Henning Petersen.
2011-07-19 03:30:46 +00:00
dholland 5b854a1a07 ffs and ffslog are no longer xfail. 2011-07-18 06:47:08 +00:00
mrg 8f5647d330 apply some -fno-strict-aliasing
XXX -- someone please fix this properly.
2011-06-29 02:36:13 +00:00
christos 360b33ff11 more fallout from rump_syscallargs.h including <signal.h> 2011-06-26 13:08:08 +00:00
christos 01c7e2ef5b ggr, how many of those I will need to fix. Fallout from the bogus inclusion
of <signal.h> in rump_syscallargs.h.
2011-06-26 13:06:00 +00:00
joerg afc8527716 Use proper format strings. 2011-06-16 15:33:24 +00:00
christos 2a18cea9f4 Turn warns on for all tests and fix all the bugs. 2011-06-11 18:03:17 +00:00
joerg 28050549eb Ignore warnings when building with clang for now. 2011-05-30 14:41:26 +00:00
martin 56a416ee80 Remove "expected failure" for tmpfs PRs that are now fixed. 2011-05-30 13:10:38 +00:00
haad 3c44b4003a Workaround problem with qemu where jot 100 produce garbage otput like this
93
94
:+
:,
:-
:.
:/
100

This can't be used as name of file, change jot cmd to work in all cases.
2011-04-21 22:26:46 +00:00
hannken fff1c84c3d Msdosfs on-disk meta data is not sufficient to create or validate file handles.
Maintain a tree of file handles, create nodes from msdosfs_vptofh() and keep
them until either the file gets unlinked or the file system gets unmounted.

Fixes the msdosfs part of PR #43745 (fhopen of an unlinked file causes problems
on multiple file systems)
2011-04-04 19:16:58 +00:00
plunky 370326ddcb reinstate #ifdef PUFFSDUMP around otherwise unused function
which requires symbols from -lpuffs, not linked
2011-04-04 15:42:42 +00:00
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
pooka 43c818f719 Add a test case for a r/o lower layer which attempts to create some
whiteouts and opaque dirs in the upper layer.  The sad news is this
simple test fails across the board.  It's pretty hard to figure
out how unionfs should work in $fs given that even the simplest
things don't work with ffs.
2011-01-13 10:33:01 +00:00
pooka 76c771d82c xfail for PR kern/44377 2011-01-12 22:42:24 +00:00
pooka 65d8e9cc2d Instead of hardcoding fs list just try to mount union and skip all
file systems which return EOPNOTSUPP.
2011-01-12 21:45:39 +00:00
pooka b23eef386e Move basic unionfs test from fs/union to fs/vfs and make it test
all whiteout-supporting file systems with the file system in question
as the upper layer.  Also, add an unlink to the test to see if
whiteouts are really working.

ffslog_basic is the test case for PR kern/44377
2011-01-12 21:13:26 +00:00
pooka afb452e673 Simplify test: there's no reason to mount 2x ffs. 2011-01-12 17:16:24 +00:00
kefren eea5c39883 add test for kern/43321, blessed by pooka@ 2011-01-11 14:03:38 +00:00
pooka 4665e3c895 need unrace-catcher for ffslog 2011-01-11 09:32:50 +00:00
hannken b89d0815aa Add layer_revoke() that adjusts the lower vnode use count to be at least as
high as the upper vnode count before passing down the VOP_REVOKE().

This way vclean() check for active (vp->v_usecount > 1) vnodes gets it right.

Should fix PR kern/43456.
2011-01-10 11:11:03 +00:00
pooka dac028c1ff Apparently the atf in the qemu runs doesn't like p2k_ffs and hangs
completely.  Remove it for until I have a chance to debug what's
going on.
2011-01-07 19:54:48 +00:00
pooka 409447038e xfail PR kern/44336 2011-01-07 12:18:25 +00:00
pooka 4ba41bccb2 Adjust atf_check_type() to make it work again.
Do we need tests for the tests? ;)
2011-01-07 12:16:17 +00:00
pooka 6bafd757e5 use X-fs.mntname for f_fstypename. ignore p2k_ffs there. 2011-01-07 12:01:11 +00:00