fpregs1:
Verify plain PT_GETFPREGS call without further steps
fpregs2:
Verify PT_GETFPREGS and PT_SETFPREGS calls without changing regs
Sponsored by <The NetBSD Foundation>
Introduce net_common.sh that is to share common functions used in tests
for networking. This commit commonizes extract_new_packets. Other duplicate
codes will be moved to the file in further commits.
Summary of changes in tzdata2016j (2016-11-22 23:17:13 -0800):
Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00.
This creates a new zone Europe/Saratov.
New zone Asia/Atyrau for Atyrau Region, Kazakhstan, is like
Asia/Aqtau except it switched from +04/+05 to +05/+06 in spring
1999, not fall 1994.
Asia/Gaza and Asia/Hebron now use "EEST", not "EET", to denote
summer time before 1948. The old use of "EET" was a typo.
Add new ATF tests for the general purpose register calls.
These tests require platforms to export all of the following macros:
- PT_GETREGS
- PT_SETREGS
- PTRACE_REG_PC
- PTRACE_REG_SET_PC
- PTRACE_REG_SP
- PTRACE_REG_INTRV
This has been done for the sake of C preprocessor magic simplicity.
There are ports without covering all of the above symbols -- skip them.
Added tests
===========
regs1:
Verify plain PT_GETREGS call without further steps
regs2:
Verify plain PT_GETREGS call and retrieve PC
regs3:
Verify plain PT_GETREGS call and retrieve SP
regs4:
Verify plain PT_GETREGS call and retrieve INTRV
regs5:
Verify PT_GETREGS and PT_SETREGS calls without changing regs
Sponsored by <The NetBSD Foundation>
As usual, ATF is actively interfering with test debugging. Almost all
runs in the past few days have failed this test with "stdout not
empty". In one run it timed out:
http://releng.netbsd.org/b5reports/i386/build/2016.11.22.06.51.14/test.html
but in this case ATF helpfully suppressed the log data.
Maybe if someone can figure out how to make the test hang reliably
then they can turn the logging on again and run it outside of ATF to
see what's happening.
In the meantime this problem is not likely to get fixed until we have
a less obstructive testing framework.
loop, to use signals properly. There are two copies of this code; one
uses kvm and the other uses sysctls. One copy had been updated to use
sigset_t and sigsuspend; the other was using vintage sigpause(). Sync
up the code so both use sigpause. Also, use sig_atomic_t, and block
SIGALRM when not waiting for it to avoid a small and unlikely but real
race.
Since the non-modernized copy of the code *had* for some been
modernized to use setitimer instead of just alarm(), propagate that
change to the other copy.
These copies could share more logic than they do.
New tests are direct counterparts to the existing ones {,io_}read_d[1234].
PT_READ_D and PIOD_READ_D (from PT_IO) are traditionally used to transfer
data segment. New tests make use of PT_READ_I and PIOD_READ_I (from PT_IO)
in order to copy text segment from traced process.
Traditionally, ptrace() has
allowed for machines with distinct address spaces for
instruction and data, which is why there are two requests:
conceptually, PT_READ_I reads from the instruction space
and PT_READ_D reads from the data space. In the current
NetBSD implementation, these two requests are completely
identical.
--- ptrace(2)
New tests follow the traditional convention and copy only instructions from
dummy functions.
There are no new tests copying data to .text regions from the traced
process, as this is violating mprotect restrictions. This limitation may be
addressed in future, as there are dedicated sysctl(7) handlers for
debuggers (currently mainly gdb(1)).
Tests verifying identical behavior of PT_READ_I and PT_READ_D are not
planned.
Sponsored by <The NetBSD Foundation>
Rename io_read_write_handshake to io_read_d_write_d_handshake1.
io_read_d_write_d_handshake2:
Verify PT_IO with PIOD_WRITE_D and PIOD_READ_D handshake
This new test first writes and later reads data.
io_read_d_write_d_handshake1 first reads and later writes.
Sponsored by <The NetBSD Foundation>