| c5cde5af | 30-Mar-2021 |
Alex Richardson <[email protected]> |
resolv_test: Fix racy exit check, remove mutexes, and reduce output
Instead of polling nleft[i] (without appropriate memory barriers!) and using sleep() to detect the exit just call pthread_join() o
resolv_test: Fix racy exit check, remove mutexes, and reduce output
Instead of polling nleft[i] (without appropriate memory barriers!) and using sleep() to detect the exit just call pthread_join() on all threads.
Also replace the use of a mutex that guarding the increments with atomic fetch_add. This should reduce the runtime of this test on SMP systems.
Finally, remove all the debug printfs unless DEBUG_OUTPUT is set in the environment.
Test Plan: still fails sometimes on qemu (but maybe less often?) Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D29390
(cherry picked from commit 85425bdc5a80c948f99aa046f9c48512466806dd)
show more ...
|
| 7abc1009 | 21-Jan-2021 |
Mark Johnston <[email protected]> |
libc/nss tests: Fix getpw and getgr single-pass tests
Some NSS regression tests for getgrent(3) and getpwent(3) were not testing anything because the test incorrectly requested creation of a databas
libc/nss tests: Fix getpw and getgr single-pass tests
Some NSS regression tests for getgrent(3) and getpwent(3) were not testing anything because the test incorrectly requested creation of a database snapshot.
Sponsored by: The FreeBSD Foundation MFC after: 1 month
show more ...
|
| 1fc42128 | 31-Dec-2020 |
Kyle Evans <[email protected]> |
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 as
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
show more ...
|
| 0e907c04 | 09-Sep-2020 |
Kyle Evans <[email protected]> |
libc tests: dynthr_mod: fix some WARNS issues
This is being addressed as part of a side-patch I'm working on that builds all the things with WARNS=6, instead of relying on it being supplied in just
libc tests: dynthr_mod: fix some WARNS issues
This is being addressed as part of a side-patch I'm working on that builds all the things with WARNS=6, instead of relying on it being supplied in just shallow parts of the build with higher-level Makefile.inc.
Provide a prototype for mod_main and annotate the thread function argument as unused.
MFC after: 1 week
show more ...
|
| 2afeaad3 | 03-Sep-2020 |
John Baldwin <[email protected]> |
Various fixes to the load() function.
- Use getline() instead of fgetln(). This ensures the returned string is always null-terminated without losing the last character if the last line in a fil
Various fixes to the load() function.
- Use getline() instead of fgetln(). This ensures the returned string is always null-terminated without losing the last character if the last line in a file doesn't have a newline. Also, while fgetln says the returned buffer can be modified, that doesn't actually seem safe as the current implementation means you are modifying stdio's internal buffer.
- Remove a spurious if before an ATF_REQUIRE that was clearly supposed to be non-optional.
- Remove a pointless compare of 'ptr' against '\0' (really NULL) that duplicated the middle condition in the for().
- Once a comment is found, skip the rest of the line, not just the current word.
Reviewed by: kevans Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26278
show more ...
|