Commit Graph

68 Commits

Author SHA1 Message Date
mrg 8f5647d330 apply some -fno-strict-aliasing
XXX -- someone please fix this properly.
2011-06-29 02:36:13 +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
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
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 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
bouyer c6bd32e710 Test the right fd after rump_sys_open(). 2011-02-12 18:13:46 +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 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 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 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 71074032ea Set an extra xvar indicating MOUNT_FOO 2011-01-07 12:00:34 +00:00
pooka 604e46b650 antipasto 2011-01-07 11:58:21 +00:00
pooka c63717e4a5 add another fstype for ffs -o log 2011-01-07 11:52:59 +00:00
pooka 1c9b2b7d1e Don't panic if "unnecessary" dir already exists.
(helpful when running the test without atf-run)
2011-01-07 11:50:37 +00:00
pooka dbc0117ffb adjust another place where X-fs.type is set 2011-01-07 11:41:40 +00:00
pooka 6939ec24b6 Use our internal name instead of MOUNT_FOO to identify file system
since otherwise we now run into dupes (e.g. nfs and nfsro, puffs
and p2k_ffs).
2011-01-07 11:36:27 +00:00
pooka 764f692eba Add a puffs-p2k-ffs file system type to automated tests. Inspired
by the file handle problem in p2k.
2011-01-07 10:45:45 +00:00
pooka 1b60b72463 Introduce r/o tests. They do two mounts: the first one is r/w and
runs a generator which primes the fs.  The second one is r/o and
does the actual testing.  Also, introduce a nfsro fstype which does
a clientside r/w mount for a r/o server export.

requested by yamt

(one nfsro test currently fails with EROFS vs. EACCES.  Hopefully
someone else can debate the correct errno)
2010-12-31 18:16:41 +00:00
pooka 02c3d76e8b Sprinkle some KNF. No functional change. 2010-12-31 18:12:51 +00:00
pooka 9dec851430 Configure two network addresses for the nfs server. One exports
/myexport r/w to the client in the same subnet and the other one
exports /myexport r/o to the client in the same subnet.
2010-12-31 18:11:27 +00:00
yamt 9b72a3c9c6 don't assume atomic read/write on socketpair. puffs_kargs at least is
too large to assume atomic read/write.  this makes some tests including
fs/puffs/t_basic pass on my environment.
2010-12-29 22:56:59 +00:00
pooka e60986a223 Add rumpfs to list of file systems to be autotested. 2010-11-11 17:39:29 +00:00
jmmv decf2b5e0f Adjusts tests after import of atf-0.12:
- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
  unprivileged-user:_atf setting.  This probably deserves a fix somehow
  but I'm not sure at this point.
2010-11-07 17:51:16 +00:00
pooka dd96c7dab8 Make the shovel threads resilient to file server exit. 2010-11-01 16:27:07 +00:00
pgoyette 4b71a48296 Fix format strings so it builds on amd64 2010-10-31 22:33:16 +00:00
pooka bc79809067 Since rump implicit threads now bind to proc1 instead of proc0, we
need our shovel threads bound to proc1 instead of proc0 in order
to have access to the same set of descriptors as the implicit thread
which opens the fd in the rump kernel.

Also, sprinkle some printfs and make failure more dramatic.

fixes the puffs tests.  pointed out by pgoyette.
2010-10-31 22:05:35 +00:00
he 16b74f200d Do symbol renaming for these bits as well, so that we don't get
link-time errors caused by conflicts with normal user-space libraries
when we link statically.

The tests still pass for i386 after this set of changes, and this now
builds for sun2 (after a few more changes).
2010-09-23 09:38:14 +00:00
pooka 2a47331e63 update to new rump lwp/proc interfaces 2010-09-01 19:41:27 +00:00
pooka 26f689f095 Put the workaround for PR kern/43799 into the common nfs unmount routine. 2010-08-26 15:07:16 +00:00
pooka 478209477d include some necessary headers to fix build 2010-08-26 08:19:18 +00:00
pooka 6ec601c384 * fail with errnos
* in case unmount fails, call rump_pub_vfs_mount_print() to print
  mountpoint status and dump active vnodes.
