Commit Graph

254 Commits

Author SHA1 Message Date
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
pooka
ab4e506810 Connect to localhost instead of www.netbsd.org to a) make this work
in non-routed setups b) avoid the dubious security implications.
Also, to make the test actually do what it claims to do, call
getsockname() and verify we got a low port.
2010-06-12 14:31:29 +00:00
pooka
f896df40fc tp-glob t_* instead of * (so that atf-run works in the source directory) 2010-06-12 14:18:21 +00:00
pooka
062f78a69a Skip failing tests. When someone figures out where the problem is,
these can be reenabled.
2010-06-12 14:07:18 +00:00
pooka
4b7b7791c8 Fix silly test. First it tests that it can't "cd ..", then it
wants to "cd .." to complete the test.  CANNOT HAVE BOTH!
2010-06-12 13:31:35 +00:00
pooka
8e2bcc78c9 fix diagnostic output 2010-06-12 13:15:54 +00:00
pooka
7971a93d6c Make the test work on an installation without sharesrc. 2010-06-12 13:15:01 +00:00
pooka
f1809fcd66 Add some ptyfs tests.
Note: I'm not adding these to the build yet, since they depend on
some other other cleanup I might get done only after the weekend.
Even so, t_nullpts serves a simple example of how to repeat the
crash described in PR kern/43456 (just remove "rump_sys_" from the
calls and it should compile and you should get a host kernel panic
instead of a coredump).
2010-06-11 23:52:38 +00:00
pooka
181ba286cb Make tests operate in environments without /usr/share/dict/words,
such as the one used by "anita test".

This has also the added benefit of decoupling the tests from whataver
is in "words", should that file ever be updated.
2010-06-10 23:49:48 +00:00
pooka
693b5f6213 quote PR kern/43452 in descr 2010-06-10 22:20:38 +00:00
pooka
b2077c0c11 Add tests for semaphores. Note: the "unlink" one fails because our
implementation is broken.  I'll file a PR shortly.
2010-06-10 22:03:43 +00:00
pooka
b3d299c410 Catch up with whitespace changes in df.c rev 1.79 from over 2 years ago! 2010-06-10 15:44:44 +00:00
pooka
5c21ec6fa6 Add a test which checks autoloading modules from the host's
/stand/arch/vers/kmods works in rump (and that the result is usable ;).

On i386 this "just works".  For amd64, due to -mcmodel=kernel,
things are a little more complicated.  We must have the entire rump
kernel loaded in the lower 2GB.  Currently, this can be done either
by using the non-PIC version for the rump kernel compiled with
-mcmodel=small, or, as njoly pointed out, using netbsd32, which
causes vm_default_addr() to give something in the lower 2GB and
therefore shared libs "magically" getting loaded there.  I guess
it would be possible to put a suggested vaddr into the rump kernel
libs and make ld.elf_so map memory from the suggested address if
present ... but that's another show.

Also thanks to tron for access to an amd64 so that I could verify
the test works.
2010-06-09 12:35:45 +00:00
pooka
ee5ea4a164 ``twistymount'' regression test for scenario described in PR kern/43439 2010-06-09 08:37:16 +00:00
pooka
9eda5fdbbb Use rump component libs on all platforms. I'll add kernel module
autoloading as a separate test later.
2010-06-08 10:43:40 +00:00
riz
b8ec406166 Remove a test (that a created directory had a predictable inode number)
that no longer makes sense since the vmlocking2 branch was merged.
2010-06-07 03:43:50 +00:00
riz
94a47d543f Use atf_check to su in a couple cases, to make the test failure
easier to understand when the unprivileged user has /sbin/nologin
for a shell.
2010-06-07 03:39:41 +00:00
dholland
319ed136d2 Document the changes in the previous version of this file. If we're
going to whitewash the test failures, we should at least keep track of
what the "real" correct behavior/output is. Especially since a large
portion of the tests in here were added specifically to illuminate
points at issue in prior discussions.
2010-06-06 04:51:13 +00:00
dholland
b324463ca0 Add a very basic test and some tests for the problem in PR 43358.
XXX: the sort tests in src/regress should be folded into this
2010-06-05 22:38:39 +00:00
jmmv
6b84fb92ac atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory.  The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.

