New tests:
- trace_thread1
- trace_thread2
- trace_thread3
- trace_thread4
These tests verify _lwp_create(2) and _lwp_exit(2) events. They are
currently skipped as not reliable.
The siginfo group of ptrace(2) tests has been replaced with new individual
tests or merged into existing ones. This is the last siginfo* test that
has been renamed.
New name: traceme_exec.
Drop test siginfo1 as duplicated with earlier tests.
Rework and rename siginfo2 and siginfo3 into a single test body.
New tests:
- siginfo_set_unmodified (replaces siginfo2)
- siginfo_set_faked (replaces siginfo3)
All new tests pass.
There were tested few scenarios with native _lwp_create(2) functions, using
this interface is not needed and it's easier to manage tests with
high-level pthread(3) API.
Rewrite original lwpinfo1 and lwpinfo2 tests into 8 new tests:
- traceme_lwpinfo0 (0 spawned additional threads)
- traceme_lwpinfo1 (1 spawned additional thread)
- traceme_lwpinfo2 (2 spawned additional threads)
- traceme_lwpinfo3 (3 spawned additional threads)
- attach_lwpinfo0 (0 spawned additional threads)
- attach_lwpinfo1 (1 spawned additional thread)
- attach_lwpinfo2 (2 spawned additional threads)
- attach_lwpinfo3 (3 spawned additional threads)
These tests verify primarily the PT_LWPINFO interface.
Build the t_ptrace_wait* tests with -pthread.
All tests pass.
Drop original scenario of kill1 (PT_CONTINUE(SIGKILL)) as it duplicates
traceme_sendsignal_simple1.
New kill tests:
- kill1: ptrace(PT_KILL) (previously kill2)
- kill2: kill(SIGKILL)
- kill3: killpg(SIGKILL)
All kill* tests share the same function body.
All tests pass.
This change deduplicates the code and puts all the test into shared
function body.
No functional change except ranaming tests regs* to access_regs* and
fpregs* to access_fpregs*.
- Emulate the instructions by executing them directly on the host CPU.
This is easier and probably faster than doing it in software
manually.
- Decode SUB from Primary, CMP from Group1, TEST from Group3, and add
associated tests.
- Handle correctly the cases where an instruction that always implicitly
reads the register operand is executed with the mem operand as source
(eg: "orq (%rbx),%rax").
- Fix the MMU handling of 32bit-PAE. Under PAE CR3 is not page-aligned,
so there are extra bits that are valid.
With these changes in place I can boot Windows XP on Qemu+NVMM.
Add missing code for SIGILL verification and enable new SIGILL tests:
- traceme_crash_ill
- traceme_vfork_crash_ill
- unrelated_tracer_sees_crash_ill
SIGILL is caused by a crash signal and needs special treatement that has
to be asserted to behave correctly.
In the unrelated_tracer_sees_crash* tests add additional check to catch
scenarios when a test dies due to abnormal condition and it's not caught
as the tracer is collected by initproc.
All tests pass on NetBSD/amd64, other ports have temporarily unimplemented
PTRACE_ILLEGAL_ASM.
* Uh I put the wrong masks in some GPRs, fuck.
* When the opsize of MOVZX is 4, we need to combine the zero-extend from
the instruction with the natural zero-extend of long mode.
Add two associated tests.
floating point exceptions - but some (actually all currently know ones)
do not implement sending traps when these exceptions are raised.
Pointed out by Peter Maydell.