Commit Graph

419 Commits

Author SHA1 Message Date
pooka df74e53708 Add LFS to vfs test list. TODO: start cleanerd too.
It fails in a number of different ways.  Some of them seem to appear
as a function of the file system size (i'm not sure if it's because
the lack of the cleaner or not.  i'm guessing ``no'', though).

ok njoly
2010-07-08 13:21:02 +00:00
pooka 5544227ec7 Add test cases for file servers which present the root node not as
a directory but as a regular file, symbolic link (although that
can't be unmounted without killing the server!), fifo or character
device.
2010-07-07 10:49:51 +00:00
pooka a8b198e2fa fix TESTSDIR 2010-07-06 16:44:26 +00:00
pooka 34edcf6bbe * need TESTSDIR
* remove force-fed -g
2010-07-06 16:43:48 +00:00
pooka 3d327ac6a6 NO ATFFILE HERE 2010-07-06 16:32:35 +00:00
pooka 42f6cd1ef7 Call rump_init() only after we have fork&exec'd the file server.
Otherwise the test would on rare occasions hang (I guess this was
due to calling sprintf/close between fork&exec in a threaded
program?).
2010-07-06 15:42:24 +00:00
pooka 81a57dd008 Add the most basic test for puffs(dtfs): mount/unmount. There's
still a lot of work to do here, but I want to get to testbuilding
the tree ;)

TODO examples:
* integrate this with rump_syspuffs (and remove the stupid ``sys'' from there)
* integrate with njoly's fs-independent tests
* cleanup a lot
* write more tests

*sigh*, I wish we'd had testing tools like this 5 years ago when
I was writing puffs.  It would have made a lot of things a lot
better and a lot easier.
2010-07-06 14:44:29 +00:00
pooka 3626443e21 Move the Delectable Test File System from share/examples/puffs/dtfs
to tests/fs/puffs/h_dtfs.

No functional change (apart from adjusting the Makefile for test builds).
2010-07-06 14:16:44 +00:00
pooka 7f396ca714 Move tests psshfs from fs/puffs to fs/psshfs. The former is going
to be populated by tests which actually test puffs soon.

jmmv ok
2010-07-06 14:06:21 +00:00
pooka 83eca23e73 * fill PR number to xfail now that we have one -- let's try not
to add any xfail tests without an associated PR
* move xfail to the correct place
2010-07-05 17:12:48 +00:00
jmmv 9c8ebeed66 Use expect_fail instead of defining xfail. Looks like I missed this one
during the import of atf 0.10.  Thanks pooka@.
2010-07-05 16:34:41 +00:00
jmmv e834f57d5e Properly mark some test cases as having a cleanup routine. Stupidity of
the API?  Most likely; will revise it.

Fixes atf-run breaking when running t_psshfs.  This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think).  (I'm now wondering
if atf should be bothering about unmounting stuff at all.  Maybe not. It is
a tricky and uncommon thing.)
2010-07-05 16:27:08 +00:00
njoly 41df35f7e1 Fix more copyrights, where i forgot to add my name. 2010-07-05 14:53:03 +00:00
njoly 78043be0cf Fix copyright, noted by Jukka Ruohonen. 2010-07-05 13:03:19 +00:00
njoly 1511eb19e2 Add test program that use sample code from kern/41937, and fs rump
helpers to check currently supported filesystems.

t_rmdirrace (1/1): 5 test cases
    ext2fs_race: Passed.
    ffs_race: Passed.
    msdosfs_race: Passed.
    sysvbfs_race: Passed.
    tmpfs_race: Passed.
