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
Unknown Object (File)
Mon, Mar 16, 2:04 PM
Unknown Object (File)
Mon, Mar 16, 11:07 AM
Unknown Object (File)
Sun, Mar 15, 11:20 PM
Unknown Object (File)
Thu, Mar 5, 5:51 PM
Unknown Object (File)
Thu, Mar 5, 11:53 AM
Unknown Object (File)
Feb 19 2026, 7:51 AM
Unknown Object (File)
Feb 17 2026, 8:23 PM
Unknown Object (File)
Jan 13 2026, 7:09 AM
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.