Skip to content

Commit

Permalink
fanotify_unit_test needs cap_sys_admin+ep
Browse files Browse the repository at this point in the history
  • Loading branch information
sizeofvoid committed Sep 13, 2024
1 parent eeec703 commit 1cc0031
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ target_include_directories(fanotify_unit_test PUBLIC

add_test(NAME event_handler_unit_test COMMAND event_handler_unit_test)
add_test(NAME inotify_unit_test COMMAND inotify_unit_test)

add_custom_command(TARGET fanotify_unit_test POST_BUILD
COMMAND sudo setcap cap_sys_admin+ep $<TARGET_FILE:fanotify_unit_test>
COMMENT "fanotify needs cap_sys_admin to run"
)
add_test(NAME fanotify_unit_test COMMAND fanotify_unit_test)

0 comments on commit 1cc0031

Please sign in to comment.