Define use.fs=true for all those tests requiring it.  (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
2010-06-04 08:39:40 +00:00
christos
f501e758b3 Pass all the set -e tests. 2010-06-03 16:06:19 +00:00
pooka
999c22b60a need bsd.own.mk to avoid the "NETBSDSRCDIR is nothing" syndrome 2010-05-31 23:53:02 +00:00
pooka
0854573c60 hmm, using unifdef for the previous might have been a good idea ... 2010-05-31 23:51:28 +00:00
pooka
104b695ac0 Now that atf gdb/coredump conflicts have been solved (thanks jmmv!),
remove USE_ATF ifdefs.
2010-05-31 23:44:54 +00:00
pooka
9b9ff1afec add tests for:
* threading
 * tsleep variants
 * uvm page busying and wanting
2010-05-31 23:36:12 +00:00
pooka
9a7330494a Add some kernel namespace (i.e. _KERNEL) helpers for regression tests. 2010-05-31 23:32:50 +00:00
dholland
3f2b5f0ddd Requires <sys/param.h>. 2010-05-30 06:09:17 +00:00
dholland
8f40ab4ef3 Use PATH_MAX instead of MAXPATHLEN and include limits.h. 2010-05-30 05:35:48 +00:00
pooka
d377aeaac4 test extattrctl kernel panic (kern/43328) 2010-05-21 16:47:45 +00:00
jruoho
339c78d7ee Add a simple test for timer_create(2) / sigevent(3).
Case for SIGEV_THREAD commented out.
2010-05-19 19:17:08 +00:00
jmmv
0c7618681c Fix execution of the installed tests by using h_{simple,args} as program
names, without the .sh extension.
2010-05-04 09:33:57 +00:00
pooka
90512ff195 convert to ifdef USE_ATF 2010-05-01 12:11:53 +00:00
pooka
cdf297bb01 Disable module autoload so that it won't foil our module unload test. 2010-05-01 11:20:21 +00:00
pooka
0714e24da4 fix !USE_ATF 2010-05-01 10:46:29 +00:00
pooka
ebcc5a9913 fix !USE_ATF case 2010-05-01 10:43:31 +00:00
pooka
c4e2577190 Undo infamous "mad \"scientist\"" experiment. There is no need
for complicated application frobbing to get a kernel module loaded
into rump -- it will be loaded from the host automatically now.
2010-04-26 23:47:25 +00:00
pooka
2f75110c81 Add bpf program source in a comment. 2010-04-21 11:19:44 +00:00
pooka
513ca2875b Check that bpf doesn't accept programs with divide-by-zero in them.
Example filter from Guy Harris via PR kern/43185.
2010-04-21 11:07:34 +00:00
pooka
27b6b96670 Add the typical #ifdef USE_ATF stuff so I can debug the test if it
goes wrong.
2010-04-16 14:05:32 +00:00
pooka
994e33429b Build & install msdosfs snapshot test and deal with the happy happy
joy joy setlistdist etcetc. stuff.
2010-04-13 10:27:52 +00:00
pooka
33304497d7 Add msdosfs snapshot test. This one just slightly different from
the ffs test because msdosfs doesn't support VFS_SNAPSHOT, only
VFS_SUSPEND, i.e. we need external storage for the snapshot instead
of internal storage.
2010-04-13 10:21:47 +00:00
pooka
0d66aa2889 Split snapshot test into fs-independent backend and fs-specific frontend.
I really wish all our fs tests were like this (in principle, that
is.  I'm not talking about this hacky implementation).  I've been
wishing this for quite a few years now.  Seems like my wishes don't
come true.
2010-04-13 10:19:25 +00:00
pooka
a9ac6f044d move check next to operation 2010-04-12 23:15:24 +00:00
pooka
5af2edd9e6 test for the very basic snapshot features 2010-04-12 22:58:53 +00:00
pooka
344e2f2f16 Following nullfs, rename rumpfs_umapfs to rumpfs_umap to make the
basename the same as the kernel module (this too was in-tree only
for a little over a week with the old name).
2010-04-11 05:45:57 +00:00
pooka
b764352d60 Rename librumpfs_nullfs to librumpfs_null to make the basename the
same as with the kernel module (and hence MOUNT_NULL).

I added the old name to the obsolete list, but given that it was
in-tree for only a bit over a week, I'll remove the entries in a
few weeks.
2010-04-10 21:32:59 +00:00
pooka
986be8ce69 Add some basic tests for kernfs (getdents & changing hostname).
Per a "mad \"scientist\"" experiment, on i386 load kernfs support
from the installed kernel module instead of linking the driver in.
2010-03-31 19:14:30 +00:00
njoly
055c56a77b Use tp-glob keys when requesting for test pattern. 2010-03-31 18:40:26 +00:00
njoly
d7b0a6276c The Atffile tp/tp-glob keys does not allow more than one word. Put new
union value on its own line.
2010-03-31 18:37:06 +00:00
pooka
08910e9e3d anti-pasto 2010-03-30 01:40:29 +00:00
pooka
afe21a63b7 Add basic test for umapfs functionality.
XXX: the reverse mapping case (last subsubtest in t_basic) does
not make any sense, but apparently that how umapfs works.  I'm not
familiar enough with the code to determine if this is a wanted
feature or a pure and simple bug.
2010-03-30 01:05:28 +00:00
pooka
d32fe93431 Basic test for nullfs, which just checks that the two views act
somewhat sensibly.
2010-03-30 01:02:47 +00:00
pooka
9e4e4976ad Add basic union test. 2010-03-29 18:19:19 +00:00
pooka
b501712ab5 regression test for fifos on ffs
XXX: same test apart for mount/unmount could be used on other
fifo-supporting file systems (r/w support required, though).
2010-03-29 13:26:32 +00:00
jmmv
2c2857e920 Add some basic tests for rc.d scripts to validate the execution of
subcommands and the optional argument passing to them from the command
line.

Triggered by the modification of the run_rc_command function in rc.subr
to allow passing in extra parameters to the commands defined in rc.d
scripts.
2010-03-15 19:03:08 +00:00
pooka
05e0f1dba9 Update to use newstyle rump_module interfaces. 2010-03-05 18:49:30 +00:00
martin
5d2d1246bd remove "string" directory for now, it isn't installed 2010-02-28 11:06:59 +00:00
martin
163086bd7a Disable population count test for now, please re-enable once
PR toolchain/42885 is fixed
2010-02-26 09:35:08 +00:00
mlelstv
10019347da filesystems now use getdisksize() which is in librumpdev_disk. 2010-01-31 14:30:22 +00:00
pooka
da8d545fb8 msdosfs depends on disk devices now 2010-01-25 19:27:24 +00:00
joerg
1ca41e3237 Add a regression test for the SHA2 family that also checks for unaligned
accesses.
2010-01-24 21:12:17 +00:00
pooka
b3a218f0ac Must use CMSG_SPACE instead of CMSG_LEN for control message buffer.
Fixes test on sparc64 (and possible other alignment-picky ports).
from mlelstv
2009-12-18 21:24:13 +00:00
mrg
fa38305b2e avoid most of the SUBDIRs if MKATF == "no". 2009-12-15 03:01:48 +00:00
uebayasi
75fe826dc9 CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}. 2009-12-08 15:20:20 +00:00
he
dcac85a1b9 It seems that LDADD.file gets added to the linker invocation after
the LDADD variable expansion.  To support static linking, ensure
that the common libraries gets tacked on at the end as well (order
matters for static linking), by using a convenience variable and
add it to the end of LDADD.t_modlinkset, as well as when doing the
general LDADD+= setting.
2009-11-28 22:20:38 +00:00
pooka
62b34668ef Since rumpfs has supported file system sockets for quite a while
now, we don't need tmpfs here.  But, rumpfs doesn't support regular
files, so pass a pipe descriptor instead of an open file fd.
2009-11-26 17:33:23 +00:00
pooka
9311e97e8c Don't use LDADD.progname because it duplicates all the libs. 2009-11-25 16:17:11 +00:00
pooka
aebec17a03 WARNS=4 2009-11-06 15:26:54 +00:00
pooka
5ffd8be0f2 rump_module -> rump_pub_module 2009-11-06 15:25:52 +00:00