]> sourceware.org Git - systemtap.git/commitdiff
Use a value for bad syscall that works better on 32-bit ARM
authorWilliam Cohen <wcohen@redhat.com>
Fri, 29 May 2015 19:50:22 +0000 (15:50 -0400)
committerWilliam Cohen <wcohen@redhat.com>
Fri, 29 May 2015 19:50:22 +0000 (15:50 -0400)
On 32-bit ARM the use of -1 for the syscall number for the bad syscall
in the utrace_syscall_args test will result in a kernel oops on some
kernels and the use other negative numbers will result in illegal
instruction exceptions.  Changing the bad syscall to use a large
positive number for the bad syscall to allow this test to work better
on 32-bit arm.

or an illegal instruction fault.

testsuite/systemtap.base/utrace_syscall_args.c

index 2d3da838130e6ddb68c1abfd6b715f0028a03409..9bb66938980abfd0cc0859dcaa6afee6f209f766 100644 (file)
@@ -47,7 +47,7 @@ int main()
                      (unsigned long)0xe38e38e3);
 #endif
 #if (__LONG_MAX__ > __INT_MAX__)
-       rc = syscall ((unsigned long)-1,
+       rc = syscall ((unsigned long)0xffff,
                      (unsigned long)0x1c71c71c71c71c71,
                      (unsigned long)0x0f0f0f0f0f0f0f0f,
                      (unsigned long)0xdb6db6db6db6db6d,
@@ -55,7 +55,7 @@ int main()
                      (unsigned long)0xad6b5ad6b5ad6b5a,
                      (unsigned long)0xdef7ddef7ddef7dd);
 #else
-       rc = syscall ((unsigned long)-1,
+       rc = syscall ((unsigned long)0xffff,
                      (unsigned long)0x1c71c71c,
                      (unsigned long)0x0f0f0f0f,
                      (unsigned long)0xdb6db6db,
This page took 0.029707 seconds and 5 git commands to generate.