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.

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

aniketp created this revision.Jun 19 2018, 12:49 AM
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
aniketp updated this revision to Diff 44055.Jun 19 2018, 3:04 AM

Use PROT_NONE instead of 0 for mprotect_success

asomers accepted this revision.Jun 19 2018, 4:55 PM
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.