diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-03-31 11:48:40 +0200 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-04-03 14:43:21 +0200 |
commit | 79aa938d899c451fed517005c22d00cb03f4bad2 (patch) | |
tree | 646d8bcbe37024bfdb4a832ef9f21eb7dab6e50b /tests/unit/util.c | |
parent | b7350faf8e466184ac665730306c99f6612eb5fd (diff) | |
download | seitan-79aa938d899c451fed517005c22d00cb03f4bad2.tar seitan-79aa938d899c451fed517005c22d00cb03f4bad2.tar.gz seitan-79aa938d899c451fed517005c22d00cb03f4bad2.tar.bz2 seitan-79aa938d899c451fed517005c22d00cb03f4bad2.tar.lz seitan-79aa938d899c451fed517005c22d00cb03f4bad2.tar.xz seitan-79aa938d899c451fed517005c22d00cb03f4bad2.tar.zst seitan-79aa938d899c451fed517005c22d00cb03f4bad2.zip |
filter: fix filter
An additional notification is need either when we jump from an
instruction without arguments then at the end of the argument checks.
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 c6fc3fb..5a1c5aa 100644 --- a/tests/unit/util.c +++ b/tests/unit/util.c @@ -170,6 +170,21 @@ void continue_target() ck_assert_msg(ret == 0, strerror(errno)); } +void mock_syscall_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 = 0; + 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; |