2010-07-05 12:53:58 +00:00
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
dyoung 2e43373a96 Fix MKKMOD=no builds: in sets.subr, if $MKKMOD == no, leave the
modules set out of the list of NetBSD set lists, nlists.  If
$MKKMOD == no, do not install modules tests.
2009-11-05 17:34:25 +00:00
plunky b2965573f9 add ATF tests for libevent 2009-11-02 10:15:45 +00:00
jmmv 9eb1b1099f Migrate three sh test cases from regress to tests. 2009-10-20 21:58:35 +00:00
pooka 9b92a8f383 comment adjustment. hardly any functional change involved. 2009-10-15 16:50:00 +00:00
pooka 05c281e378 fix test for new-world rump lwp usage 2009-10-15 16:47:23 +00:00
pooka bf3992af18 Adjust names of external rump control interfaces to match the
new rump_pub namespace.
2009-10-14 18:22:50 +00:00
jmmv ddfcde04ad Add test cases for "prefix $@ suffix" expansion. From PR bin/33956.
This issue was fixed a while ago but the tests described in the report
were never written as proper test cases.
2009-10-14 13:02:03 +00:00
pooka 7d89931c36 Add regression test to verify that linksets work correctly with rump. 2009-09-24 21:36:42 +00:00
pooka b4d274c027 add regression tests for dlinfo() 2009-09-24 21:33:45 +00:00
apb 7f9c54c774 Correct list of d_merge* files. 2009-09-19 21:49:50 +00:00
apb 3ce38cde2b Adjust tests to no longer expect a trailing space in each line
of output from "mtree -C".
2009-09-19 21:42:26 +00:00
apb 2eaeff02ed Add tests for the "mtree -M" issue reported in PR 42031 from Geoff Wing. 2009-09-19 20:37:05 +00:00
pooka 36c33536d3 Set timeout to 20 because for some reason this test hangs in qemu.
(Well, it *still* hangs even after the timeout has passed, but at
least there's multiple problems to debug now)
2009-09-17 13:12:51 +00:00
skrll 52749c1bca Rely on the new and "just as awful as the old" hack in the battle of rump
vs link sets.
2009-09-14 17:24:20 +00:00
pooka 1b05a6d80a Add test case for PR kern/42020:
t_rnd (1/1): 1 test cases
    RNDADDDATA: Failed: Test case did not exit cleanly: Abort trap (core dumped)

Failed test cases:
    t_rnd:RNDADDDATA
2009-09-08 20:37:45 +00:00
skrll 7842ef85bb No-one wins in rump vs link sets.
XXX Someone(tm) needs to fix this properly.
2009-08-21 14:41:22 +00:00
pooka f0190dc27d rump_fakeblk -> rump_etfs 2009-08-03 14:25:24 +00:00
drochner 55f6a48c74 flag a 64-bit integer constant as "ULL" -- this is not clean but the
code around it assumes it anyway
fixes build on 32-bit
2009-07-21 21:45:33 +00:00
joerg 974b291a6c Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.
2009-07-21 13:18:43 +00:00
christos 81908d00ad fix for new openssl 2009-07-20 20:41:52 +00:00
joerg 7afbfeabf4 Use __RCSID. 2009-07-20 18:24:01 +00:00
joerg d6e219476b Add a fast, platform independent hash function to libc.
The algorithm used is the Jenkins hash.  The name (mi_vector_hash)
reflects the nature of the hash function.
Add glue for libc ATF tests and include a test case to make sure that
(mis)alignment and endianess are handled correctly.

Bump libc minor to 169.
2009-07-20 17:03:36 +00:00
he bcb5a47bca Apparently, there's not a clear dependency ordering for the libraries,
this becomes apparent when linking statically (e.g. as for sun2).
Add an extra instance of -lrump to the library list so that it can be
linked statically as well.
2009-06-09 11:18:50 +00:00
pooka 1decab3813 Fix calls to rump syscalls now that the padding argument is no
longer advertised.
2009-05-15 15:54:03 +00:00
pooka a9b3c18ec6 lseek fd to start before sending, creates a clearer test case. 2009-05-08 13:03:46 +00:00
pooka fd3f839e56 Make the file descriptor passing test case a little more interesting:
instead of passing a file descriptor within a single process, create
two virtual processes in rump and pass the fd between them.
2009-05-07 16:19:30 +00:00
pooka d56d1f4273 Rename variable to reflect current use. no functional change. 2009-05-07 14:45:19 +00:00
pooka f9733ae8d4 Use make syntax where LDADD applies only to a certain target
(not that there currently is more than one, but ...)
2009-05-04 01:26:49 +00:00
pooka a6059f9100 g/c unused variables 2009-05-04 00:14:59 +00:00
pooka 0a3318e028 In addition to testing the fd passing doesn't crash the kernel,
also check that it actually works.
2009-05-03 23:19:59 +00:00
pooka d5ac376c40 Mount test fs onto /mp instead of /. This way it can be unmounted
and we can detect vnode reference leaks.
2009-05-03 12:10:00 +00:00
pooka 863335f97b don't hardcode /usr/lib path 2009-05-02 16:18:13 +00:00
pooka 80be26da9a add regression test for module init/fini in rump 2009-05-02 16:02:18 +00:00
pooka 45ef580f17 Merge librumpfs_ufs into librumpfs_ffs. This reflects what happened
with the ffs kernel module and follows the trend of retiring ufs.
It also allows to get rid of a special case kludge in runtime module
loading, since ufs was not really a module.  librumpfs_ufs is now
obsoleted and ffs consumers should be linked solely against
librumpfs_ffs.
2009-05-02 01:15:52 +00:00
pooka 296ba25baa * register fakeblk
* fix error message
2009-04-29 15:46:01 +00:00
pooka 067a8b527b Use rump_sys_mount() instead of ukfs_mount(). Just a few more
steps and we can have a switch for if we want to run tests against
a rump kernel or a real kernel.
2009-04-26 15:15:38 +00:00
pooka 95ab63fa91 WARNS=4 2009-04-14 10:20:22 +00:00
pooka 3df59b06ac Add atf_tc_fail_errno(), which appends strerror(errno) to the
message string.  Adding it to h_macros suggested by jmmv
2009-04-14 10:19:38 +00:00
apb 7291fc32b2 Add tests for "mtree -C -S" and "mtree -D -S"; convert previous tests
for "mtree -C" and "mtree -D" to expect the output to be in the same
order as the input.
2009-04-08 19:06:30 +00:00
pooka 1b5f62901e Hmm, this case was for MNT_LOG so enable it. No wonder I couldn't
repeat the problem with the patch reverted.  regression test
regression.
2009-04-08 12:29:05 +00:00
pooka 565dd9ed11 descend into ffs 2009-04-08 12:09:04 +00:00
pooka a56fe8c09f regression test for kern/40948 2009-04-08 12:08:17 +00:00
pooka f698904d75 * convert to KNF
* pass WARNS
2009-04-08 09:11:34 +00:00
pooka d08d606875 atf_tc_fail() instead of err() 2009-04-08 09:05:16 +00:00
pooka f7bf33df40 make test duration bound by time instead of by number of rounds 2009-04-08 08:57:24 +00:00
pooka 163d880b1a add regression test for kern/41128 2009-04-07 20:51:46 +00:00
apb 854eeab1fc Add tests for "mtree -C" and "mtree -D". Add "link" keyword to
previous mtree tests.
2009-04-07 19:28:40 +00:00
apb fc28b4ff36 Add tests for mtree. 2009-04-07 13:52:07 +00:00
jmmv d142d343c8 ipf does not live here; it is in the parent directory. Spotted by njoly@. 2009-02-27 07:32:33 +00:00
jmmv b9daf172a0 Add the ipf tests developed by Lukasz Strzygowski as part of the atfify
GSoC 2008 project.  These were originally inside the kernel subdirectory
but I think they belong in their own top-level directory because ipf
consists of more components than just the kernel-level packet filter.
2009-02-20 21:42:59 +00:00
jmmv 1861ed5ed9 Add helper macros for tests. 2009-02-20 21:40:55 +00:00
jmmv 99635d94f8 Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.
2009-02-20 21:39:57 +00:00
cube fb825dde7b Use the correct dir to find source files. NetBSD finally builds again.
Please have the decency to at least do a test build when you import such a
huge amount of code.
2009-02-14 05:07:54 +00:00
jmmv 3baa49a10f Convert the threads libcrypto test to ATF and enable it. Drop the old one
in regress.
2009-02-13 22:01:48 +00:00
jmmv 0601c2c71b Remove threads from the list of subdirs. Commited by mistake. 2009-02-13 21:33:27 +00:00
jmmv fd2c7cbdc1 Convert libcrypto tests to ATF. Original work done by Lukasz Strzygowski
in the GSoC 2008 atfify project.  Reorganization of files and build system
reworked by me.
2009-02-13 20:58:13 +00:00
jmmv fbaeb3b2ac Add the util tests developed as part of the atfify GSoC 2008 project.
Initial done work by Lukasz Strzygowsky and reorganization of files done
by me.
2009-02-13 05:19:51 +00:00
pooka 1838cc2a07 Add a regression test for the descriptor passing panic. 2009-02-10 13:43:54 +00:00
jmmv 454557d79e Adjust tests to work with the new API in ATF 0.6. 2009-01-19 07:15:46 +00:00
jmmv 0cdcf7cea6 Remove ATF 0.5 from dist/atf and all of the reachover Makefiles used to
build it.  0.6 is going to be imported in external/bsd/atf, with all the
necessary Makefiles in that same hierarchy.
2009-01-19 07:08:14 +00:00
jmmv 6725d3eeec Kernel modules (kmod files) are now installed in a subdirectory per module.
Make these tests aware of this so that they work again.
2009-01-04 17:56:57 +00:00
pooka 8c10597be5 Don't descend into modules on evbppc.. sigh 2008-12-08 12:39:04 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
gmcgarry f8eb853c86 Don't descend into atf with (${MKATF} == no) 2008-08-16 23:51:51 +00:00
dyoung eeabda7de2 Fix two bugs to make MKMODULAR=yes builds will work again, for the
first time.

share/mk/bsd.kmodule.mk: only set _INST_DIRS if KMODULEDIR is not
    set.  That we we avoid installing some bogus directories in
    the DESTDIR and in $DESTDIR/METALOG.

tests/modules/k_helper/Makefile: add missing .include <bsd.own.mk>,
    and set the KMODULEDIR that the author seems to have intended.
2008-05-31 19:58:35 +00:00
dholland c9db1d914b Add missing cases for the ! operator. Also add eval-variants of a couple
others, that had been missing, and correct a typo'd expected result.
2008-05-26 22:06:10 +00:00
dholland b135c75eab One more pair of cases; PR bin/17514 originally reported a difference in
nonexistent programs on $PATH and nonexistent programs with an absolute
pathname, so we ought to test both.

If anyone creates a program called nonexistent-program-on-path and
thereby breaks this test for themselves, they deserve it. ;-)

