Commit Graph

2902 Commits

Author SHA1 Message Date
kamil
6f12d81bf6 Add new test siginfo6 in t_ptrace_wait{,3,6,6,id,pid} for ports with PT_STEP
siginfo6:
    Verify single PT_STEP call with signal information check

Sponsored by <The NetBSD Foundation>
2017-01-10 05:08:24 +00:00
christos
2cfb67c03e PR/51803: Ngie Cooper: CID 978321: Don't leak openpty() fd. 2017-01-10 01:31:40 +00:00
kamil
d7bca94546 Add new test siginfo5 in t_ptrace_wait{,3,4,6,id,pid}
siginfo5:
    Verify that fork(2) is intercepted by ptrace(2) with EVENT_MASK
    set to PTRACE_FORK and reports correct signal information

Sponsored by <The NetBSD Foundation>
2017-01-10 00:54:22 +00:00
kamil
bbefe54ab6 PT_GET_SIGINFO is no longer PT_SET_SIGINFO conditional in ATF tests
This interface is MI.

Sponsored by <The NetBSD Foundation>
2017-01-09 22:09:20 +00:00
kamil
5b0bbc1439 Add new test siginfo4 in t_ptrace_wait{,3,4,6,id,pid}
siginfo4:
    Detect SIGTRAP TRAP_EXEC from tracee

This test is currently disabled and it will be enabled once
PT_[SG]ET_SIGINFO will land the sources.

Sponsored by <The NetBSD Foundation>
2017-01-06 22:40:06 +00:00
kamil
9e277af53b Add new tests siginfo[123] in t_ptrace_wait{,3,4,6,id,pid}
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>
2017-01-04 22:27:20 +00:00
kamil
d36d9d0066 Fix typo in atf_tc_set_md_var(): baic -> basic
No functional change.
2017-01-02 21:02:03 +00:00
christos
f0970fd0b2 mixerctl tests from Charlotte Koch 2017-01-02 15:40:09 +00:00
martin
a6d52bb10f All sparc64 CPUs support per page execute protection. 2016-12-31 11:51:20 +00:00
kamil
664dff8c85 Remove unused macro for ATF_TP_ADD_TC_HAVE_DBREGS
This code is unused.

Sponsored by <The NetBSD Foundation>
2016-12-30 17:29:34 +00:00
ozaki-r
aeb848823f Fix typo 2016-12-26 01:26:25 +00:00
cherry
e6ff351e1a convention about function names for predicate checking:
s/uvm_physseg_valid()/uvm_physseg_valid_p()/

