- 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>
Remove atf_tc_expect_fail() linked with PR kern/51685.
Issue fixed by Christsos Zoulas in src/sys/kern/kern_sig.c r. 1.331
Sponsored by <The NetBSD Foundation>
Add new preliminary tests for testing that CPU Debug Registers can be used
to trap on a variable (write operation).
dbregs_dr0_trap_variable:
Verify that setting trap with DR0 triggers SIGTRAP
dbregs_dr1_trap_variable:
Verify that setting trap with DR1 triggers SIGTRAP
dbregs_dr2_trap_variable:
Verify that setting trap with DR2 triggers SIGTRAP
dbregs_dr3_trap_variable:
Verify that setting trap with DR3 triggers SIGTRAP
Sponsored by <The NetBSD Foundation>
lwpinfo1:
Verify baic LWPINFO call for single thread (PT_TRACE_ME)
lwpinfo2:
Verify baic LWPINFO call for single thread (PT_ATTACH from tracer)
Both tests are marked as expected failure PR kern/51685:
ptrace(2): Signal does not set PL_EVENT_SIGNAL in
(struct ptrace_lwpinfo.)pl_event
Sponsored by <The NetBSD Foundation>
Rename dbregs1 to dbregs_print
Rename dbregs[2345] to dbregs_preserve_dr[0123]
Add new tests dbregs_preserve_dr[0123]_yield.
dbregs_preserve_dr0_yield:
Verify that setting DR0 is preserved across ptrace(2) calls with
scheduler yield
dbregs_preserve_dr1_yield:
Verify that setting DR1 is preserved across ptrace(2) calls with
scheduler yield
dbregs_preserve_dr2_yield:
Verify that setting DR2 is preserved across ptrace(2) calls with
scheduler yield
dbregs_preserve_dr3_yield:
Verify that setting DR3 is preserved across ptrace(2) calls with
scheduler yield
Add new tests dbregs_preserve_dr[0123]_continued.
dbregs_preserve_dr0_continued:
Verify that setting DR0 is preserved across ptrace(2) calls and with
continued child
dbregs_preserve_dr1_continued:
Verify that setting DR1 is preserved across ptrace(2) calls and with
continued child
dbregs_preserve_dr2_continued:
Verify that setting DR2 is preserved across ptrace(2) calls and with
continued child
dbregs_preserve_dr3_continued:
Verify that setting DR3 is preserved across ptrace(2) calls and with
continued child
Use more meaningful names for these tests as they are MD specific and
testing precise functionality. Also there will be a growing number of
tests in this category and prefixing everything with plain dbregs and
trailing with a number cannot be verbose.
Sponsored by <The NetBSD Foundation>
dbregs2:
Verify that setting DR0 is preserved across ptrace(2) calls
dbregs3:
Verify that setting DR1 is preserved across ptrace(2) calls
dbregs4:
Verify that setting DR2 is preserved across ptrace(2) calls
dbregs5:
Verify that setting DR3 is preserved across ptrace(2) calls
These tests are deliberately fine-grained as they are expected to penetrate
precisely each functional aspect of CPU Debug Registers on amd64 one after
another.
These tests (and MI ones) might be generated or merged with helper
functions, however in order to copy-and-paste them out of a test-suite and
quickly port to other platform (in order to compare results) it's useful to
keep them as stand-alone as they are.
Code from these tests might be shared with other ports in future, for the
same reason keep them currently as they are.
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>
When called from vrecycle() or vgone() there is a window where the refcount
is greater than zero and another thread could get and release a reference
that would miss VOP_INACTIVE() as the refcount doesn't drop to zero.
Adjust test fs/puffs/t_basic: test VOP_INACTIVE count being greater zero.
- Make vrecycle() more robust by checking v_usecount first and preventing
further references across vn_lock(). Fixes a deadlock where one thread
starts unmount, second thread locks a directory and allocates a vnode
and first thread tries to vrecycle() the directory.
First thread holds vfs_busy and wants vnode, second thread holds vnode
and wants vfs_busy.
- With these fixes in place change cleanvnode() to use vget()/vrecycle()
to reclaim the vnode.
New tests verify that PT_CONTINUE with SIGKILL is equivalent to PT_KILL.
kill1:
Verify that PT_CONTINUE with SIGKILL terminates child
kill2:
Verify that PT_KILL terminates child
Sponsored by <The NetBSD Foundation>
dbregs1:
Verify plain PT_GETDBREGS call without further steps
dbregs2:
Verify PT_GETDBREGS and PT_SETDBREGS calls without changing regs
These tests are to be used to verify CPU Debug Register accessors in the
ptrace(2) interface.
Additionally fix also fpregs2 test to really call PT_SETFPREGS.
Sponsored by <The NetBSD Foundation>
step2:
Verify PT_STEP called twice
step3:
Verify PT_STEP called three times
step4:
Verify PT_STEP called four times
The purpose of these tests is to assert that PT_STEP can be called more
than once and it sill works.
Sponsored by <The NetBSD Foundation>
step1:
Verify single PT_STEP call.
This function is calculating happy numbers just to consume CPU cycles for
the test purpose.
PT_STEP raises SIGTRAP to by caught by a debugger.
Sponsored by <The NetBSD Foundation>