Commit Graph

1198 Commits

Author SHA1 Message Date
joerg
ee3252c44f Use volatile for explicit 0 dereference 2011-05-24 15:20:37 +00:00
nakayama
88e42b609b Add fenv support for sparc. Mostly copied from sparc64 and share with it. 2011-05-20 21:42:48 +00:00
joerg
3b8335f4ee Test case requires the GCC specific thread extension for Objective C, so
only enable the test if GCC is present and disable other compiler.
2011-05-20 13:03:45 +00:00
riastradh
ee53e39c19 Expand tests for unaligned writes to cgd. No more xfail.
PR kern/44515
PR kern/44964
2011-05-19 20:37:50 +00:00
christos
e2d6a49943 Don't depend on the atf timeout stuff, do it ourselves. 2011-05-18 03:15:12 +00:00
christos
185865c435 Add a test for signal delivery during pselect, with temporary mask change. 2011-05-18 02:57:48 +00:00
njoly
59bc3aabda Add require root user to test_case_xfail. Avoids reporting expected
failure for the wrong reason with unprivileged runs (puffs access
denied).
2011-05-17 22:01:41 +00:00
he
1fd8e2619a The support of <fenv.h> is actually for __sparc64__, not for __sparc__
(which is also defined on sparc64).  This fixes a build problem for
plain sparc.
2011-05-16 07:59:18 +00:00
christos
65066d37d4 h_macros need strlcat and random ugh, please someone remove this header.
define _NETBSD_SOURCE so those are defined.
2011-05-16 00:03:36 +00:00
christos
21bd6ba1e6 add missing header files. 2011-05-15 23:59:03 +00:00
christos
6551109c37 if you don't include the proper include files, you are going to end up
calling functions incorrectly.
2011-05-15 23:56:28 +00:00
jmmv
9b4c1721f3 Instead of doing 'atf_check ... sh -c foo', just do 'atf_check ... -x foo'. 2011-05-14 17:42:28 +00:00
njoly
de774efe6e Remove shebang lines from test-script sources; avoids duplicate with
the build process which adds one too.
2011-05-11 22:08:12 +00:00
njoly
37bcf00e1a Typo in error message. 2011-05-11 19:06:45 +00:00
jruoho
0a8e06ff1f Adjust. 2011-05-11 08:11:36 +00:00
jruoho
3005f452fe Do also a small functional verification that user did not succeed in writing
garbage values, even if sysctl(8) reported a failure.
2011-05-11 07:07:41 +00:00
jruoho
2f45c76c1c Use the same conditional check from <fenv.h> to fix an immediate build error
pointed out by cliff@. (This does not however sound like a sane thing to
mandate from a C99 header.)
2011-05-10 19:18:19 +00:00
njoly
7605f6497e Add require.progs unifdef, to avoid failure if comp set is not
installed.
2011-05-10 19:02:27 +00:00
jruoho
98be387902 Verify that strtod(3) honors the current rounding mode set by fesetround(3).
Passes on amd64. Prompted by a bug in the GNU C library.
2011-05-10 15:20:19 +00:00
jruoho
cd5d7b9351 Few naive tests for pause(3). 2011-05-10 13:03:05 +00:00
jruoho
44744829be Add also a simplistic stress unit test. 2011-05-10 12:43:42 +00:00
jruoho
34c8ff4209 Fix comment/string typos. 2011-05-10 06:58:17 +00:00
jruoho
ac31bc5721 Fix typo. 2011-05-10 06:55:27 +00:00
jruoho
949a3d9b76 Add one missing cleanup routine declaration. 2011-05-09 17:55:37 +00:00
jruoho
f33b8e3d59 Add a test case for PR kern/44946. This tests that common first level sysctl
nodes (ddb, hw, machdep, etc.) are not writable by a normal user.
2011-05-09 17:53:54 +00:00
jruoho
76710b77f2 On a second thought, require that close(2) fails for a descriptor already
closed with closefrom(3). For some odd reason (yet to be determined), this
check fails on 5.99.51 (amd64).
2011-05-09 11:05:36 +00:00
jruoho
d5aa514fe9 Remove superfluous close(2) pointed out by martin@. 2011-05-09 10:50:02 +00:00
jruoho
105ad5cd59 Add one more naive unit test. 2011-05-09 09:27:37 +00:00
jruoho
6cd711aedd Few basic tests for exit(3). 2011-05-09 07:31:50 +00:00
jruoho
aab71b6e06 List the ATF_TC_() thins in the order of appearance. 2011-05-09 06:05:54 +00:00
jruoho
48b4c06005 Few basic tests for strerror(3). 2011-05-09 06:04:14 +00:00
jruoho
f5d692df83 Few basic tests for closefrom(3). 2011-05-09 05:17:12 +00:00
njoly
12b7c66064 Do not return for early failures; otherwise the testcase will be
reported as passed, even if not really run.
2011-05-06 22:24:41 +00:00
njoly
35f009cabe write-only mapping is not portable, change it to read/write. Unbreaks
mprotect_write testcase on alpha.
2011-05-06 21:51:19 +00:00
jruoho
fd2377c7fe Try to mirror the real source with the test directory structure (otherwise
the latter carries a risk of becoming a difficult mess to manage.)
2011-05-05 13:36:04 +00:00
jruoho
0bd56749c6 Few fundamental consistency checks for alarm(2). 2011-05-05 13:22:56 +00:00
jruoho
f9b73fbc67 Follow the real tree with the test directory structure. 2011-05-05 05:39:10 +00:00
jruoho
5cdd3dcf2a Follow the real tree with the test directory structure. 2011-05-05 05:24:44 +00:00
jruoho
cb861154c1 Add a test case for PR bin/26453. 2011-05-03 15:13:50 +00:00
jruoho
ae3433a79c Fix same copy-paste error here. (Why atf(7) does not warn about these?) 2011-05-03 14:26:11 +00:00
jruoho
15dd14fca5 Fix build failure reported by pgoyette@. 2011-05-03 14:11:51 +00:00
jruoho
1a3a1673c8 Fix copy-paste error. 2011-05-03 12:54:48 +00:00
jruoho
6e1e04d65f Add a test for PR bin/41880. 2011-05-03 08:36:15 +00:00
jruoho
765b090a54 A test for non-critical/low PR bin/42179. 2011-05-03 07:56:42 +00:00
jruoho
1f57069f96 Verify that PR bin/42628 is no longer an issue. 2011-05-03 07:23:19 +00:00
jruoho
b76e0d98ce Add a test for non-critical/low PR bin/43141. 2011-05-03 06:13:06 +00:00
jruoho
d86c47c62a Some naive tests for the bswap(3) family. 2011-05-03 04:50:30 +00:00
jruoho
97dfa3c4e3 Few basic tests for getitimer(2) and setitimer(2). 2011-05-02 17:26:23 +00:00
gson
0461af44be Don't print a time_t with %lu 2011-05-02 11:14:29 +00:00
jruoho
0a02a67e57 Use the standard "PR foo/1234" notation such that the PR number is parsed
correctly for the atf(7) HTML reports.
2011-05-02 08:30:21 +00:00
jruoho
d06a811310 Verify that nanosleep(2) can suspend for one nanosecond (or longer). 2011-05-02 07:02:09 +00:00
jruoho
576aaaa585 Test also ttyname_r(3). 2011-05-01 18:14:01 +00:00
jruoho
5e6ff08c20 Verify PR standards/44921. 2011-05-01 17:07:05 +00:00
jruoho
2446e1b8a7 Naive tests for clearerr(3).
Converted from the "PCCA" test suite by Stathis Kamperis.
2011-05-01 16:36:37 +00:00
jruoho
700486254a Add the new 'termios' subdirectory. 2011-05-01 11:44:41 +00:00
jruoho
741dca333d Add a test for PR lib/41673 (another trivial errno "bug"). 2011-05-01 11:39:37 +00:00
jruoho
2b2b951b5e Improve further so that this might actually fail. 2011-05-01 09:44:26 +00:00
jruoho
f74cfbd2d7 Actually, as this is nanosleep(2), test 1-10 nano second sleep times. 2011-05-01 09:19:12 +00:00
jruoho
77fa459178 Simplify the previous. (Apparently the sleep time is not that accurate.) 2011-05-01 09:15:14 +00:00
jruoho
23c04498b7 Few basic tests for nanosleep(2). 2011-05-01 09:09:35 +00:00
jruoho
cbbc4a7b84 Two elementary tests for gettimeofday(2). 2011-05-01 07:22:40 +00:00
jruoho
e426bc4f89 PR lib/42587 was fixed; remove xfail. 2011-05-01 06:42:29 +00:00
alnsn
d4a5682920 Add new files. 2011-04-30 11:24:14 +00:00
jruoho
4f729153dd Few fundamental consistency checks for kill(2). 2011-04-30 06:20:37 +00:00
alnsn
fc6d41fbf1 PR/42320 doesn't seem to be fixed, mark the failure as expected. 2011-04-30 01:10:07 +00:00
jmmv
6d06e772f7 Add test cases for PR bin/6764: 'trap ... 0' is supposed to execute the
command when the shell exits but it does not work in ksh when the shells
exits "implicitly" (without an explicit exit/return statement).

