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)
Wed, Jul 22, 8:29 PM
Unknown Object (File)
Wed, Jul 22, 8:26 AM
Unknown Object (File)
Mon, Jul 20, 12:16 AM
Unknown Object (File)
Sun, Jul 19, 4:22 PM
Unknown Object (File)
Fri, Jul 17, 8:35 AM
Unknown Object (File)
Sun, Jul 12, 5:08 PM
Unknown Object (File)
Fri, Jul 10, 10:35 PM
Unknown Object (File)
Tue, Jul 7, 2:09 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.