summaryrefslogtreecommitdiff
path: root/tests/39-basic-api_level.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2022-10-31 13:21:33 -0600
committerTom Hromatka <tom.hromatka@oracle.com>2022-10-31 13:21:47 -0600
commit96989965042a515a3cbcb50e9b98243b9b7d4c37 (patch)
tree98fe9472c53c05575d4841b1bc6df61d3e35b368 /tests/39-basic-api_level.c
parente797591bdd6834272e2db292400f608ed9bd7fab (diff)
downloadlibseccomp-96989965042a515a3cbcb50e9b98243b9b7d4c37.tar.gz
api: add the SCMP_FLTATR_CTL_WAITKILL filter attribute
The SCMP_FLTATR_CTL_WAITKILL attribute requests that the SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV flag be passed to the seccomp(2) system call when possible, which is currently only when the SECCOMP_FILTER_FLAG_NEW_LISTENER flag is also set. Signed-off-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Diffstat (limited to 'tests/39-basic-api_level.c')
-rw-r--r--tests/39-basic-api_level.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/39-basic-api_level.c b/tests/39-basic-api_level.c
index 6c31be1..d3fb54b 100644
--- a/tests/39-basic-api_level.c
+++ b/tests/39-basic-api_level.c
@@ -75,13 +75,20 @@ int main(int argc, char *argv[])
if (api != 6)
return -13;
+ rc = seccomp_api_set(7);
+ if (rc != 0)
+ return -14;
+ api = seccomp_api_get();
+ if (api != 7)
+ return -15;
+
/* Attempt to set a high, invalid API level */
rc = seccomp_api_set(1024);
if (rc != -EINVAL)
return -1001;
/* Ensure that the previously set API level didn't change */
api = seccomp_api_get();
- if (api != 6)
+ if (api != 7)
return -1002;
return 0;