Skip to content

Commit 1cc0031

Browse files
committed
fanotify_unit_test needs cap_sys_admin+ep
1 parent eeec703 commit 1cc0031

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/unit/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@ target_include_directories(fanotify_unit_test PUBLIC
3333

3434
add_test(NAME event_handler_unit_test COMMAND event_handler_unit_test)
3535
add_test(NAME inotify_unit_test COMMAND inotify_unit_test)
36+
37+
add_custom_command(TARGET fanotify_unit_test POST_BUILD
38+
COMMAND sudo setcap cap_sys_admin+ep $<TARGET_FILE:fanotify_unit_test>
39+
COMMENT "fanotify needs cap_sys_admin to run"
40+
)
3641
add_test(NAME fanotify_unit_test COMMAND fanotify_unit_test)

0 commit comments

Comments
 (0)