Also prune a no-longer-used shell variable.
2008-05-25 21:43:18 +00:00
dholland c89216e1ce Rework and expand the test cases with reference to standards and the open
PRs on this issue. There are now 68 cases in here, of which 30 fail. Sigh.
Related PRs: bin/17514, bin/29861, bin/32282, bin/37493, bin/38584.
2008-05-25 21:33:24 +00:00
dholland e53e59c2bc Fix this test up so (1) you can test a particular copy of sh rather than
being restricted to the #!/bin/sh used to run atf; (2) you can tell what
happened when it fails, since it does currently fail; (3) it runs all the
cases even when some of them don't work, and fails only at the end.
2008-05-25 19:25:03 +00:00
jmmv 940585f3ea Fix MKMODULAR=yes builds by resolving installation problems of the k_helper
test module after the introduction of bsd.kmodule.mk.  The files list was
inconsistent with the new module structure and the Makefile did not use the
correct variable to specify the installation of the module.  Hi ad@!
2008-05-05 19:33:09 +00:00
ad 3ba209837a - Add a bsd.kmodule.mk to build new style modules.
- Set the file suffix to .kmod
2008-05-02 14:20:50 +00:00
jmmv 5a5601438b Convert NetBSD-specific tests that were previously written in C++ to C now
that ATF provides a C-only binding (comes with 0.5).
2008-05-01 15:38:17 +00:00
jmmv 3c685893a8 Adjust build of ATF tests after import of atf-0.5. 2008-05-01 15:37:18 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
jmmv 256b5bd1a9 Add tests for load-time parameter passing to modules, both at the syscall
level through modctl(2) and at the user level through the modload(8)
utility.
2008-03-02 11:22:10 +00:00
jmmv d5094734ca Add tests for rillig@'s recent fix to mount_tmpfs: ensure that error messages
do not mention the source path, which is unused.
2008-02-13 14:58:42 +00:00
jmmv 6d229870a6 Add more detailed checks for each of the primary modctl commands. 2008-02-10 16:02:24 +00:00
jmmv d387334f48 Descend into modules. This is unconditional; see the comment in
modules/Makefile for details about why it cannot depend on MKMODULAR.
2008-02-10 12:40:41 +00:00
jmmv 42d50c9507 Add preliminary tests (basically a placeholder for now) for the new modules
framework.  At the moment, this just tests for plain load (i.e. no arguments
passed to load) and later unload of the module through the modctl(2) system
call.  The tools are not tested yet.
2008-02-10 12:40:10 +00:00
jmmv 2418db1a1e Remove a warning that said that the test could loop forever because ATF
will now automatically terminate it after 5 minutes of run time.
2008-02-05 08:33:50 +00:00
jmmv 555b9649d4 Sync with the tests tree from atf 0.4. 2008-02-04 20:30:15 +00:00
jmmv 91374a77e7 Fix headers: add NetBSD CVS id tag and drop ATF title. 2008-01-04 18:37:15 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
jmmv 5166760e85 Re-add the NetBSD CVS Id tag to the header. It just had to be quoted to
be accepted by the parser; i.e. no bug in the code :-)