per. matt@
2016-12-22 08:15:20 +00:00
ozaki-r
602dc20a5b Enable DEBUG to see what happened on babylon5 2016-12-21 09:46:39 +00:00
ozaki-r
60ce16b544 Restore multiple_routers_single_prefix_cleanup removed wrongly 2016-12-21 07:02:16 +00:00
ozaki-r
ad4db0eb05 Add ifconfig -w to improve test stability 2016-12-21 02:46:08 +00:00
ozaki-r
eb6148c691 Suppress harmless warning message
rump.netstat: sysctlnametomib: net.inet6.udp6.pcblist: No such file or directory
2016-12-21 01:16:18 +00:00
ozaki-r
b9cb282dd4 Reduce unnecessary wait 2016-12-20 10:12:24 +00:00
maya
0e07096e88 define __TEST_FENV in the makefile for t_fe_round
should fix vax build (it doesn't have fenv.h)
2016-12-20 06:13:19 +00:00
maya
893cb91179 use labs for absolute value of long
should fix arm build
2016-12-20 06:07:38 +00:00
maya
377c57d54f add test for fesetround/fegetround that uses lrint (and tests it a bunch).
It doesn't fail on amd64.
2016-12-19 17:38:24 +00:00
cherry
07acf3c096 This is a preview of the uvm_hotplug(9) api code.
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
2016-12-19 12:21:29 +00:00
ozaki-r
eb8acbc1b3 Add a test case for exceeding the number of maximum prefixes
The test case pinpoints purge_detached.
2016-12-19 03:07:05 +00:00
ozaki-r
065169a5d4 Add tests for multiple routers with a single prefix 2016-12-19 02:27:02 +00:00
ozaki-r
5c83990e6b Fix the description of a test 2016-12-19 01:37:30 +00:00
christos
272d6823df fix clang build. 2016-12-17 03:43:38 +00:00
ozaki-r
11a1604c2d Add tests for multiple routers 2016-12-16 09:11:18 +00:00
ozaki-r
2e89e8b1dc Unify common routines 2016-12-16 09:10:37 +00:00
ozaki-r
237c29ba3d Avoid using /var/run/rump.rtadvd.pid 2016-12-16 09:10:08 +00:00
ozaki-r
6e275c7668 Add a test case that deletes auto-configured addresses 2016-12-16 03:49:45 +00:00
ozaki-r
da9347803d Improve stability of the tests
- 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.
2016-12-16 03:14:23 +00:00
kamil
b486a76971 Add ATF tests for hardware assisted watchpoints on amd64
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>
2016-12-15 12:15:20 +00:00
kamil
a513f40fac Prepare t_ptrace_wait.h for hardware watchpoints API
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>
2016-12-15 08:57:24 +00:00
ozaki-r
d4c2ba5a74 Fix that cleanup doesn't run when DEBUG=false 2016-12-15 02:43:56 +00:00
ozaki-r
df9d638687 Add tests for flushing prefix and default router entries 2016-12-14 07:37:26 +00:00
kamil
15bac0f54a Define -D_KERNTYPES in CPPFLAGS unconditionally to fix MKRUMP=no build
Reported by Robert Swindells

Sponsored by <The NetBSD Foundation>
2016-12-14 06:19:59 +00:00
knakahara
ff8a15d36e add wait_for_disconnected to run_test() as well as run_test6().
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.
2016-12-14 03:30:30 +00:00
ozaki-r
031e076338 Rename dump because it's used in net_common.sh 2016-12-14 02:50:42 +00:00
kamil
b8092d5dfa Add regs1 in arch/i386/t_ptrace_wait*
regs1:
    Call PT_GETREGS and iterate over General Purpose registers

Sponsored by <The NetBSD Foundation>
2016-12-13 18:00:10 +00:00
kamil
9feae32a7c Remove dbregs* in arch/amd64/t_ptrace_wait*
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>
2016-12-13 13:09:00 +00:00
kamil
5f84086eb7 Add regs1 in arch/amd64/t_ptrace_wait*
regs1:
    Call PT_GETREGS and iterate over General Purpose registers

Sponsored by <The NetBSD Foundation>
2016-12-13 13:04:18 +00:00
kamil
f9bea37eb4 Define in CPPFLAGS symbol _KERNTYPES in order to get PRIxREGISTER
This type will be used in t_ptrace_wait* for the printf(3) function.

Sponsored by <The NetBSD Foundation>
2016-12-13 12:59:46 +00:00
kamil
2826f37556 Remove dbregs[12] from t_ptrace_wait{,3,4,6,id,pid}
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>
2016-12-13 12:25:05 +00:00
joerg
5e6012ec99 sig_atomic_t does not include volatile. Prevent static analysis from
understanding that the test function is dead.
2016-12-12 10:34:55 +00:00
knakahara
446d4c27f3 fix accidentally if_pppoe atf failure depends on cpu workload.
advised by s-yamaguchi@IIJ, thanks.
2016-12-12 09:56:58 +00:00
nat
baaaeb8681 Update test output to reflect audio changes. 2016-12-11 08:09:29 +00:00
kamil
f120395189 Skip t_exect test because it makes test machines to hang
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>
2016-12-11 03:38:09 +00:00
alnsn
826f45ea87 AES XTS unit tests should now pass. 2016-12-11 00:23:44 +00:00
kamil
f6271ea6ad Restrict atf_tc_expect_fail(PR port-amd64/51700) only for amd64 (x86_64)
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>
2016-12-09 08:34:37 +00:00
kamil
56cbf6fa65 Add check in t_exect_null to verify that SIGTRAP was emitted only once
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>
2016-12-09 06:47:48 +00:00
kamil
5e8d31ff24 Attach t_exect to ATF tests and distribution
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>
2016-12-09 06:12:02 +00:00