]> granicus.if.org Git - strace/commitdiff
tests: workaround systemd-nspawn habit of disabling unimplemented syscalls
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 22 Aug 2018 20:38:27 +0000 (20:38 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 22 Aug 2018 20:38:27 +0000 (20:38 +0000)
* tests/nsyscalls.c (test_syscall): Do not assume that unimplemented
syscalls always fail with ENOSYS.

tests/nsyscalls.c

index 681fb3159629933e51818c4862790e7366a86ba2..e2ebbf99bdc1668675a63986da2f87eb3b5a2f5e 100644 (file)
@@ -82,18 +82,18 @@ test_syscall(const unsigned long nr)
 
 #ifdef LINUX_MIPSO32
        printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)"
-              " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT,
-              a[0], a[1], a[2], a[3], a[4], a[5], rc);
+              " = %s\n", nr | SYSCALL_BIT,
+              a[0], a[1], a[2], a[3], a[4], a[5], sprintrc(rc));
 #else
        printf("syscall_%#lx(%#llx, %#llx, %#llx, %#llx, %#llx, %#llx)"
-              " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT,
+              " = %s\n", nr | SYSCALL_BIT,
               (unsigned long long) a[0],
               (unsigned long long) a[1],
               (unsigned long long) a[2],
               (unsigned long long) a[3],
               (unsigned long long) a[4],
               (unsigned long long) a[5],
-              rc);
+              sprintrc(rc));
 #endif
 }