Note to self: do not try to "fix" stuff the last minute before going to
sleep.
2007-12-30 09:13:32 +00:00
jmmv ef8f5fcf1e Copy the host key into the work directory and tell the server to use this
instead of the source file, because we need to set strict permissions on it.
Otherwise sshd refuses to start.

Note that we cannot set the permissions of the installed ssh_config_key file
to 400 because unprivileged users could then be unable to run the tests.
2007-12-29 23:07:17 +00:00
jmmv 9644efc887 Use proper specification for a glob pattern. 2007-12-29 23:03:10 +00:00
jmmv 24b05c38e9 Back out the change to introduce the X-NetBSD-Id header entry. For some
reason the parser does not accept its contents...  You know, one should
always test even trivial changes!

Will review this in more depth tomorrow to find the real root cause of the
problem and rule out a fix for ATF.
2007-12-29 23:02:51 +00:00
jmmv 92f6ea962c Properly capture the output of the SSH server. Its -e flag is supposed to
be used alongside -D, but as this was not documented I thought it was a bug
and "fixed" -e's behavior locally (so I got the correct output before, but
nobody else).

Also, fix a race condition that could cause the SSH server to not be killed
if the pid file was not written before the kill, which might happen on very
fast machines.  There still may be a problem when trying to do the connection
if the server has not yet finished initialization...
2007-12-28 08:57:42 +00:00
jmmv c14077091f Install the data files. 2007-12-26 22:33:54 +00:00
jmmv 4178bab5b6 Add the NetBSD Id tag to the Atffiles. Issue raised by pooka@ a while ago. 2007-12-26 21:04:47 +00:00
jmmv c3572c6033 Enable the puffs tests. 2007-12-26 20:50:31 +00:00
jmmv 255c0c3501 Beleatedly add some regression tests for a couple of problems I found in
psshfs and that pooka@ already fixed a while ago.  These were rather tricky
to get working.
2007-12-26 20:50:06 +00:00
jmmv e44ee884d0 Add regression tests for low-port allocation in connect and listen, which
was broken and fixed recently in:
http://mail-index.netbsd.org/source-changes/2007/12/16/0011.html

