Revision tags: release/14.0.0 |
|
#
b3e76948 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
c9730411 |
| 02-Mar-2021 |
Alex Richardson <arichardson@FreeBSD.org> |
tests/sys/audit: add missing comma delimiter between fields
This makes the `kyua report --verbose` output a lot easier to parse when looking at failed tests. It also fixes the closefrom() test since
tests/sys/audit: add missing comma delimiter between fields
This makes the `kyua report --verbose` output a lot easier to parse when looking at failed tests. It also fixes the closefrom() test since I tested my changes with this commit but forgot to push it together with fa32350347b4e351a144b5423f0fb2ca9d67f4ca.
Fixes: fa32350347b4 ("close_range: add audit support")
show more ...
|
#
df093aa9 |
| 18-Feb-2021 |
Alex Richardson <arichardson@FreeBSD.org> |
tests/sys/audit: Avoid race caused by starting auditd(8) for testing
In the CheriBSD CI we reproducibly see the first test in sys/audit (administrative:acct_failure) fail due to a missing startup me
tests/sys/audit: Avoid race caused by starting auditd(8) for testing
In the CheriBSD CI we reproducibly see the first test in sys/audit (administrative:acct_failure) fail due to a missing startup message. It appears this is caused by a race condition when starting auditd: `service auditd onestart` returns as soon as the initial auditd() parent exits (after the daemon(3) call). We can avoid this problem by setting up the auditd infrastructure in-process: libauditd contains audit_quick_{start,stop}() functions that look like they are ideally suited to this task. This patch also avoids forking lots of shell processes for each of the 418 tests by using `auditon(A_SENDTRIGGER, &trigger, sizeof(trigger))` to check for a running auditd(8) instead of using `service auditd onestatus`.
With these two changes (and D28388 to fix the XFAIL'd test) I can now boot and run `cd /usr/tests/sys/audit && kyua test` without any failures in a single-core QEMU instance. Before there would always be at least one failed test.
Besides making the tests more reliable in CI, a nice side-effect of this change is that it also significantly speeds up running them by avoiding lots of fork()/execve() caused by shell scripts: Running kyua test on an AArch64 QEMU took 315s before and now takes 68s, so it's roughly 3.5 times faster. This effect is even larger when running on a CHERI-RISC-V QEMU since emulating CHERI instructions on an x86 host is noticeably slower than emulating AArch64.
Test Plan: aarch64+amd64 QEMU no longer fail.
Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28451
show more ...
|
#
40407d39 |
| 02-Feb-2021 |
Alex Richardson <arichardson@FreeBSD.org> |
tests/sys/audit: Skip extattr tests if extattrs are not supported
In the CheriBSD CI, we run the testsuite with /tmp as tmpfs. This causes the extattr audit tests to fail since tmpfs does not (yet)
tests/sys/audit: Skip extattr tests if extattrs are not supported
In the CheriBSD CI, we run the testsuite with /tmp as tmpfs. This causes the extattr audit tests to fail since tmpfs does not (yet) support extattrs. Skip those tests if the target path is on a file system that does not support extended file attributes.
While touching these two files also convert the ATF_REQUIRE_EQ(-1, ...) checks to use ATF_REQURIE_ERRNO().
Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28392
show more ...
|
#
869cc064 |
| 28-Jan-2021 |
Alex Richardson <arichardson@FreeBSD.org> |
tests/sys/audit: fix timeout calculation
This changes the behaviour to a 30s total timeout (needed when running on slow emulated uniprocessor systems) and timing out after 10s without any input. Thi
tests/sys/audit: fix timeout calculation
This changes the behaviour to a 30s total timeout (needed when running on slow emulated uniprocessor systems) and timing out after 10s without any input. This also uses timespecsub() instead of ignoring the nanoseconds field.
After this change the tests runs more reliably on QEMU and time out less frequently.
Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28391
show more ...
|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
405f0931 |
| 17-Jul-2018 |
Alan Somers <asomers@FreeBSD.org> |
audit(4): add tests for _exit(2), cap_enter(2), and cap_getmode(2)
Also, fix a bug in common code that could cause other tests to fail: using ppoll(2) in combination with buffered I/O for /dev/audit
audit(4): add tests for _exit(2), cap_enter(2), and cap_getmode(2)
Also, fix a bug in common code that could cause other tests to fail: using ppoll(2) in combination with buffered I/O for /dev/auditpipe. Fix it by disabling buffering.
Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16099
show more ...
|
Revision tags: release/11.2.0 |
|
#
b13a70d5 |
| 13-Jun-2018 |
Alan Somers <asomers@FreeBSD.org> |
audit(4): Fix file descriptor leaks in ATF tests
Submitted by: aniketp Reported by: Coverity CID: 1393343 1393346 1392695 1392781 1391709 1392078 1392413 CID: 1392014 1392521 1393344 1393345 13933
audit(4): Fix file descriptor leaks in ATF tests
Submitted by: aniketp Reported by: Coverity CID: 1393343 1393346 1392695 1392781 1391709 1392078 1392413 CID: 1392014 1392521 1393344 1393345 1393347 1393348 1393349 CID: 1393354 1393355 1393356 1393357 1393358 1393360 1393362 CID: 1393368 1393369 1393370 1393371 1393372 1393373 1393376 CID: 1393380 1393384 1393387 1393388 1393389 MFC after: 2 weeks Sponsored by: Google, Inc (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15782
show more ...
|
#
8ec6562b |
| 01-Jun-2018 |
Alan Somers <asomers@FreeBSD.org> |
audit(4): Add tests for the fr class of syscalls
readlink and readlinkat are the only syscalls in this class. open and openat are as well, but they'll be handled in a different file. Also, tidy up
audit(4): Add tests for the fr class of syscalls
readlink and readlinkat are the only syscalls in this class. open and openat are as well, but they'll be handled in a different file. Also, tidy up the copyright headers of recently added files in this area.
Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15636
show more ...
|
#
f7f4e0f7 |
| 30-May-2018 |
Alan Somers <asomers@FreeBSD.org> |
Add initial set of tests for audit(4)
This change includes the framework for testing the auditability of various syscalls, and includes changes for the first 12. The tests will start auditd(8) if n
Add initial set of tests for audit(4)
This change includes the framework for testing the auditability of various syscalls, and includes changes for the first 12. The tests will start auditd(8) if needed, though they'll be much faster if it's already running. The syscalls tested in this commit include mkdir(2), mkdirat(2), mknod(2), mknodat(2), mkfifo(2), mkfifoat(2), link(2), linkat(2), symlink(2), symlinkat(2), rename(2), and renameat(2).
Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15286
show more ...
|