Commit Graph

315 Commits

Author SHA1 Message Date
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
hans
846cca4cda Revert to 1.1 and fix the casts by using uintptr_t. Ok jruoho. 2010-07-29 12:56:16 +00:00
jruoho
f560676c53 One more cast. 2010-07-29 12:17:31 +00:00
jruoho
07456be22e Fix build failure on AMD64, noted by njoly@. 2010-07-29 12:03:10 +00:00
jruoho
b226f3d0e3 Add a simple test for pthread_join(3). 2010-07-28 21:29:15 +00:00
pooka
862a7ebf2c install to right place. from pgoyette 2010-07-28 19:23:01 +00:00
pooka
6d749c2c28 Add test for service interruption while mountd handles SIGHUP.
This is an xfail test for the problem described in PR kern/5844

per highly surreptitious nudge from mrg
2010-07-28 15:24:54 +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
ce798b3d87 Defer definitely-nonreentrant signal handler to thread context.
This protects from rump kernel reentry and makes things not
crash && burn.
2010-07-28 15:15:22 +00:00
pooka
0d8d8d2b19 Make sure we are not executed in non-debug mode (which forks). 2010-07-28 15:12:17 +00:00
pooka
1411ba67f8 Don't ignore SIGHUP here since mountd uses it. The mountd signal
handler is installed later, so technically this is unnecessary,
but try to be complete.
2010-07-28 15:11:30 +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
joerg
cee90d4c4c Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
2010-07-28 13:51:38 +00:00
macallan
7a5d0aeabe initialize a few variables to shut up compiler warnings 2010-07-27 14:04:47 +00:00
pooka
3dd552295f comment out lp64-offensive line (the syslog() calls are not used currently) 2010-07-26 19:24:35 +00:00
pooka
f64ec08558 Install the exports file too so that the server can find it. 2010-07-26 19:17:37 +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
ee762b35da need to link in nfs client bits 2010-07-26 16:25:19 +00:00
pooka
fd87d4c523 fix TESTSDIR 2010-07-26 16:17: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
25f5a6a3a9 Add NFS service suitable for use in testing. 2010-07-26 15:53:00 +00:00
pooka
522a0d0c47 catch "child died" 2010-07-26 14:53:52 +00:00
pooka
3c23c993d0 Remove stuff handled by common code now. 2010-07-26 14:10:31 +00:00
pooka
6b62441252 Calculate broadcast IP instead of requiring it as a config parameter. 2010-07-26 14:07:04 +00:00
njoly
dccf0d483f Add create and rename testcases to exercize filenames longer than
{NAME_MAX}.
2010-07-26 13:37:48 +00:00
pooka
0f32fbbadd use normal include-protection 2010-07-25 22:29:15 +00:00
pooka
e8fbc2f15e necessary headers 2010-07-25 22:28:48 +00:00
pooka
3185d2a443 Add xfail test for kernel diagnostic panic described in PR kern/43664 2010-07-25 21:42:08 +00:00
pooka
772871ea1c make interface/routing configuration a bit more generic 2010-07-25 21:39:20 +00:00
jmmv
8a0380e301 before_start_one_thread is not racy only in amd64; my confusion. Mark it
as an xfail everywhere and, while doing so, make the test longer so that
we trigger the failure all the time -- of course, being a race this may
still happen but the chances should be pretty low.
2010-07-21 17:23:08 +00:00
pooka
3ccd6a8fda support pathconf (more or less copypasted from ufs). for njoly's tests. 2010-07-21 06:58:25 +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
58f45c4ce6 common cannot be a TESTS_SUBDIR, since one of those without a test
behind it confuses atf-run.  change to SUBDIR as hinted by jmmv.
2010-07-20 15:09:32 +00:00
pooka
7d8af8c741 Need to use the ${PRINTOBJDIR} trick for LIBISPRIVATE ... 2010-07-19 16:32:01 +00:00
pooka
cca4b54ef7 Include h_fsmacros instead of ffs.c and link in test lib. 2010-07-19 16:22:05 +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
pooka
370c9ab597 Convert the file system test common routines into a library to
facilitate more complex user-side stuff (like the lfs cleaner and
nfs rpc code), which are non-trivial to do by #include.
2010-07-19 16:09:07 +00:00
pooka
95cbf37326 add missing headers 2010-07-19 16:00:45 +00:00
pooka
55cb844525 convert to newstyle automagic rump compat syscalls 2010-07-19 15:35:38 +00:00
jmmv
28cce38f11 Split the before_start test in two: one that does not use threads and one
that does.  The former works all the time but the latter gets consistently
stuck on amd64.  Mark the latter as an expected timeout (should be a "race
condition" test, but atf does not have such a thing yet[1]).

This clears the test failures, at least, under anita running NetBSD/i386.

From pooka@: this could well be because calling sem_post(3) from a signal
handler can't possibly do the right thing with the pthread implementation.
However, according to signal(7), sem_post(3) is signal-async safe...

While here, program alarms using a timeout shorter than 1 second to speed
up the execution of the tests.

1: Good thing is I finally understand what a "race condition" test looks
like, I believe.
2010-07-19 10:31:46 +00:00
jmmv
e1c433700e Refactor this test program: make test cases more granular, use atf_check
to validate the execution of sort(1) and do not bother removing temporary
files.

This is in preparation to merge the tests for sort(1) that still live in
regress/usr.bin/sort/stests.
2010-07-18 22:58:14 +00:00
pooka
510b2ec795 Reduce sleep time for practically the same effect. Until atf can
do parallel test execution, tests which spend 99.9999% of their
execution sleeping are not nice.
2010-07-18 22:30:55 +00:00
pooka
1d14124dd5 fix routine name in error message 2010-07-18 12:43:22 +00:00
jmmv
cb5d4b0864 Convert the libobjc tests to atf. While doing this, make the tests actually
check that things work.
2010-07-18 12:41:51 +00:00
jmmv
2f0d388071 Remove the ATF_CHECK calls I added during the conversion of this test to
atf.  They break on i386 (because the test was conceptually broken anyway);
reported by pooka@ in private mail.

Now... the current test does not actually check anything AFAICT... but this
is how it was before.
2010-07-18 12:16:19 +00:00