<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tests/sys/audit, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F13</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F13'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-08-23T17:43:30Z</updated>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-23T17:43:30Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:32:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9'/>
<id>urn:sha1:023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0ecf)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:21Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=17da660ad5b3b9cd90e164dd4dbb9beaa7203054'/>
<id>urn:sha1:17da660ad5b3b9cd90e164dd4dbb9beaa7203054</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832e8)
</content>
</entry>
<entry>
<title>swapon(8): adapt to the new swapoff(2) interface</title>
<updated>2021-12-20T00:29:11Z</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=ed21083462a66d6d3dd4daa8515333ca42a0290d'/>
<id>urn:sha1:ed21083462a66d6d3dd4daa8515333ca42a0290d</id>
<content type='text'>
(cherry picked from commit b49b6e0f95c89f8dcb5898424c360b46019254b4)
</content>
</entry>
<entry>
<title>tests/sys/audit: add missing comma delimiter between fields</title>
<updated>2021-03-17T22:22:48Z</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=5d89c2e475f2c4d9ff5bab3e229d31c4f2ac950f'/>
<id>urn:sha1:5d89c2e475f2c4d9ff5bab3e229d31c4f2ac950f</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")
(cherry picked from commit c97304110a02f9c41b515e7b94d53229ab8f61af)
</content>
</entry>
<entry>
<title>close_range: add audit support</title>
<updated>2021-03-17T22:22:48Z</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=6805e948c4cecae74887fd6a4a08cf15c2f3061c'/>
<id>urn:sha1:6805e948c4cecae74887fd6a4a08cf15c2f3061c</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

(cherry picked from commit fa32350347b4e351a144b5423f0fb2ca9d67f4ca)
</content>
</entry>
<entry>
<title>tests/sys/audit: Avoid race caused by starting auditd(8) for testing</title>
<updated>2021-03-17T22:22: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=eb52de783a1c079b2ef4d674090322886cc22fc0'/>
<id>urn:sha1:eb52de783a1c079b2ef4d674090322886cc22fc0</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

(cherry picked from commit df093aa9463b2121d8307fb91c4ba7cf17f4ea64)
</content>
</entry>
<entry>
<title>tests/sys/audit: Skip extattr tests if extattrs are not supported</title>
<updated>2021-03-17T09:55:09Z</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2021-02-02T09:55:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=83ffec9005c979d228477ba70038891a5abba835'/>
<id>urn:sha1:83ffec9005c979d228477ba70038891a5abba835</id>
<content type='text'>
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

(cherry picked from commit 40407d3998d1a12cbe929721f4dbe72b4be478a6)
</content>
</entry>
<entry>
<title>tests/sys/audit: fix timeout calculation</title>
<updated>2021-03-17T09:54:34Z</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2021-01-28T17:23:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aa1e3a13cd26549f16efa92eace0a423d4474a4d'/>
<id>urn:sha1:aa1e3a13cd26549f16efa92eace0a423d4474a4d</id>
<content type='text'>
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

(cherry picked from commit 869cc06480b75b4caea0d049e0cf7f82bb5aeed1)
</content>
</entry>
<entry>
<title>tests/sys/audit: force PIE off</title>
<updated>2021-03-05T17:46:11Z</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=812a476244c4c2458942f957cf1188f05459a5d8'/>
<id>urn:sha1:812a476244c4c2458942f957cf1188f05459a5d8</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

(cherry picked from commit 4621c4f2fd179eff0923140da9af122c42dbe78b)
</content>
</entry>
<entry>
<title>Do a sweep and remove most WARNS=6 settings</title>
<updated>2020-10-01T01:10:51Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-10-01T01:10:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7cc42f6d25ef2e19059d088fa7d4853fe9afefb5'/>
<id>urn:sha1:7cc42f6d25ef2e19059d088fa7d4853fe9afefb5</id>
<content type='text'>
Repeating the default WARNS here makes it slightly more difficult to
experiment with default WARNS changes, e.g. if we did something absolutely
bananas and introduced a WARNS=7 and wanted to try lifting the default to
that.

Drop most of them; there is one in the blake2 kernel module, but I suspect
it should be dropped -- the default WARNS in the rest of the build doesn't
currently apply to kernel modules, and I haven't put too much thought into
whether it makes sense to make it so.
</content>
</entry>
</feed>
