This revision introduces the test-program for ioctl audit class which only contains
ioctl(2) as the audit event.
Details
- Reviewers
asomers rwatson gnn - Commits
- rS335354: audit(4): add tests for ioctl(2)
Execute make && make install from test/sys/audit.
Execute kyua test from /usr/tests/sys/audit. All testcases should succeed.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
tests/sys/audit/ioctl.c | ||
---|---|---|
57 ↗ | (On Diff #43969) | ioctl is superversatile. Does it audit the request too? If so, can you test for that in the regex? |
61 ↗ | (On Diff #43969) | This is probably not a good ioctl to test with, because it might flush the audit record of interest. How about something more harmless, like AUDITPIPE_GET_QLIMIT ? |
Verify the audit of hex(request) in the ioctl(2)'s audit record
@asomers I have opened a separate instance of /dev/auditpipe for the test-case, so it doesn't
matter what is flushed from this device instance, since it is not of our concern.
Also, I pondered initially about which request to use, I chose AUDITPIPE_FLUSH because
it is the simplest of all available options.
tests/sys/audit/ioctl.c | ||
---|---|---|
59 ↗ | (On Diff #43987) | Pro tip: the "#" character tells printf(3) to use an "alternate form", which has different meanings depending on the type of conversion. For example, printf("%#x", 16) will print 0xa. |