These tests are for the proposed PT_[GS]ET_SIGINFO interface for ptrace(2),
accessors for signal information that caused tracee to be interrupted.
siginfo1:
Verify basic PT_GET_SIGINFO call for SIGTRAP from tracee
siginfo2:
Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls without
modification of SIGINT from tracee
siginfo3:
Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls with
setting signal to new value
New tests are protected with #ifded and currently disabled in the HEAD branch.
They will be automatically enabled once the final implementation will land the
sources.
Sponsored by <The NetBSD Foundation>
This commit does not actually introduce the UVM_HOTPLUG option.
However it does provide developers a way to review, test and try out
the API.
To do this, please go to tests/sys/uvm/ and build and run the tests
there. The tests also have a set of basic load tests, to get a measure
of the performance penalties due to enabling the UVM_HOTPLUG option.
In order to build the tests you need to have at least done the
following in $SRC/
cd $SRC; $NBMAKE do-distrib-dirs includes
cd $SRC/lib/csu; $NBMAKE all install || exit
cd $SRC/external/gpl3/gcc/lib/libgcc/libgcc_s; $NBMAKE all install || exit
cd $SRC/external/gpl3/gcc/lib/libgcc/libgcc; $NBMAKE all install || exit
cd $SRC/lib/libc; $NBMAKE includes all install || exit
cd $SRC/lib/libpthread; $NBMAKE all install || exit
cd $SRC/lib/libm; $NBMAKE all install || exit
cd $SRC/external/gpl3/gcc/lib/libstdc++-v3/; $NBMAKE all install || exit
Once the development environment has these userspace libraries, one
can simple build using $NBMAKE and finally test the kernel API using
atf-run|atf-report
- Do ifconfig -w 10 after ifconfig up
- Accept /1d0h0m..s/ in addition to /23h59m..s/ for expiration time
- Prevent new RA messages from coming after flushing entries
The changes should fix flapping of test results on babylon5.
Addedd tests:
- watchpoint_count
- watchpoint_read
- watchpoint_write_unmodified
- watchpoint_trap_code[0123]
- watchpoint_trap_data_write[0123]
- watchpoint_trap_data_rw[0123]
These code will be reused later for i386 and moved to a common place like
tests/kernel/arch/x86.
These tests are x86 specific only. The same API but different private
ptrace_watchpoint MD part has to be used on other ports.
All tests pass on amd64.
Sponsored by <The NetBSD Foundation>
Add new symbol ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS() to be protected with
the __HAVE_PTRACE_WATCHPOINTS guard.
XXX:
Mark check_happy() with __attribute__((optimize("O0"))).
Disabled optimization is required to make tests for hardware assisted
traps in .text functional.
Tested with GCC 5.4 on NetBSD 7.99.47 amd64
Sponsored by <The NetBSD Foundation>
Before commited MP-safe patch, IPv4 test can run in time without
wait_for_disconnected. Currently, wait_for_disconnected is required
because of locking overhead.
CPU Debug Registers won't be exposed as is to userland.
Hardware Watchpoints will be exported to userland dedicated interface
through the ptrace(2) interface.
Sponsored by <The NetBSD Foundation>
CPU Debug Registers won't be exposed as is to userland.
Hardware Watchpoints will be exported to userland dedicated interface
through the ptrace(2) interface.
Sponsored by <The NetBSD Foundation>
exect(NULL,NULL,NULL) generates 15859 times SIGTRAP on amd64
Currently exect(3) is misdesigned -- see PR port-amd64/51700 and it
needs to be redone from scratch.
This test affects amd64 releng machines causing tests to hang or
fail. As there is little point to test interface that is still not,
designed and implemented and implemented and is breaking tests - skip it
unconditionally for all ports.
Sponsored by <The NetBSD Foundation>
Other ports than amd64 have their own issues, mostly keeping this call as
unimplemented.
While there cast sig_atomic_t to int in the printf(3)-like call -- pointed
out by <martin>
Sponsored by <The NetBSD Foundation>
Currently this test fails on amd64.
PR port-amd64/51700
exect(NULL,NULL,NULL) generates 15859 times SIGTRAP on amd64
On FreeBSD/amd64 this tests passes correctly.
Sponsored by <The NetBSD Foundation>
Add missing SIGTRAP handler. Assert there that the signal is SIGTRAP as
expected and si_code TRAP_TRACE.
This test will break on some ports that have dummy or incomplete
implementation of exect(2).
This test works on amd64 correctly.
Sponsored by <The NetBSD Foundation>
This test is a clone of tests/lib/libc/gen/execve/t_execve
t_exect_null:
Tests an empty exect(2) executing
The function exect() executes a file with the program tracing facilities
enabled (see ptrace(2)).
-- exect(2)
This test will be attached to build afterwards.
Sponsored by <The NetBSD Foundation>
Reported error:
src/tests/kernel/t_ptrace_wait.c:4401:33:
error: missing field 'pl_event' initializer
[-Werror,-Wmissing-field-initializers]
Line in the code:
struct ptrace_lwpinfo info = {0};
Appease it with initializing info to {0, 0}.
Sponsored by <The NetBSD Foundation>
Switch from:
child = atf_utils_fork();
to:
ATF_REQUIRE((child = fork()) != -1);
Prefer the latter as working as intended and not outputing to files with
danger to overwrite files' content after each fork in test-suite.
Discussed with Christos Zoulas.
Sponsored by <The NetBSD Foundation>