From: Paul Moore <[email protected]>

Signed-off-by: Paul Moore <[email protected]>
---
 tests/13-basic-attrs.c  |   22 ++++++++++++++++++++++
 tests/13-basic-attrs.py |    5 +++++
 2 files changed, 27 insertions(+)

diff --git a/tests/13-basic-attrs.c b/tests/13-basic-attrs.c
index 80fe2155..bbb67657 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);
diff --git a/tests/13-basic-attrs.py b/tests/13-basic-attrs.py
index 5fdf998f..8133942b 100755
--- a/tests/13-basic-attrs.py
+++ b/tests/13-basic-attrs.py
@@ -42,6 +42,11 @@ def test():
     f.set_attr(Attr.CTL_NNP, 0)
     if f.get_attr(Attr.CTL_NNP) != 0:
         raise RuntimeError("Failed getting Attr.CTL_NNP")
+    if f.get_attr(Attr.CTL_TSYNC) != 0:
+        raise RuntimeError("Failed getting Attr.CTL_TSYNC")
+    f.set_attr(Attr.API_TSKIP, 0)
+    if f.get_attr(Attr.API_TSKIP) != 0:
+        raise RuntimeError("Failed getting Attr.API_TSKIP")
 
 test()
 

-- 
You received this message because you are subscribed to the Google Groups 
"libseccomp" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to