Commit Graph

3135 Commits

Author SHA1 Message Date
kre dfcb546256 If we are using the pad audio device, there must be a process with
the corresponding pad device open, or we get EIO from audio accesses

Explained and fix provided by Nathanial Sloss <nat@n.o>

Note: if we are testing and using real audio hardware, the open
of /dev/pad0 is irrelevant (but harmless, so we don't attempt to
check) and what's more it doesn't matter if it succeeds or fails.

If we're testing under qemu (or any other situation where the only
audio "hardware" is pad) then the open will work, and there should be
no more EIO.

If there is no audio hardware of any kind on the system being tested,
the attempt top open /dev/mixer should fail, and the test will be
skipped.
2017-04-20 00:17:11 +00:00
knakahara e7af88294b add opencrypto atf for CRYPTO_3DES_CBC and CRYPTO_AES_CBC(=CRYPTO_RIJNDAEL128_CBC). 2017-04-17 03:59:37 +00:00
riastradh 894367af71 Stress rump hyperentropy a little harder. 2017-04-16 18:24:23 +00:00
kamil b505cb2592 ATF test attach2/t_ptrace_wait* is unstable
Mark it broken with:

PR kern/52168 attach2:t_ptrace_wait* is unsable

In order to get reliable failure, abort this test at the end (if we get
there).
2017-04-16 13:09:40 +00:00
kamil 8cd63a3b3a Mark signal3/t_ptrace_wait* with timeout on sparc 32-bit
PR kern/52167 signal3/t_ptrace_wait* timeouts on sparc 32-bit

This test is also marked as failure on other platforms:

PR kern/51918 ptrace tracee can prevent tracer to get its signals by masking

Both issues are valid on sparc 32-bit, but the timeout one wins.
2017-04-16 12:50:59 +00:00
kamil a0fde0b9f7 Mark syscallemu1/t_ptrace_wait* broken on 32-bit sparc
PR kern/52166
2017-04-16 12:32:03 +00:00
kamil b1bdad9a86 Restore atf_tc_expect_fail in signal4 of t_ptrace_wait*
Accidentally there was removed a PR, it was never fixed.

PR 51918 "ptrace tracee can prevent tracer to get its signals by masking"
2017-04-16 12:03:25 +00:00
ozaki-r ef3b2c8cef Revert "Mark tests of tunnel/AH/IPv6 as expected failure (PR kern/52161)"
The issue was fixed by christos@
2017-04-16 10:34:49 +00:00
ozaki-r 47978ed2ef Mark tests of tunnel/AH/IPv6 as expected failure (PR kern/52161) 2017-04-14 03:35:40 +00:00
ozaki-r 0b5da45aff Add tests for ipsec
- Check if setkey correctly handles algorithms for AH/ESP
- Check IPsec of transport mode with AH/ESP over IPv4/IPv6
- Check IPsec of tunnel mode with AH/ESP over IPv4/IPv6
2017-04-14 02:56:48 +00:00
riastradh 460f0e63ea Gotta mark crashes on signal separately from failures... 2017-04-14 01:30:38 +00:00
kamil 12cbcbd04f Add new macro PTRACE_BREAKPOINT_ASM in <sys/ptrace.h> MD part
This macro ships with a MD-specific assembly instruction triggering
a software breakpoint.

Missing instruction for powerpc targets.

This code is used in ATF tests (lib/libc/sys/t_ptrace_wait).

Original patch by Nick Hudson, thanks!
2017-04-12 18:17:59 +00:00
riastradh de4f8ca0e4 Mark expected failures as such.
Not exactly sure how the PRs correspond -- please fix if this is wrong!
2017-04-12 15:12:55 +00:00
kamil 3864b78528 fork1 and siginfo5 no longer fails on !x86 platforms in t_ptrace_wait*
The PTRACE_FORK operation has been fixed. Patch committed by <martin>

PR kern/52117
2017-04-10 16:45:57 +00:00
kamil 05ffc73c35 Add new ptrace(2) API: PT_SETSTEP & PT_CLEARSTEP
These operations allow to mark thread as a single-stepping one.

This allows to i.a.:
 - single step and emit a signal (PT_SETSTEP & PT_CONTINUE)
 - single step and trace syscall entry and exit (PT_SETSTEP & PT_SYSCALL)

