<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tests/sys/audit/Makefile, 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>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: 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>
<entry>
<title>Make audit tests depend on /dev/auditpipe. This should fix</title>
<updated>2020-06-18T15:41:16Z</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2020-06-18T15:41:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a8ca275b7d962a13ef38c6b6d63efbbd0efa367f'/>
<id>urn:sha1:a8ca275b7d962a13ef38c6b6d63efbbd0efa367f</id>
<content type='text'>
some 416 failing tests on armv7:

https://ci.freebsd.org/job/FreeBSD-head-armv7-test/lastCompletedBuild/testReport/

Reviewed by:	asomers
MFC after:	2 weeks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D25144
</content>
</entry>
<entry>
<title>Fix and simplify code by using ATF_REQUIRE_FEATURE macro</title>
<updated>2019-04-01T14:21:32Z</updated>
<author>
<name>Olivier Cochard</name>
<email>olivier@FreeBSD.org</email>
</author>
<published>2019-04-01T14:21:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8f462da4f3cf6cabcbac87c971634bcdec12fe06'/>
<id>urn:sha1:8f462da4f3cf6cabcbac87c971634bcdec12fe06</id>
<content type='text'>
PR:		236857
Reviewed by:	asomers, ngie
Approved by:	emaste
MFC after:	 1 month
Sponsored by:	Netflix
</content>
</entry>
<entry>
<title>audit(4) tests: require /etc/rc.d/auditd</title>
<updated>2018-12-17T18:11:06Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-12-17T18:11:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7fe3fd48a5c9b1a082cb5d3a4da4469fd5666382'/>
<id>urn:sha1:7fe3fd48a5c9b1a082cb5d3a4da4469fd5666382</id>
<content type='text'>
These tests should be skipped if /etc/rc.d/auditd is missing, which could be
the case if world was built with WITHOUT_AUDIT set.  Also, one test case
requires /etc/rc.d/accounting.

Submitted by:	ngie
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd/pull/240
</content>
</entry>
<entry>
<title>audit(4): add tests for sysctl(3) and sysarch(2)</title>
<updated>2018-07-29T20:34:44Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-07-29T20:34:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=70eaeb3622c3f915b892527f7b69163cbc355da3'/>
<id>urn:sha1:70eaeb3622c3f915b892527f7b69163cbc355da3</id>
<content type='text'>
Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D16116
</content>
</entry>
<entry>
<title>audit(4): add tests for the process-control audit class</title>
<updated>2018-06-26T20:26:57Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-06-26T20:26:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c907f24ead1909ab4fd6e5fbcefc5e0613d82213'/>
<id>urn:sha1:c907f24ead1909ab4fd6e5fbcefc5e0613d82213</id>
<content type='text'>
Tested syscalls include rfork(2), chdir(2), fchdir(2), chroot(2),
getresuid(2), getresgid(2), setpriority(2), setgroups(2), setpgrp(2),
setrlimit(2), setlogin(2), mlock(2), munlock(2), minherit(2), rtprio(2),
profil(2), ktrace(2), ptrace(2), fork(2), umask(2), setuid(2), setgid(2),
seteuid(2), and setegid(2).  The last six are only tested in the success
case, either because they're infalliable or a failure is difficult to cause
on-demand.

Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15966
</content>
</entry>
<entry>
<title>audit(4): add tests for ioctl(2)</title>
<updated>2018-06-19T01:32:33Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-06-19T01:32:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4003d9383510b238ee789a49f91a3dc581a64a85'/>
<id>urn:sha1:4003d9383510b238ee789a49f91a3dc581a64a85</id>
<content type='text'>
Submitted by:	aniketp
MFC after:	2 weeks
Sponsored by:	Google, Inc. (GSoC 2018)
Differential Revision:	https://reviews.freebsd.org/D15872
</content>
</entry>
</feed>
