Setting queue size by TIOCSQSIZE ioctl does not guarantee that data of
that size can be read by single shot of read(2).
Remove assertion based on this assertion, while total amount of data
read from child process is still checked appropriately.
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
Allow to rename snprintf-like functions to avoid clashes with a sanitizer.
This tests needs a fixup to remove 'undef symbol' from the test code
generator.
Fix the kernel pty driver to report closed slave via master's kevent
EVFILT_READ. This behavior matches the behavior for pipes, is
consistent with how FreeBSD implements it and is relied upon by LLDB's
main loop implementation.
Includes feedback by kre and kamil (from tech-kern), commit approved
by kamil.
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.
tripping a KASSERT() failure in the i386-qemu test rig. It turns out this
is due to "rapid" simply being a buggy test that makes assumptions that
aren't always true, especially on slower / uniprocesor hardware. So, the
right thing to do is just remove the test.
- De-_t'ify all of the structure types.
No functional chage, no ABI change (verified with old rump unit test
before and after new librump.so).
Per Taylor's request.
threads running at specific priorities, with support for unbound pools
and per-cpu pools.
Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.
Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.
And thus NetBSD 8.99.29 has arrived.
If we write a byte character into a pointer, a compiler can emit a
read-modify-write operation, especially when a CPU cannot access directly
a character wide address.
In this scenario calling mmap(2) with PROT_WRITE, without PROT_READ will
emit unexpected trap.
There are two possible workarounds for this issue:
- write register wide memory without rmw sequence,
- mark the region with additional protection PROT_READ
Both work for NetBSD/alpha.
Go for the latter as perhaps more safe for dump compilers emitting rmw
sequences.
Investigated by <martin>
These crash signals are crucial for proper handling of abnormal conditions
in a program. The additional purpose of these tests it to assure the proper
handling of these signals for the coming ptrace(2)-related changes in the
signal routing code.
Add a stub for ILL scenarios.
All tests pass (on amd64).
The shell ATF script contains duplicated code. There should be a way to
deduplicate it, without rewrite to C.
Sponsored by <The NetBSD Foundation>
There are at least four types of SIGTRAP events:
- software/hardware single step (trace trap)
- software breakpoint
- hardware breakpoint/watchpoint
- kernel event (exec, fork, vfork, vfork-done, lwp-create, lwp-exit)
A program can execute software breakpoint without the context of being
traced and this is a regular crash signal emitting SIGTRAP (TRAP_BRKPT).
Rename original trap_* tests (trap_simple, trap_handle, trap_mask,
trap_handle_recurse and trap_ignore) to segv_* tests and restrict them for
SIGSEGV.
Add new tests: trap_* testing the same scenarios as segv_ ones, however
verifying the software breakpoint trap (SIGTRAP).
Keep the original name of h_segv.c, and extend it for software breakpoint
events.
The purpose of these tests is to verify SIGTRAP kernel paths without the
ptrace(2) context.
All tests pass.
Sponsored by <The NetBSD Foundation>
New tests attempting to kill, stop, drop or revive a zombie:
- signal1 (SIGKILL)
- signal2 (SIGSTOP)
- signal3 (SIGABRT)
- signal4 (SIGHUP)
- signal5 (SIGCONT)
New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.
These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.
race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.
Sponsored by <The NetBSD Foundation>
with FreeBSD)
* Fix a broken call to open(2) with O_CREAT and no permission argument.
* ANSIfy function definitions.
* Improve failure messages.
From freebsd.org via Brooks Davis - Thanks!