The former is useful for debuggers like GDB or LLDB. The latter can be used
to singlestep a usermode kernel. These examples don't limit use-cases of
this interface.

Define PT_*STEP only for platforms defining PT_STEP.

Add new ATF tests setstep[1234].

These ptrace(2) operations first appeared in FreeBSD.

Sponsored by <The NetBSD Foundation>
2017-04-08 00:25:49 +00:00
kamil 97a670fdb7 Remove tests/kernel/t_ptrace* from the tree
ptrace(2) tests have been moved to tests/lib/libc/sys

Sponsored by <The NetBSD Foundation>
2017-04-03 05:06:28 +00:00
kamil 24e714f435 Import ptrace(2) tests into appropriate directory tests/lib/libc/sys/
This is the correct directory documented in tests/README for such tests.

Discussed with <martin>

Sponsored by <The NetBSD Foundation>
2017-04-02 21:44:00 +00:00
kamil cc4260326d 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>
2017-04-02 01:49:51 +00:00
kamil 8021fa5d7a Merge kernel/t_ptrace_wait with kernel/arch/amd64/t_ptrace_wait
This aims to remove MD-specific tests files for ptrace(2).

Prefix i386 and amd64 tests with unique strings "i386_" and "x86_64_".
This removes conflicts with generic tests.

Sponsored by <The NetBSD Foundation>
2017-04-02 01:14:35 +00:00
kamil 558f1d1e36 Merge kernel/t_ptrace_wait with kernel/arch/i386/t_ptrace_wait
This aims to remove MD-specific tests files for ptrace(2).

Sponsored by <The NetBSD Foundation>
2017-04-02 00:40:12 +00:00
kamil c2be869a55 Merge kernel/t_ptrace_wait with kernel/arch/x86/t_ptrace_wait
This aims to remove MD-specific tests files for ptrace(2).

Sponsored by <The NetBSD Foundation>
2017-04-02 00:29:07 +00:00
kamil e884bc2dfc Correct another string about securelevel in t_ptrace
Change:
    Test must be run with securelevel >= 1

To:
    Test must be run with securelevel >= 0

In attach_pid1_securelevel.

Sponsored by <The NetBSD Foundation>
2017-04-02 00:06:09 +00:00
kamil bce52e0028 Deduplicate code in step* tests in t_ptrace_wait*
No functional change.

Sponsored by <The NetBSD Foundation>
2017-04-02 00:03:40 +00:00
kamil 5ab466b502 Correct securelevel in attach_pid1_securelevel
Assert that a debugger cannot attach to PID 1 with securelevel >= 0
(as root) instead of >= 1.

Sponsored by <The NetBSD Foundation>
2017-04-01 23:51:27 +00:00
kamil c0d49dc8aa Try to fix Clang/LLVM build
Initialize a local variable.
2017-04-01 23:28:02 +00:00
kamil d412f5ec32 Refactor dbregs_dr*_dont_inherit_execve ATF tests for x86/
Eliminate duplicated code.

Sponsored by <The NetBSD Foundation>
2017-04-01 23:25:08 +00:00
martin 75bf572ad0 Make the mutex6 test (which fails every know and then, but too rarely
to actually debug it) print some debug info when failing.
2017-04-01 17:19:40 +00:00
ozaki-r eb849f3e8d Add test cases for ping options 2017-03-31 06:41:40 +00:00
kamil 0a45c98ca6 Remove deuplicated code in dbregs_dr[01234]_dont_inherit_lwp
Currently remove tests for dbregs_dr[67]_dont_inherit_lwp.

Sponsored by <The NetBSD Foundation>
2017-03-30 20:24:35 +00:00
kamil 04aac12dac Eliminate code duplication in the x86 dbregs_dr[0123]_trap_variable* tests
This is work in progress to remove no longer needed code overhead shared
between tests.

Sponsored by <The NetBSD Foundation>
2017-03-30 02:17:38 +00:00
kamil f0df2ef69f Deduplicate shared code in dbregs_preserve_dr[0123]{,_yield,_continued}
Move common function code into shared subroutine.

While there remove checks for defined(HAVE_DBREGS). All x86 ports offer
debug register accessors.

