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.
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.
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>
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>
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>
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>.
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>.