diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-03-31 11:10:42 +0200 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-03-31 11:48:03 +0200 |
commit | aeb7573732347cd0bbf0e3d7e560a53f875313cf (patch) | |
tree | ba1f0c53a0d7d8ac5a9a2644257dd7de6383e7b8 /tests/unit/util.c | |
parent | 548a225fb616ee66afb8411f282d44148f67898c (diff) | |
download | seitan-aeb7573732347cd0bbf0e3d7e560a53f875313cf.tar seitan-aeb7573732347cd0bbf0e3d7e560a53f875313cf.tar.gz seitan-aeb7573732347cd0bbf0e3d7e560a53f875313cf.tar.bz2 seitan-aeb7573732347cd0bbf0e3d7e560a53f875313cf.tar.lz seitan-aeb7573732347cd0bbf0e3d7e560a53f875313cf.tar.xz seitan-aeb7573732347cd0bbf0e3d7e560a53f875313cf.tar.zst seitan-aeb7573732347cd0bbf0e3d7e560a53f875313cf.zip |
tests: add tests for filtering the syscalls
Diffstat (limited to 'tests/unit/util.c')
-rw-r--r-- | tests/unit/util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/util.c b/tests/unit/util.c index d4109b0..c6fc3fb 100644 --- a/tests/unit/util.c +++ b/tests/unit/util.c @@ -155,6 +155,21 @@ void check_target_result(long ret, int err, bool ignore_ret) ck_assert_int_eq(close(pipefd[0]), 0); } +void continue_target() +{ + struct seccomp_notif_resp resp; + int ret; + + ret = ioctl(notifyfd, SECCOMP_IOCTL_NOTIF_ID_VALID, &req.id); + ck_assert_msg(ret == 0, strerror(errno)); + resp.id = req.id; + resp.flags = SECCOMP_USER_NOTIF_FLAG_CONTINUE; + resp.error = 0; + resp.val = 0; + ret = ioctl(notifyfd, SECCOMP_IOCTL_NOTIF_SEND, &resp); + ck_assert_msg(ret == 0, strerror(errno)); +} + void setup() { int ret; |