Sponsored by <The NetBSD Foundation>
2017-03-29 23:50:09 +00:00
kamil a730799971 Explain expected behavior for PTRACE_FORK events in t_ptrace_wait*
PR kern/52117 ptrace(2) PTRACE_FORK fails on some platforms

Add message similar to:
    We expect two SIGTRAP events, for child 22199 (TRAP_CHLD,
    pe_report_event=PTRACE_FORK, state.pe_other_pid=child2) and for child2
    (TRAP_CHLD, pe_report_event=PTRACE_FORK, state.pe_other_pid=child)

This should make the expected behavior more clear.

Sponsored by <The NetBSD Foundation>
2017-03-28 13:16:30 +00:00
kamil 203a7bc419 Mark PT_STEP tests in t_ptrace_wait* as broken on ARM
There is a definition of PT_STEP for userland, but no implementation
in the kernel.

PR kern/52119 PT_STEP not supported on arm 32-bit

Sponsored by <The NetBSD Foundation>
2017-03-28 12:39:07 +00:00
kamil 5f3e805bbe Set timeout expected in resume1 (t_ptrace_wait*)
Mark timeout for this test 5 sec. It sometimes works sometimes does not.

Add a local sleep(3) at the end to get consisten report about timeouting
always.

PR kern/51995

Sponsored by <The NetBSD Foundation>
2017-03-28 03:19:20 +00:00
kamil b97ce90e99 Mark fork1 and siginfo5 as broken on sparc, sparc64, evbarm and alpha
PR kern/52117 ptrace(2) PTRACE_FORK fails on some platforms

These tests work on amd64, i386 and xen.

They are part of t_ptrace_wait*.

Sponsored by <The NetBSD Foundation>
2017-03-28 03:03:15 +00:00
kamil 501e6bc911 Optimize signal6 in t_ptrace_wait
Reduce timeout to 5 seconds. This tests timeouts and this change saves
time.

PR kern/51918

Sponsored by <The NetBSD Foundation>
2017-03-28 01:40:39 +00:00
ozaki-r 16ca3747e1 Use the utility functions for rump_server 2017-03-28 01:27:46 +00:00
kamil c6dfd176d2 Mark signal6 as failing due to timeout not regular failure
This test is marked as PR kern/51918.

Timeout has been reported on i386, amd64, alpha, sparc, sparc64, evbarm.
xen.

Sponsored by <The NetBSD Foundation>
2017-03-28 01:00:33 +00:00
maya daa855846a Add failing test cases for PRs kern/2423, kern/3645, kern/4597 2017-03-26 18:26:05 +00:00
skrll 8ff4d6477a kern/52012 kern/52018 kern/52019 were all fixed by christos 2017-03-25 10:07:55 +00:00
pgoyette b57579c759 Rather than ghecking system global state to see if mprotect might be
enabled, use the newly-committed sysctl proc.curproc.paxflags variable
2017-03-25 01:39:20 +00:00
martin 426774e5a3 Do not toggle global security.pax.mprotect state in an attempt to
activate it for the current process. It does not work and tests should
not change global system state anyway.
Instead: skip the test is pax.mprotect is not globally enabled. We could
use a better check for this (querying the current processes pax flags),
but unfortunately we don't have one.
2017-03-24 08:18:27 +00:00
ozaki-r 33479c318b Fix typo 2017-03-24 04:06:19 +00:00
ozaki-r 0cc8b50659 Add test cases for PR kern/52077
From s-yamaguchi@IIJ
2017-03-24 03:47:25 +00:00
martin 44424683d9 Avoid using an uninitialized mutex. 2017-03-23 08:31:00 +00:00
martin 05ad4681cb Do not assume anything about the pseudo-disklabel of a completely zeroed
disk image. Use the raw partition and newfs -I instead.
2017-03-23 08:18:17 +00:00
jdolecek 1e4f0c4e55 add tests for the mount update from rw to rw+log, which used to case the panic
reported in PR kern/52056
2017-03-22 21:33:06 +00:00
martin defea524bf Skip the "migrate" test on architectures not natively using MBR, it
can not work there.
2017-03-22 19:13:40 +00:00
ozaki-r e6b76a5e72 Add some tests to change flags of routes 2017-03-22 06:30:00 +00:00
kre 992d3e66d8 Fix typo in a comment. 2017-03-22 05:35:33 +00:00