History log of /netbsd-current/tests/kernel/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.78 22-Apr-2024 pho

Add a test for kern/58149

aarch64: Cannot return from a signal handler if SP was misaligned when the signal arrived


# 1.77 17-Oct-2023 rjs

The t_fdrestart test requires rump.


# 1.76 15-Oct-2023 riastradh

t_fdrestart: New test of closing fd with another thread in I/O on it.

Adapted from regress/sys/kern/dislodgefd.

PR kern/57659


# 1.75 03-Aug-2023 nia

Revert addition of epoll to libc until discussion concludes


# 1.74 29-Jul-2023 christos

Add tests for t_memfd_create and fix bug found by tests


# 1.73 28-Jul-2023 christos

Add epoll(2) from Theodore Preduta as part of GSoC 2023


# 1.72 03-Jun-2023 lukem

adapt to ${CC_WNO_FORMAT_TRUNCATION}


# 1.71 21-Apr-2023 gutteridge

Add new test t_open_pr_57260

New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.77 17-Oct-2023 rjs

The t_fdrestart test requires rump.


# 1.76 15-Oct-2023 riastradh

t_fdrestart: New test of closing fd with another thread in I/O on it.

Adapted from regress/sys/kern/dislodgefd.

PR kern/57659


# 1.75 03-Aug-2023 nia

Revert addition of epoll to libc until discussion concludes


# 1.74 29-Jul-2023 christos

Add tests for t_memfd_create and fix bug found by tests


# 1.73 28-Jul-2023 christos

Add epoll(2) from Theodore Preduta as part of GSoC 2023


# 1.72 03-Jun-2023 lukem

adapt to ${CC_WNO_FORMAT_TRUNCATION}


# 1.71 21-Apr-2023 gutteridge

Add new test t_open_pr_57260

New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.


Revision tags: netbsd-10-base
# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.76 15-Oct-2023 riastradh

t_fdrestart: New test of closing fd with another thread in I/O on it.

Adapted from regress/sys/kern/dislodgefd.

PR kern/57659


# 1.75 03-Aug-2023 nia

Revert addition of epoll to libc until discussion concludes


# 1.74 29-Jul-2023 christos

Add tests for t_memfd_create and fix bug found by tests


# 1.73 28-Jul-2023 christos

Add epoll(2) from Theodore Preduta as part of GSoC 2023


# 1.72 03-Jun-2023 lukem

adapt to ${CC_WNO_FORMAT_TRUNCATION}


# 1.71 21-Apr-2023 gutteridge

Add new test t_open_pr_57260

New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.


Revision tags: netbsd-10-base
# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.75 03-Aug-2023 nia

Revert addition of epoll to libc until discussion concludes


# 1.74 29-Jul-2023 christos

Add tests for t_memfd_create and fix bug found by tests


# 1.73 28-Jul-2023 christos

Add epoll(2) from Theodore Preduta as part of GSoC 2023


# 1.72 03-Jun-2023 lukem

adapt to ${CC_WNO_FORMAT_TRUNCATION}


# 1.71 21-Apr-2023 gutteridge

Add new test t_open_pr_57260

New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.


Revision tags: netbsd-10-base
# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.74 29-Jul-2023 christos

Add tests for t_memfd_create and fix bug found by tests


# 1.73 28-Jul-2023 christos

Add epoll(2) from Theodore Preduta as part of GSoC 2023


# 1.72 03-Jun-2023 lukem

adapt to ${CC_WNO_FORMAT_TRUNCATION}


# 1.71 21-Apr-2023 gutteridge

Add new test t_open_pr_57260

New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.


Revision tags: netbsd-10-base
# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.72 03-Jun-2023 lukem

adapt to ${CC_WNO_FORMAT_TRUNCATION}


# 1.71 21-Apr-2023 gutteridge

Add new test t_open_pr_57260

New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.


Revision tags: netbsd-10-base
# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.71 21-Apr-2023 gutteridge

Add new test t_open_pr_57260

New test case that reflects the fix in PR kern/57260. The majority of
work for this case itself was by riastradh@, who'd supplied the basis
for it in the ticket, and provided further guidance.


Revision tags: netbsd-10-base
# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.70 01-Oct-2021 martin

t_simplehook requires RUMP


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.69 30-Sep-2021 yamaguchi

Added tests for the linear hook APIs


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.68 01-Jul-2020 jruoho

Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.67 25-Jun-2020 jruoho

Add a test case for PR kern/52744, which no longer appears to be present.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.66 01-Mar-2020 christos

Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.65 11-Feb-2020 riastradh

Test that fpu state is preserved by fork.


Revision tags: phil-wifi-20191119
# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.64 29-Sep-2019 mrg

convert HAVE_GCC == 7 to HAVE_GCC >= 7.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.63 15-Sep-2019 christos

Add tests for fexecve(2)


# 1.62 15-Sep-2019 christos

Add F_GETPATH, presented to tech-kern.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

branches: 1.60.2;
Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.61 15-Aug-2019 kamil