2010-08-25 18:16:06 +00:00
pooka 721949c6da allow overriding of defaults 2010-08-09 19:32:26 +00:00
drochner 55e1e4c9f3 .PARSEDIR doesn't work. at least not for me. Use .CURDIR instead
which makes a build with objdir succeed.
2010-08-03 17:24:45 +00:00
pooka 272fb16e97 Fold the puffs private and vfs tests mount/unmount routines together.
To achieve this, add a file system private parameter to the newfs
method (which will obviously not be used by vfs tests).

njoly ok
2010-07-30 16:15:05 +00:00
pooka 89211c7274 Wait for child (rumpnfsd) to die before declaring unmount successful.
(yes, should be in delfs, but delfs doesn't work due to the cleanup hassle)
2010-07-30 10:23:26 +00:00
pooka 4f870da128 whitespace 2010-07-29 14:50:32 +00:00
pooka a963742ef4 Include & use lfs megamaid. 2010-07-29 14:47:44 +00:00
pooka 34eddb8c10 Rename xfs.c to fstest_xfs.c to avoid collisions with other
source files with the name xfs.c

ok njoly
2010-07-29 14:15:46 +00:00
pooka 0f9324ee3d Move nfstestargs to header "because I need them". A more sweeping
action would be good here.
2010-07-28 15:16:50 +00:00
pooka 5781e02fa3 Add FSTEST_CONSTRUCTOR/FSTEST_DESTRUCTOR which create/mount the
file system with default params.  Make ATF_FS_APPLY use the
constructor (can't use the destructor due to the (useless) cleanup).
2010-07-28 14:23:02 +00:00
pooka 4c4a775b33 Add for-fun cast ... no, not really. casting is never fun.
But now this code builds both on 5.0 and -current.
2010-07-26 18:51:02 +00:00
pooka 13a893ded4 retire unwieldy casts 2010-07-26 18:47:36 +00:00
pooka 2823460ad3 make unsignedness match 2010-07-26 17:53:21 +00:00
pooka 82233993ff Add NFS to the list of file systems exercised by the "vfs" tests.
How it works:
NFS tests fork and exec the nfs service from fs/nfs/nfsservice.
The child then:
  a) creates a FFS file system
  b) mounts it
  c) starts rpcbind
  d) starts mountd
  e) starts nfsd
  f) handles requests

The client, as expected, does the standard RPC regotiation and
calls mount(MOUNT_NFS).  It then proceeds to execute the test.

An individual test which executes everything described above and
does a few file operations on the NFS mount takes 0.16s wall time
on my laptop from start to finish.  This means it is feasible to
run hundreds of tests while still getting results in a timely
fashion.

Like in other networked tests, the two processes are connected via
the rump shmif which uses mmapped files as ethernet busses.  The
entire test suite can be executed by an unprivileged account.

As a side effect, these tests exercise also the kernel NFS server
in addition to the kernel NFS client.

While everything is currently targetted at executing the vfs tests,
there is no reason this could not be extended to exercise features
specific to NFS.  For example, the server can run through all
exportable file system types, permissions can be tested, etc.
2010-07-26 16:15:49 +00:00
pooka e0ac41f174 Add libc rpc bits modified to be suitable for testing the nfs
server & client.
2010-07-26 15:56:45 +00:00
pooka 522a0d0c47 catch "child died" 2010-07-26 14:53:52 +00:00
njoly 898bc4f345 Update ATF_TC_FSADD macro use ATF cleanup function. And call
xx_fstest_delfs() from here instead of test body.
2010-07-20 17:44:01 +00:00
pooka 1901d7bfe1 * namespace some macros under FSTEST
* inline atf_check_tc() since this is a header
2010-07-19 16:21:22 +00:00