These new tests cover both sh and ksh.  The ksh part of this does not
strictly belong to this directory, but I think it'd be nice to extend
all the tests in here to cover both interpreters whenever that makes
sense, much like we do with the file system tests.
2011-04-29 12:49:36 +00:00
alnsn
f94fb57534 Test for PR bin/42320. 2011-04-28 23:28:23 +00:00
martin
73637f3626 Add TNF license. OK: pooka. 2011-04-26 20:42:01 +00:00
martin
57d2159dd2 When failing, point to PR lib/44057 and the discussion therein about the
relevant compiler bug.
2011-04-26 20:20:16 +00:00
martin
8d374d551c Simplify 2011-04-26 18:50:53 +00:00
martin
29b0298b15 Minor simplification 2011-04-26 18:42:08 +00:00
njoly
778925efe8 Do not try to lower limits that are already at 0. 2011-04-25 22:34:16 +00:00
njoly
dd925c8942 Avoid creating test files oustide atf-run temporary tree. 2011-04-25 22:29:35 +00:00
njoly
53714e0d34 In nice_err testcase, use ATF_REQUIRE_ERRNO. 2011-04-25 20:55:06 +00:00
njoly
5845e99692 Switch from atf_tc_fail to atf_tc_fail_nonfatal to report all missing
defines, not only the first one.
2011-04-25 20:51:14 +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
martin
84bd71a202 Add a variation of the setjmp tests that link to libpthread and verify
pthread_self() stays consistent.
2011-04-21 18:58:20 +00:00
blymn
da8ae82efe Allow a NULL pointer to be passed as an argument to a call. 2011-04-21 10:23:50 +00:00
martin
eafc32a2b4 PR fixed, remove expected failure. 2011-04-20 20:02:58 +00:00
blymn
8f5d556812 Add boolean values to the standard definitions. 2011-04-20 10:40:14 +00:00
martin
fd21e1d8bf Manually craft a (default) termios description instead of trying to fetch
one from stdin - ATF tests should not rely on stdin being a terminal.
2011-04-19 20:13:55 +00:00
martin
8fc4e7259f Make the test case independend of stdin being a terminal 2011-04-19 20:07:53 +00:00
martin
9761dd743b Add MAP_PRIVATE to mmap() flags where missing. 2011-04-19 10:21:51 +00:00
jruoho
2fa0f9fccc Few simple tests for getgroups(2). 2011-04-17 06:26:02 +00:00
jruoho
38b0bf3bbd Test nice(3) also with threads. 2011-04-17 06:18:23 +00:00
plunky
831ec44f27 test that data element lists are not placed by sdp_put_attr(), as
an attribute/value pair should only contain a single data element
2011-04-16 07:32:27 +00:00
he
b2bee2ed8d Explicitly list -lterminfo after -lcurses, to support static builds. 2011-04-13 09:46:38 +00:00
jruoho
a402cee48a PR lib/41931 should be fixed; remove expected failure. 2011-04-12 03:06:21 +00:00
jruoho
5bed061828 Better to still leave the old PR number as a comment. 2011-04-12 02:56:20 +00:00
jruoho
97410b9644 PR lib/33262 should be fixed; remove expected failure. 2011-04-12 02:52:20 +00:00
joerg
433a129747 Don't fail on platforms with "char" == "unsigned char" 2011-04-11 22:37:10 +00:00
martin
72c24adedc Should no longer fail - if it still does, be sure to have a proper
/var/chroot/tcpdump/etc/protocols file installed (i.e. by running
postinstall)
2011-04-11 20:08:10 +00:00
tron
7831dec066 Fix build with stack smash protection enabled. 2011-04-11 17:16:43 +00:00
martin
7dffc9a369 Try to generate infinite values in all available floating point formats
on the FPU and check isinf() and fpclassify() results. This is
different from the libc internal consistency checks testing PR
lib/33262.
2011-04-11 10:51:36 +00:00
blymn
11e883205c Apply patch provided by mrg to fix bad calls to vw_printw and vw_scanw 2011-04-11 09:06:24 +00:00
blymn
e4abc2b9ad Fix NetBSD tag field. 2011-04-11 09:03:24 +00:00
blymn
2c84a00eef Fix incorrect call example. 2011-04-11 09:02:40 +00:00
blymn
44d4aa2e2e Incorrect licence was applied - fix this. 2011-04-11 09:02:02 +00:00
dholland
cdadb9ea2e Fix obvious bug.
(note: this file still doesn't build on amd64)
2011-04-10 23:31:30 +00:00
martin
ed194e826a Repeat the fragmentation on lo0 test, but with checksum on IFF_LOOPBACK
interfaces enabled.
2011-04-10 11:31:48 +00:00
jruoho
957fb2eb62 "wrong return value" -> "wrong errno". 2011-04-10 10:59:13 +00:00
jruoho
ba5cac7848 Formally verify PR standards/44777. 2011-04-10 10:49:43 +00:00
jruoho
ba788ede8f Currently known failures affect only amd64; adjust atf_tc_expect_fail(). 2011-04-10 10:23:45 +00:00
blymn
bdd37afa3f Add atf for libcurses with some tests 2011-04-10 09:55:08 +00:00
blymn
320b7b4d50 Add libcurses test 2011-04-10 09:49:13 +00:00
jruoho
e7c9c72e99 Verify that PR standards/21401 is no longer an issue. 2011-04-10 08:35:47 +00:00
jruoho
2fe16f2510 Fix comments. 2011-04-10 08:11:34 +00:00
jruoho
29ee83dbcf Add tests for PR standards/44847 and PR standards/18067. 2011-04-10 08:07:41 +00:00
jruoho
5aac453263 A naive test case for getcwd(3). 2011-04-10 06:27:20 +00:00
jruoho
a63adaf81b Add a test case for PR lib/41931 reported by he@. It was verified that these
fail on NetBSD 5.99.48 amd64 but pass on amd64 Linux (glibc 2.7).
2011-04-10 06:11:47 +00:00
martin
3d772d583a Remove expected failure, PR has been fixed. 2011-04-09 20:42:12 +00:00
pgoyette
324074b933 atf-ify the various locale tests 2011-04-09 17:45:24 +00:00
martin
40b302ddec Add two simple testcases to exercise pty/tty communication. 2011-04-09 11:55:59 +00:00
martin
c5e67b6b14 No longer expected to crash the kernel. 2011-04-09 06:36:03 +00:00
jruoho
c077304602 Use RLIMIT_NOFILE rather than the static _SC_OPEN_MAX. 2011-04-08 15:35:49 +00:00
jruoho
5ebf352487 Adjust the test with stdin(3). 2011-04-08 15:25:00 +00:00
yamt
4f5ae08861 test timer_create with CLOCK_MONOTONIC as well 2011-04-08 11:11:53 +00:00
jruoho
6f21bdca87 Adjust for the tracker PR kern/30115 for this over 15 year old bug. 2011-04-08 10:36:09 +00:00
jruoho
a2963f40dc Move the round(3) checks from 't_libm' to their own 't_round'
for consistency. Add -Wfloat-equal and fix comparisons.
2011-04-08 06:49:20 +00:00
jruoho
b63018ec52 Fix build failure on VAX. 2011-04-08 06:37:50 +00:00
jruoho
02dfa85f00 Remove the following (literal) text in the TNF copyrights:
* This code is derived from software contributed to The NetBSD Foundation
  * by
  *

XXX: If these originated from you and you want your name to be mentioned,
     please add it.
2011-04-07 18:14:08 +00:00
jruoho
247203635d Add few naive test cases for msync(2). 2011-04-07 17:38:02 +00:00
jruoho
a301260f35 Improve the test further so that it might trigger more often. 2011-04-07 17:33:11 +00:00
plunky
5a4807fa7d whitespace police 2011-04-07 08:29:50 +00:00
plunky
77d265be45 link libbluetooth tests to the build 2011-04-07 06:24:07 +00:00
plunky
38293af7ee add tests for the following libbluetooth functions
bluetooth(3)
	bt_aton()
	bt_ntoa()

    sdp_data(3)
	sdp_data_type()
	sdp_data_size()
	sdp_get_data()
	sdp_get_attr()
	sdp_get_uuid()
	sdp_get_bool()
	sdp_get_uint()
	sdp_get_int()
	sdp_get_seq()
	sdp_get_alt()
	sdp_get_str()
	sdp_get_url()
	sdp_match_uuid16()
	sdp_put_data()
	sdp_put_attr()
	sdp_put_uuid()
	sdp_put_uuid16()
	sdp_put_uuid2(3)
	sdp_put_uuid128()
	sdp_put_bool()
	sdp_put_uint()
	sdp_put_uint8()
	sdp_put_uint16()
	sdp_put_uint2(3)
	sdp_put_uint64()
	sdp_put_int()
	sdp_put_int8()
	sdp_put_int16()
	sdp_put_int2(3)
	sdp_put_int64()
	sdp_put_seq()
	sdp_put_alt()
	sdp_put_str()
	sdp_put_url()
	sdp_set_bool()
	sdp_set_uint()
	sdp_set_int()
	sdp_set_seq()
	sdp_set_alt()

[all pass on i386]
2011-04-07 06:21:57 +00:00
jruoho
93c4b96c53 Fix and improve as per suggestions from njoly@. 2011-04-06 19:09:16 +00:00
jruoho
64cf2356be Add a test case for the segfault reported in PR lib/43964. 2011-04-06 17:41:27 +00:00
jruoho
710017dde4 As per PR lib/44818, remove 'lib/libpthread/t_status'. It takes two minutes
to rewrite this properly if someone misses this.
2011-04-06 16:04:16 +00:00
jruoho
c212c60925 Mark this also as expected failure. 2011-04-06 10:06:49 +00:00
jruoho
9827f0b4f3 Formally verify the numerous bugs in humanize_number(3).
From PR lib/44097, by yamt@.
2011-04-06 10:04:53 +00:00
jruoho
e254abd58b A test case for PR lib/44057. 2011-04-06 09:35:49 +00:00
jruoho
e21f0b912e As there is PR lib/42587, mark tiny POSIX error as expected failure. 2011-04-06 08:47:55 +00:00
jruoho
2ae856efaa Verify the existence of PR lib/33262. 2011-04-06 07:25:34 +00:00
jruoho
e519fcc23a Add heuristic evaluation of PR kern/30115. 2011-04-06 06:46:14 +00:00
jruoho
03fcec4259 Fix comment due explicit atf_tc_expect_fail(). 2011-04-06 05:56:05 +00:00
jruoho
8cbe414029 Add few simple tests for getrusage(2), including heuristic for PR # 41734. 2011-04-06 05:53:16 +00:00
jruoho
1640c99fcf Remove redundant memset(3) calls. 2011-04-06 03:47:14 +00:00
jruoho
6e7cc21a77 Fix small boolean oversight. 2011-04-05 19:06:09 +00:00
jruoho
28d491ccd9 Basic tests for setrlimit(2). 2011-04-05 19:02:22 +00:00
jruoho
01072bafe8 Rename some tests. No functional change. 2011-04-05 14:04:42 +00:00
martin
a6b6413efc On 64 bit archs, if supported, also test -m32 binaries and their execution
(both static and dynamic).
XXX should the arch test and compiler support for -m32 test be moved to
init_test_cases, and the test only be added if supported?
2011-04-05 09:53:10 +00:00
jruoho
1cd1da49e9 Try to maintain the structure of libc and move 't_strtox' to 't_strtod'. 2011-04-05 08:24:28 +00:00
jruoho
e14810828f Add simple test cases for ttyname(3), strtod(3), and getgrent(3). 2011-04-05 06:15:30 +00:00
jruoho
4b77c904f2 Mark this again as expected failure. 2011-04-04 19:59:08 +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
jruoho
02a4a265f1 Use the same pattern for couple of simple setuid(2) tests. 2011-04-04 19:08:42 +00:00
jruoho
00f7056aa1 Add a test case for the POSIX (minimum) limits. Written by Stathis Kamperis. 2011-04-04 18:02:01 +00:00
jruoho
c0d6d28330 Couple of simple tests for umask(2). 2011-04-04 16:32:41 +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
martin
b78cd4dd7c Do only set a (lower than default) timeout value if we are on powerpc and
expect to run into a real deadrun ofter.
The (too short) timeout otherwise makes slower archs fail.
2011-04-04 14:47:22 +00:00
jruoho
724a884379 Use _exit(2). 2011-04-04 10:30:29 +00:00
jruoho
bed8d3f065 Few simple tests for nice(3). 2011-04-04 09:52:17 +00:00
jruoho
f4dcfe215c Add some basic tests also for getsid(2). 2011-04-04 08:19:08 +00:00
jruoho
ed26b97d53 Link the 't_timer' -test with pthread(3). Should fix the test failures. 2011-04-04 08:05:37 +00:00
jruoho
1f0f2f9e9c Require an unprivileged run with atf_tc_set_md_var(). Pointed out by njoly@. 2011-04-04 07:16:29 +00:00
jruoho
275df5bf05 Two basic tests for getpid(2). 2011-04-04 06:48:04 +00:00
jruoho
412d5e96fe Check for getuid(2) == 0. 2011-04-04 01:49:45 +00:00
jruoho
c257514ed7 Remove leftover <stdio.h> include. 2011-04-03 16:22:15 +00:00
jruoho
597629b945 Add couple of simple tests for access(2) and mprotect(2). 2011-04-03 16:12:45 +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
joerg
b50095d784 Don't fail on platforms without TLS 2011-04-02 12:53:32 +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
joerg
a7e14ae77f Add initial regression test for ld.elf_so locking. 2011-03-31 23:34:47 +00:00
jruoho
35a190a334 Add couple of simple tests for dup(2). 2011-03-31 15:47:56 +00:00
jruoho
3cecf9f812 Add some basic tests for mmap(2), including one for the vm.user_va0_disable. 2011-03-31 13:07:20 +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
jruoho
e49416c442 Remove atf_tc_expect_fail(). Should be fixed. 2011-03-30 22:26:26 +00:00
jruoho
e1bbe6445c Adjust for _PATH_CONSOLE, pointed out by njoly@. 2011-03-30 19:32:13 +00:00
jruoho
9be2a3c25f Another proof that even the naive test cases are worth it;
expect a failure with fstat(2) and bpf(4), PR lib/44807.
2011-03-30 18:31:15 +00:00
jruoho
d19079bc52 Add missing __RCSID(3), again. 2011-03-30 17:03:02 +00:00
jruoho
2289b490a3 Add some naive tests for the efun(3) family of debug functions. 2011-03-30 17:02:17 +00:00
he
6596e091ec Put tests depending on dlopen etc. under a test for MKPIC, and move
the corresponding entries in the set lists over to the shl.mi file.
This should bring the sun2 port back to a buildable state.
2011-03-30 11:43:15 +00:00
jruoho
8c6b9e263c Add some basic tests for fsync(2) and <paths.h>. 2011-03-30 09:43:21 +00:00
jruoho
a873c5cd55 Add missing __RCSID(3). 2011-03-30 08:34:19 +00:00
jmmv
e58081aa53 Halt the httpd server _before_ rump. Per pooka@'s suggestion. 2011-03-29 16:03:32 +00:00
jmmv
5bd1bce108 Make httpd create a pid file and use that to kill the server in a controlled
manner (instead of indirectly through rump.halt).  Suggested by pooka@.
2011-03-29 15:43:45 +00:00
jmmv
255271589f Extend pidfile(3) to support creating pid files in arbitrary locations.
If the argument provided to pidfile(3) contains a '/', then the value is
considered to be an absolute/relative path and the pid file is created
in the given location.

Otherwise, pidfile(3) behaves as before and treats the provided value as
a basename to construct a pid file in /var/run/<basename>.pid.  This means
that to create a pid file named "foo.pid" in the current directory, one
must specify "./foo.pid".
2011-03-29 13:55:37 +00:00
jruoho
1b871e25a1 Add a test case for pthread_cond_timedwait(3) failures reported by
Sad Clouds in PR lib/44756. This was discussed also in:

	http://mail-index.netbsd.org/tech-userlevel/2011/03/17/msg004689.html
2011-03-27 16:45:15 +00:00
mlelstv
ec85dd4442 validate that getrawpartition() didn't fail. 2011-03-27 08:53:56 +00:00
njoly
53ff676914 Add require.progs properties for needed tools to avoid failures when
comp.tgz set is not installed.
2011-03-25 19:19:45 +00:00
pooka
030990eecf check that we can dlopen() the linkmap name, too 2011-03-25 14:47:31 +00:00
pooka
b2e6db5028 check that dlopen()d dso shows up in the linkmap 2011-03-25 14:45:21 +00:00
jruoho
c90472ef80 Do not skip the QEMU bugs but instead mark these as expected failures. 2011-03-25 10:42:38 +00:00
jruoho
1604324802 Bluntly skip the tests that fail under QEMU. XXX: system(3) is used for this?
wnCVS: ----------------------------------------------------------------------
2011-03-25 10:00:31 +00:00
jruoho
0de4e7e46f Fix typo. 2011-03-25 09:39:19 +00:00
jruoho
88c2989461 Add some basic POSIX conformance tests for sched(3). 2011-03-25 09:34:02 +00:00
jruoho
5f8b364626 Even these naive test cases caught one (QEMU?) bug; comment PR # 44767. 2011-03-25 04:26:41 +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
jruoho
43a75470f9 Sort. 2011-03-24 16:58:01 +00:00
jruoho
629e716a41 Add a naive test case for raise(3). 2011-03-24 16:56:37 +00:00
jruoho
57842fd3b4 Add dummy test cases for ceil(3) and floor(3). It is expected that at least
one of these will fail on guest x86_64 NetBSD under Qemu. Thanks to pgoyette@
for checking the broken floor(16.999999...) = 17.
2011-03-24 15:43:06 +00:00
jruoho
68f3621e3d A dummy conformance-test for pthread_detach(3). I will extend this later. 2011-03-24 13:52:04 +00:00
jruoho
c3917926fd A dummy conformance-test of pthread_equal(3). 2011-03-24 12:40:59 +00:00
jruoho
5ceeb0400d Add also a basic, naive, test for fast_divide32(3). 2011-03-24 07:37:04 +00:00
jruoho
56d0179b95 Add some naive test cases for the ffs32(3) family of functions. 2011-03-24 07:06:34 +00:00
joerg
081dffd915 Explicitly terminate threads to prevent crashes on exit. 2011-03-23 13:57:04 +00:00
jmmv
a6fb334d92 Clean up some late-night braindeadness:
- Make the pidfile name generation functions return their value as a return
  value, not an output pointer.  And homogenize these into a single function.
- Free allocated memory.  Not truly necessary because the test cases die
  immediately anyway, but nice to do.
- Remove the pidfile__ prefix from test case names.  (This was in advance of
  some changes I want to propose to pidfile(3), but it turns out my approach
  was flawed.  Preemptive smartness is evil!)
2011-03-23 09:13:54 +00:00
jmmv
f8d6f5f369 Add some tests for pidfile(3).
I want to touch this module to attempt a feature addition but I need some
tests beforehand!
2011-03-22 23:07:32 +00:00
njoly
f031bfef0a Test case from PR/44189 should not fail anymore. 2011-03-22 22:29:18 +00:00
pooka
4975925b02 check that nfsd works with kernel module autoloading 2011-03-22 17:07:11 +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
jmmv
ecaa6aed45 Force cleanup parts to exit with a success status. Failures in cleanup
should not be allowed by atf-run (although they currently are ignored).
2011-03-22 16:16:30 +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
jruoho
acf13bc7e1 Add a simple test file for <sys/bitops.h>. For now, only ilog2(3) is tested. 2011-03-19 06:39:17 +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
skrll
267d99344b Blame where blame is due. 2011-03-17 15:59:32 +00:00
pooka
040c5b8d22 Use /dev/null instead of stdin for fd. Otherwise if the tests are
run with stdin as a pipe (e.g. from cron) the test fails with ESPIPE.
2011-03-14 20:41:25 +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
pooka
3bc8d7931c test RUMPHIJACK fdoff=8 2011-03-14 15:56:40 +00:00
pooka
46ba5a2180 xfail PR bin/44721 2011-03-14 09:25:01 +00:00
pooka
0a6d25cd9a Use tcpdump -tt so that TZ doesn't affect the test result. 2011-03-13 15:40:01 +00:00
christos
2d8f83e77b Fix various vis/unvis issues:
- no need for all the weak symbols
- define a new _VIS_END flag for UNVIS_END so that there are no collisions
  between and vis and unvis flags.
- add bound versions of the vis and unvis functions that take the length of
  the destination buffer. Unlike the OpenBSD ones they return -1 or NULL if
  the buffer is not large enough, instead of silently truncating.
2011-03-12 19:52:45 +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
1217ea6fe7 get the directories right ... 2011-03-11 16:41:27 +00:00
pooka
6dd7be55d5 dumdidumdum, can't generate an incompatible test busfile and assume
that test will work.  so replace the test data with something a bit
more realistic.
2011-03-11 10:35:29 +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
pooka
f8e076eb7c remember to install test data files too. thanks, Paul. 2011-03-10 14:49:17 +00:00
skrll
11c999cbce Deal with all objdir methods. 2011-03-10 14:31:07 +00:00
pooka
bbc7636114 Add a test checks that 16 rump kernels on one shmif bus can ping
each other.
2011-03-10 14:09:46 +00:00
pooka
baaf9cb9d3 * remove juiblex from nfsd startup (i was using -DDEBUG nfsd yesterday)
* some minor nits
2011-03-10 13:42:33 +00:00
pooka
efd10a6525 add tests for shmif_dumpbus(1) 2011-03-10 11:13:33 +00:00
joerg
aad599979d Add TLS support infrastructure. For dynamic binaries, ld.elf_so exports
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to
setup the thread private area of all new threads. ld.elf_so is
responsible for setting up the private area for the initial thread.
Similar functions are called from _libc_init for static binaries, using
dl_iterate_phdr to access the ELF Program Header.

Add test cases to exercise the different TLS storage models. Test cases
are compiled and installed on all platforms, but are skipped on
platforms not marked for TLS support.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

It is inspired by the TLS support in FreeBSD by Doug Rabson and the
clean ups of the DragonFly port of the original FreeBSD modifications.
2011-03-09 23:10:05 +00:00
pooka
1bafe88e56 nfsd + mount_nfs test with stock system binaries 2011-03-09 21:25:59 +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
pooka
7e4239caf4 some blanket tests 2011-03-08 22:21:52 +00:00
pooka
5ec619238a test case for runon prefixes 2011-03-08 21:36:25 +00:00
pooka
a495c82c5f Enable the "send a lot of syscall requests before exec" code, since
it works now.  (or at least works in my tests)
2011-03-08 15:35:28 +00:00
pooka
fe92fa8193 print out the unexpected rv too 2011-03-08 14:53:03 +00:00
pooka
46dfa511bc add test case for multithreaded client calling exec 2011-03-08 12:40:25 +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
pgoyette
107fdb641e Add tests for verifying the recent changes to ps_strings
From joerg@ with atf-ification from myself.
2011-03-05 18:14:33 +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
riz
c9ff785918 Back out previous; it's causing intermittent problems which I don't
fully understand yet.
2011-03-04 17:56:53 +00:00
riz
1242e4fa63 Switch from using "rump_ffs" to mount the file system image to
using a rump_server to mount it in a rump kernel, and librumphijack.so
to enable accessing it from the test program.  Among other things,
this allows the tests to run as an unprivileged user.
2011-03-03 16:25:15 +00:00
pooka
771df007e3 add tests for hijacked /bin/sh (mostly redirection now) 2011-03-03 11:54: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
riz
1680d3ca61 Skip the sigfpe_flt and sigfpe_int tests on powerpc; powerpc does
not fault on divide-by-zero.  As discussed on tech-userlevel.
2011-03-02 03:42:56 +00:00
riz
736d6f3deb PR#44239 is now fixed, remove the xfail from the test. 2011-03-01 22:52:54 +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