Page MenuHomeFreeBSD

Add tests for utimes(2), futimes(2), lutimes(2), futimesat(2), mprotect(2) and undelete(2)
ClosedPublic

Authored by aniketp on Jun 19 2018, 12:49 AM.
Tags
None
Referenced Files
F132943396: D15893.id44055.diff
Tue, Oct 21, 9:20 AM
F132891303: D15893.id.diff
Mon, Oct 20, 10:01 PM
F132891301: D15893.id44049.diff
Mon, Oct 20, 10:01 PM
F132891300: D15893.id44081.diff
Mon, Oct 20, 10:01 PM
Unknown Object (File)
Mon, Oct 20, 11:21 AM
Unknown Object (File)
Sun, Oct 19, 3:52 AM
Unknown Object (File)
Mon, Oct 13, 2:47 AM
Unknown Object (File)
Thu, Oct 9, 11:34 PM
Subscribers

Details

Summary

This revision introduces atf-c(3) test cases for verifying the proper auditability of
the aforementioned system calls. The syscalls are in file-attribute-modify audit class

  • utimes(2)
  • futimes(2)
  • lutimes(2)
  • futimesat(2)
  • mprotect(2)
  • undelete(2)

Note: Only the failure mode of undelete(2) has been tested as it works only for whiteout
files in union file-system, which is not used much anymore.

Test Plan

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

asomers requested changes to this revision.Jun 19 2018, 3:00 AM
asomers added inline comments.
tests/sys/audit/file-attribute-modify.c
887 ↗(On Diff #44049)

The man page doesn't specify what 0 means as a protection value. You should use PROT_NONE instead.

This revision now requires changes to proceed.Jun 19 2018, 3:00 AM

Use PROT_NONE instead of 0 for mprotect_success

This revision is now accepted and ready to land.Jun 19 2018, 4:55 PM
This revision was automatically updated to reflect the committed changes.