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)
Fri, Apr 19, 3:44 PM
Unknown Object (File)
Mar 11 2024, 2:56 PM
Unknown Object (File)
Jan 30 2024, 12:01 AM
Unknown Object (File)
Dec 22 2023, 10:46 PM
Unknown Object (File)
Dec 10 2023, 8:56 PM
Unknown Object (File)
Sep 18 2023, 4:18 AM
Unknown Object (File)
Jul 13 2023, 6:09 AM
Unknown Object (File)
Jul 1 2023, 9:12 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.