summaryrefslogtreecommitdiff
path: root/tests/15-basic-resolver.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2016-04-19 10:58:34 -0400
committerPaul Moore <paul@paul-moore.com>2016-04-19 10:58:34 -0400
commit13e0bae9571c195ee979a66b329aa538b87ee65d (patch)
treee828ae63a7d4523773dc79ec75447a308f2a5e8f /tests/15-basic-resolver.c
parentc83d6e3676d006d79879e1cd8e621737cdc5e243 (diff)
downloadlibseccomp-13e0bae9571c195ee979a66b329aa538b87ee65d.tar.gz
tests: replace socket syscall references in 15-basic-resolver
On 32-bit x86 the resolved socket syscall() doesn't always resolve to the __NR_socket value due to the direct wired socket syscall so replace it with the read() syscall to ensure the test doesn't fail. Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tests/15-basic-resolver.c')
-rw-r--r--tests/15-basic-resolver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/15-basic-resolver.c b/tests/15-basic-resolver.c
index eff54fe..b3c9497 100644
--- a/tests/15-basic-resolver.c
+++ b/tests/15-basic-resolver.c
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
if (seccomp_syscall_resolve_name("open") != __NR_open)
goto fail;
- if (seccomp_syscall_resolve_name("socket") != __NR_socket)
+ if (seccomp_syscall_resolve_name("read") != __NR_read)
goto fail;
if (seccomp_syscall_resolve_name("INVALID") != __NR_SCMP_ERROR)
goto fail;
@@ -40,7 +40,7 @@ int main(int argc, char *argv[])
"open") != __NR_open)
goto fail;
if (seccomp_syscall_resolve_name_arch(SCMP_ARCH_NATIVE,
- "socket") != __NR_socket)
+ "read") != __NR_read)
goto fail;
if (seccomp_syscall_resolve_name_arch(SCMP_ARCH_NATIVE,
"INVALID") != __NR_SCMP_ERROR)
@@ -51,8 +51,8 @@ int main(int argc, char *argv[])
goto fail;
free(name);
- name = seccomp_syscall_resolve_num_arch(SCMP_ARCH_NATIVE, __NR_socket);
- if (name == NULL || strcmp(name, "socket") != 0)
+ name = seccomp_syscall_resolve_num_arch(SCMP_ARCH_NATIVE, __NR_read);
+ if (name == NULL || strcmp(name, "read") != 0)
goto fail;
free(name);