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.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/16-sim-arch_basic.c b/tests/16-sim-arch_basic.c
index f2d122c..5b02cca 100644
--- a/tests/16-sim-arch_basic.c
+++ b/tests/16-sim-arch_basic.c
@@ -40,16 +40,26 @@ int main(int argc, char *argv[])
if (ctx == NULL)
goto out;
- if (seccomp_arch_native() != SCMP_ARCH_X86) {
+ if (seccomp_arch_exist(ctx, SCMP_ARCH_X86)) {
rc = seccomp_arch_add(ctx, SCMP_ARCH_X86);
if (rc != 0)
goto out;
}
- if (seccomp_arch_native() != SCMP_ARCH_X86_64) {
+ if (seccomp_arch_exist(ctx, SCMP_ARCH_X86_64)) {
rc = seccomp_arch_add(ctx, SCMP_ARCH_X86_64);
if (rc != 0)
goto out;
}
+ if (seccomp_arch_exist(ctx, SCMP_ARCH_X32)) {
+ rc = seccomp_arch_add(ctx, SCMP_ARCH_X32);
+ if (rc != 0)
+ goto out;
+ }
+ if (seccomp_arch_exist(ctx, SCMP_ARCH_ARM)) {
+ rc = seccomp_arch_add(ctx, SCMP_ARCH_ARM);
+ if (rc != 0)
+ goto out;
+ }
rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 1,
SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO));