freebsd-nq/lib/libc/tests/sys
Kyle Evans 1fc421287d libc: tests: add some tests for cpuset(2)
The cpuset(2) tests should be run as root (require.user properly set) with
>= 3 cpus for maximum coverage. All tests that want to modify the cpuset
don't assume any particular cpu layout (i.e. the first cpu may not be 0, the
last may not be first + count) and the following scenarios are tested:

1.) newset: basic execute cpuset() to grab a new cpuset, make sure the
    assigned cpuset then has a different ID.
2.) transient: create a new cpuset then assign the process its original
    cpuset, ensuring that the one we created is now gone.
3.) deadlk: test assigning an anonymous mask, then resetting the process
    base affinity with 1-cpu overlap w.r.t. the anonymous mask and with
    0-cpu overlap w.r.t. the anonymous mask.
4.) jail_attach_newbase: process attaches to a jail with its own
    cpuset+mask (e.g. cpuset -c -l 1,2 jail -c path=/ command=/bin/sh)
5.) jail_attach_newbase_plain: process attaches to a jail with its own
    cpuset (e.g. cpuset -c jail -c path=/ command=/bin/sh)
6.) jail_attach_prevbase: process attaches to a jail with the containing
    jail's root cpuset (e.g. jail -c path=/ command=/bin/sh)
7.) jail_attach_plain: process attaches to a jail with the containing jail's
    root cpuset+mask.
8.) badparent: creates a new cpuset and modifies the anonymous thread mask,
    then setid's back to the original and checks that cpuset_getid() returns
    the expected set.

Differential Revision:	https://reviews.freebsd.org/D27307
2020-12-31 12:31:54 -06:00
..
brk_test.c Reimplement brk() and sbrk() to avoid the use of _end. 2018-06-04 19:35:15 +00:00
cpuset_test.c libc: tests: add some tests for cpuset(2) 2020-12-31 12:31:54 -06:00
Makefile libc: tests: add some tests for cpuset(2) 2020-12-31 12:31:54 -06:00
Makefile.depend
mlock_helper.c Provide separate accounting for user-wired pages. 2019-05-13 16:38:48 +00:00
queue_test.c
sendfile_test.c Pass a valid mode with O_CREATE to open(2). 2020-09-02 21:17:54 +00:00