summaryrefslogtreecommitdiff
path: root/tests/16-sim-arch_basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/16-sim-arch_basic.c')
-rw-r--r--tests/16-sim-arch_basic.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/16-sim-arch_basic.c b/tests/16-sim-arch_basic.c
index df89aa3..02c55d6 100644
--- a/tests/16-sim-arch_basic.c
+++ b/tests/16-sim-arch_basic.c
@@ -40,6 +40,21 @@ int main(int argc, char *argv[])
if (ctx == NULL)
return ENOMEM;
+ /* NOTE: not strictly necessary since we get the native arch by default
+ * but it serves as a good sanity check for the code and boosts
+ * our code coverage numbers */
+ rc = seccomp_arch_exist(ctx, seccomp_arch_native());
+ if (rc != 0)
+ goto out;
+
+ rc = seccomp_arch_remove(ctx, SCMP_ARCH_NATIVE);
+ if (rc != 0)
+ goto out;
+
+ /* NOTE: more sanity/coverage tests (see above) */
+ rc = seccomp_arch_add(ctx, SCMP_ARCH_NATIVE);
+ if (rc != 0)
+ goto out;
rc = seccomp_arch_remove(ctx, SCMP_ARCH_NATIVE);
if (rc != 0)
goto out;