Adapt tests/kernel/t_subr_prf for MKSANITIZER

Allow to rename snprintf-like functions to avoid clashes with a sanitizer.

This tests needs a fixup to remove 'undef symbol' from the test code
generator.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.60 07-Jun-2019 christos

Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

branches: 1.53.2;
Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.60 07-Jun-2019 christos

Add a $ORIGIN test


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.59 01-Jun-2019 kamil

Add ATF KERN_PROC_CWD tests


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.58 04-Feb-2019 mrg

- tests explicitly check failure modes, ignore those warnings


# 1.57 03-Feb-2019 thorpej

Implement support for "pshared" POSIX semaphores.

Fixes lib/53273 (and Firefox's multi-process tab feature).


Revision tags: pgoyette-compat-20190127
# 1.56 25-Jan-2019 christos

PR/53908: Alex Raschi: Test that require modules belong in modules; move the
threadpool test from kernel to modules.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226
# 1.55 24-Dec-2018 thorpej

Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.


Revision tags: pgoyette-compat-1126
# 1.54 11-Nov-2018 riastradh

Use feenableexcept to trap fp exceptions, and trigger one, for SIGFPE.

Not every CPU traps integer division by zero -- aarch64, powerpc,
&c., just return zero.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315
# 1.53 14-Mar-2018 kamil

Add new ATF tests: kernel/t_zombie

New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-compat-base
# 1.52 14-Dec-2017 nakayama

branches: 1.52.2;
Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.52 14-Dec-2017 nakayama

Use SCRIPTS instead of PROGS to avoid strip(1) if STRIPFLAG=-s.


# 1.51 12-Dec-2017 christos

PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
It needs libpthread regardless MKRUMP..


# 1.50 10-Dec-2017 christos

Add tests to make sure that the program name is what it is supposed to be.


# 1.49 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


# 1.48 07-Dec-2017 christos

Add trapsignal tests that make sure that traps don't end up spinning
indefinitely, discussed in tech-kern.


# 1.47 06-Dec-2017 christos

add a test to check that the interpreter is preserved when executing scripts.


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.46 03-Apr-2017 kamil

Remove tests/kernel/t_ptrace* from the tree

ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>


# 1.45 02-Apr-2017 kamil

Remove kernel/arch/{amd64,i386,x86} tests

These files were merged with kernel/t_ptrace_wait*

This removes MD test files.

Sponsored by <The NetBSD Foundation>


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.44 14-Dec-2016 kamil

branches: 1.44.2;
Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.


# 1.44 14-Dec-2016 kamil

Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build

Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>


# 1.43 02-Dec-2016 kamil

Refactor location of amd64-specific ATF tests to new dir kernel/arch/amd64

Rename
- tests/kernel/t_ptrace_amd64_wait.c
to
- tests/kernel/arch/amd64/t_ptrace_wait.c
and adapt appropriate files accordingly.

New directory will be used for more amd64-specific tests, verifying the
MD parts of the kernel.

Remove old entries from distrib/sets/lists as they were added a while ago.

Sponsored by <The NetBSD Foundation>


# 1.42 01-Dec-2016 kamil

Add new test file t_ptrace_amd64_wait.c and refactor t_ptrace_*wait* tests

Clone t_ptrace_wait.c to t_ptrace_amd64_wait.c and put common parts to
t_ptrace_wait.h.

The t_ptrace_amd64_wait.c file is dedicated to hold amd64-specific tests
for the ptrace(2) interface.

Add new basic test dbreg1 in t_ptrace_amd64_wait{,3,4,6,id,pid}:
Verify plain PT_GETDBREGS with printing Debug Registers

Fix evbarm64-aarch64 issue pointed by <christos>, kill1 and kill2 tests
must be defined without PT_STEP guards.

Sponsored by <The NetBSD Foundation>


# 1.41 07-Nov-2016 kamil

Add new tests for combination of wait(2) interfaces with ptrace(2)

Move out wait(2) specific tests from t_ptrace and put them to t_ptrace_wait

Add generic code fragments to reuse the same source-code for every member
of the wait(2) family, namely:
- wait(2)
- waitpid(2)
- waitid(2)
- wait3(2)
- wait4(2)
- wait6(2)

Currently in the new test-suite there are the following tests:
- traceme1
- traceme2
- traceme3
- traceme4
- attach1

Not all tests are possible to be executed against every wait(2)-like
interface, therefore they will be disabled in such case. Currently this
limits attach1 to waitpid(2), waitid(2), wait4(2), wait6(2), while the
other tests (traceme 1-4) run with all of the interfaces.

The construct of this file is dedicated for addition of new tests in the
close future.

As of now all of the tests pass correctly.

Thanks for Robert Elz for suggestions on improving the code (earlier draft
of this new form).

Sponsored by <The NetBSD Foundation>.


Revision tags: pgoyette-localcount-20161104
# 1.40 02-Nov-2016 kamil

Add new test t_ptrace with traceme1

This test is a placeholder for further checks of the native ptrace(2)
function calls.

XXX: Is it safe to call ATF functions from a child? FreeBSD seems to
construct dedicated asserts for them.

XXX: printf(3) calls from a child are not intercepted by atf-run(1)

Sponsored by <The NetBSD Foundation>.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.39 15-Feb-2016 christos

branches: 1.39.2;
This needs _KERNTYPES on some platforms.


# 1.38 23-Jan-2016 christos

Define _KERNTYPES for things that need it.


# 1.37 22-Jun-2015 matt

Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
# 1.36 10-Aug-2014 tls

Merge tls-earlyentropy branch into HEAD.


Revision tags: tls-earlyentropy-base
# 1.35 09-Aug-2014 gson

Test that reading a CTLTYPE_INT sysctl variable into a buffer that is
too small returns ENOMEM, and that reading it into a buffer that is
large enough returns the expected sizeof(int) bytes of data.


# 1.34 10-Jun-2014 he

Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser. Fixes build for sun2.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.33 16-Apr-2013 mlelstv

branches: 1.33.4;
First attempt at stress testing umount of a busy disk.


Revision tags: agc-symver-base
# 1.32 28-Feb-2013 martin

Add a testprogram for PR 47598.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7
# 1.31 07-Nov-2012 pgoyette

Add missing '+' so we include t_lock as well as t_lockf and others.

Should fix the build break.


# 1.30 07-Nov-2012 pgoyette

Add ATF version of the file locking test


# 1.29 07-Nov-2012 nakayama

Fix MKRUMP=no build.
librt is unrelated to rump.


# 1.28 05-Nov-2012 pgoyette

Convert to ATF format the old src/regress/ style tests for Sys V IPC


# 1.27 03-Nov-2012 pgoyette

Convert the old src/regress/mqueue test to ATF


Revision tags: yamt-pagecache-base6
# 1.26 08-Aug-2012 christos

branches: 1.26.2;
Exclude tests that use rump


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
# 1.25 17-Mar-2012 jruoho

Move the _lwp_ctl(2) preemption counter check to the right place.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.24 13-Feb-2012 martin

Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc
and kernel, but that is an implementation detail unrelated to the tests
themselfs.
Ok: releng


# 1.23 11-Feb-2012 martin

Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.


# 1.22 24-Nov-2011 christos

Add a test for the kernel snprintf.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.21 15-Oct-2011 jruoho

branches: 1.21.2;
Move the sigaction(2) test to the right place.


# 1.20 15-Oct-2011 jruoho

Move the ucontext(2) test to the right place.


# 1.19 15-Oct-2011 jruoho

Move the writev(2) test to the right place.


# 1.18 15-Oct-2011 jruoho

Move the clock_gettime(2) timer test to the right place.


# 1.17 15-Oct-2011 jruoho

Follow the design principles of tests(7) by merging 't_poll3w' to 't_poll'
as a test case instead of separate file.


# 1.16 15-Oct-2011 jruoho

Move the mkdir(2) test to the right place.


# 1.15 15-Oct-2011 jruoho

Move the pipe(2) test to the right place.


# 1.14 15-Oct-2011 jruoho

Move the posix_fadvise(2) test to the right place.


# 1.13 24-Sep-2011 christos

Add a pty test, written by Matthew Mondor


Revision tags: cherry-xenmp-base
# 1.12 28-May-2011 tron

Move regression test for PR kern/44986 from "kernel" to "syscalls" as
the later directory seems to be a better fit.


# 1.11 28-May-2011 tron

Add two test cases for pollts(2):
- The first tests basic functionality e.g. timeouts and correct events.
- The second tests whether pollts(2) correctly restores the signal mask.
This test currently fails because of PR kern/44986.


# 1.10 05-Mar-2011 pgoyette

Add tests for verifying the recent changes to ps_strings

From joerg@ with atf-ification from myself.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.9 11-Nov-2010 pooka

add necessary libs for t_posix_fadvise


# 1.8 02-Aug-2010 pooka

test case for PR kern/43694


# 1.7 14-Jul-2010 jmmv

Add a couple of simple tests for sigaction(2): one for the case where flags
is set to 0 and the other for the case where we set SA_RESETHAND.

The latter test is intended to expose PR port-macppc/43619 and is marked as
an expected failure on such platform.


# 1.6 13-Jul-2010 jmmv

Get rid of static Atffiles and let bsd.test.mk generate them on the fly.


# 1.5 28-Jun-2010 pooka

xfail test for kernel panicky in PR kern/40688


# 1.4 21-May-2010 pooka

test extattrctl kernel panic (kern/43328)


Revision tags: matt-premerge-20091211
# 1.3 08-Dec-2009 uebayasi

CPPFLAGS.* is per *.c, not per ${PROG} or ${LIB}.


# 1.2 08-Sep-2009 pooka

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


Revision tags: jym-xensuspend-base jym-xensuspend-nbase
# 1.1 20-Feb-2009 jmmv

branches: 1.1.2;
Add the kernel-level tests developed by Lukasz Strzygowski as part of the
atfify GSoC 2008 project.