diff options
author | Paul Moore <paul@paul-moore.com> | 2017-02-23 13:49:18 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-02-23 13:49:18 -0500 |
commit | cd509da6cd34caefa79273fe88984188c10e030d (patch) | |
tree | bfb140561c97aee3138e105b517becd4b83bf2d1 /tests/13-basic-attrs.c | |
parent | 4ee36afefa419a61af2608807ba776f1fac243fd (diff) | |
download | libseccomp-cd509da6cd34caefa79273fe88984188c10e030d.tar.gz |
tests: update the attr tests to include TSYNC and TSKIP
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tests/13-basic-attrs.c')
-rw-r--r-- | tests/13-basic-attrs.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/13-basic-attrs.c b/tests/13-basic-attrs.c index 80fe215..bbb6765 100644 --- a/tests/13-basic-attrs.c +++ b/tests/13-basic-attrs.c @@ -71,6 +71,28 @@ int main(int argc, char *argv[]) goto out; } + rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_TSYNC, 1); + if (rc != 0 && rc != -EOPNOTSUPP) + goto out; + rc = seccomp_attr_get(ctx, SCMP_FLTATR_CTL_TSYNC, &val); + if (rc != 0) + goto out; + if (val != 1) { + rc = -1; + goto out; + } + + rc = seccomp_attr_set(ctx, SCMP_FLTATR_API_TSKIP, 1); + if (rc != 0) + goto out; + rc = seccomp_attr_get(ctx, SCMP_FLTATR_API_TSKIP, &val); + if (rc != 0) + goto out; + if (val != 1) { + rc = -1; + goto out; + } + rc = 0; out: seccomp_release(ctx); |