<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tests/sys/audit, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-07-15T22:43:39Z</updated>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>urn:sha1:e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>urn:sha1:d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:16Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b3e7694832e81d7a904a10f525f8797b753bf0d3'/>
<id>urn:sha1:b3e7694832e81d7a904a10f525f8797b753bf0d3</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>tests/sys/audit: Remove MIPS-specific sysarch(2) test.</title>
<updated>2023-03-29T22:06:03Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2023-03-29T22:06:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=60d0871dbfbebe20a9e24c1b4c659cfe841154c1'/>
<id>urn:sha1:60d0871dbfbebe20a9e24c1b4c659cfe841154c1</id>
<content type='text'>
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39330
</content>
</entry>
<entry>
<title>Extend the length of dirpath to fix failure in kyua test</title>
<updated>2022-04-12T16:23:56Z</updated>
<author>
<name>David Bright</name>
<email>dab@FreeBSD.org</email>
</author>
<published>2022-04-12T16:15:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0966fb1b74b38b31dc83e3cca48701ec796bf73a'/>
<id>urn:sha1:0966fb1b74b38b31dc83e3cca48701ec796bf73a</id>
<content type='text'>
When an overlength path is set as the temporary directory for test
case sys/audit/inter-process:shm_unlink_success, the test will fail,
e.g.

```
root@freebsd:/usr/tests/sys/audit # env TMPDIR=/var/tmp/tests/kyua kyua test inter-process:shm_unlink_success
inter-process:shm_unlink_success  -&gt;  failed: shm_unlink.*fileforaudit.*return,success not found in auditpipe within the time limit  [10.452s]

Results file id is usr_tests_sys_audit.20220412-221852-924310
Results saved to /root/.kyua/store/results.usr_tests_sys_audit.20220412-221852-924310.db

0/1 passed (1 failed)
```

The root cause is that dirpath is defined too small to handle it.

Reviewers:	vangyzen, dab
Differential Revision:	https://reviews.freebsd.org/D34885
Submitted by:	Yongbo Yao (yongbo.yao@dell.com)
Sponsored by:	Dell Technologies
</content>
</entry>
<entry>
<title>swapon(8): adapt to the new swapoff(2) interface</title>
<updated>2021-12-09T00:48:59Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2021-12-08T21:05:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b49b6e0f95c89f8dcb5898424c360b46019254b4'/>
<id>urn:sha1:b49b6e0f95c89f8dcb5898424c360b46019254b4</id>
<content type='text'>
also fix test sys/audit/administrative.c.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33343
</content>
</entry>
<entry>
<title>tests/sys/audit: add missing comma delimiter between fields</title>
<updated>2021-03-02T18:37:12Z</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2021-03-02T18:34:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c97304110a02f9c41b515e7b94d53229ab8f61af'/>
<id>urn:sha1:c97304110a02f9c41b515e7b94d53229ab8f61af</id>
<content type='text'>
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")
</content>
</entry>
<entry>
<title>close_range: add audit support</title>
<updated>2021-02-23T17:47:07Z</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2021-02-23T17:47:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fa32350347b4e351a144b5423f0fb2ca9d67f4ca'/>
<id>urn:sha1:fa32350347b4e351a144b5423f0fb2ca9d67f4ca</id>
<content type='text'>
This fixes the closefrom test in sys/audit.

Includes cherry-picks of the following commits from openbsm:

https://github.com/openbsm/openbsm/commit/4dfc628aafe589d68848f7033f3d3488c4d979e0
https://github.com/openbsm/openbsm/commit/99ff6fe32aebc5a4b8d40d60062b8574697df557
https://github.com/openbsm/openbsm/commit/da48a0399e95448693d3fa2be48454ca564c1be8

Reviewed By:	kevans
Differential Revision: https://reviews.freebsd.org/D28388
</content>
</entry>
<entry>
<title>tests/sys/audit: force PIE off</title>
<updated>2021-02-19T01:45:36Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2021-02-19T01:41:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4621c4f2fd179eff0923140da9af122c42dbe78b'/>
<id>urn:sha1:4621c4f2fd179eff0923140da9af122c42dbe78b</id>
<content type='text'>
df093aa9463b linked against libprivateauditd.a, but that is currently
(and incorrectly) built as position-dependent.  For now just force PIE
off for this test to fix the WITH_PIE build.

Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>tests/sys/audit: Avoid race caused by starting auditd(8) for testing</title>
<updated>2021-02-18T14:02:48Z</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2021-02-18T10:14:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df093aa9463b2121d8307fb91c4ba7cf17f4ea64'/>
<id>urn:sha1:df093aa9463b2121d8307fb91c4ba7cf17f4ea64</id>
<content type='text'>
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, &amp;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 &amp;&amp; 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
</content>
</entry>
</feed>