Test-case code provided by elad@.
2007-12-23 13:50:22 +00:00
riz 3f811928da Cast sf->f_bsize to int to force signed division. Fixes this test
on amd64, and probably other 64-bit platforms.
2007-12-03 18:49:24 +00:00
jmmv 80c834ed18 Explicitly define TESTSDIR, because the automatic deduction of its value
breaks the build if some component of NETBSDSRCDIR is a symlink.  Reported
by drochner@.
2007-11-21 15:39:33 +00:00
jmmv ed68a80f58 Remove the libfake hack, as it breaks the build in sun2 (which does not
support shared libraries).  Reported by he@.

This was an attempt to test the exact same id binary in the system but
using fake library calls to provide fictitious but stable user/group
entries.  Instead, build a helper id binary linked against our fake
functions.  This is what we already do in, e.g. the tests for util/df.
2007-11-19 14:17:45 +00:00
jmmv da0793de49 Recurse into 'id'. 2007-11-16 19:27:47 +00:00
jmmv 42112a274c Add tests for id(1), groups(1) and whoami(1). I'm basically doing this to
check for the command's syntax, but while doing so, I'm adding tests for
all (or almost) possible executions of these commands.

I'm not too happy with the "libfake" directory because there must be some
simpler way to do this, but it will do the trick for now hopefully.
2007-11-16 18:06:46 +00:00
jmmv 98380f8b63 Convert the regress/games tests to the atf
This change converts all the existing regression tests in regress/games
to the new framework provided by atf.  As a side effect, this also moves
all the tests programs in regress/games to tests/games.
2007-11-12 15:19:45 +00:00
jmmv 9b7401e7cb Convert the regress/sys/fs/tmpfs tests to the atf
This change converts all the existing regression tests in
regress/sys/fs/tmpfs to the new framework provided by atf.  As a side
effect, this also moves all the tests programs in regress/sys/fs/tmpfs to
tests/fs/tmpfs.
2007-11-12 15:18:07 +00:00
jmmv 65926be28b Convert the regress/bin tests to the atf
This change converts all the existing regression tests in regress/bin to
the new framework provided by atf.  As a side effect, this also moves all
the tests programs in regress/bin to tests/util, as they all belong to
utilities installed by the base-util-root package.
2007-11-12 15:13:58 +00:00
jmmv 3b0ca37dba Add the atf tests
This adds reachover Makefiles to build and install the atf tests.
2007-11-12 15:09:26 +00:00
jmmv 4d9b8b6a50 Add the tests.tgz set
This adds a new tests.tgz set to releases which includes all the tests
for the system.  It is important to note that this set does not rely on
comp.tgz: a user of the system can run the tests without having the
development tools installed, which can be useful in a production machine.
2007-11-12 15:06:45 +00:00