3 SCRIPTPATH="@CRASH_TESTS_PATH@"
4 source "$SCRIPTPATH/tests_common.sh"
5 source "$SCRIPTPATH/crash_common.sh"
7 test ! -z "$CRASH_STACK"
8 test_result $? crash-stack installed
10 # GDB backtrace examples:
12 #0 0xb6eabbe8 in nanosleep () from /lib/libc.so.6
13 #1 0xb6eab954 in sleep () from /lib/libc.so.6
14 #2 0x0001097c in bar ()
15 #3 0x000109e0 in foo ()
16 #4 0x00010b7c in main ()
18 #0 0x0000007f79c1a6d4 in ?? () from /lib64/libc.so.6
19 #1 0x0000007f79c1a4dc in sleep () from /lib64/libc.so.6
20 #2 0x0000000000400bc4 in bar ()
21 #3 0x0000000000400c24 in foo ()
22 #4 0x0000000000400da0 in main ()
24 #0 0x00007ff6d96e3f40 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81
25 #1 0x00007ff6d96e3df7 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:138
26 #2 0x0000000000400a23 in bar ()
27 #3 0x0000000000400a67 in foo ()
28 #4 0x0000000000400b81 in main ()
30 #0 0xb76e4a41 in __kernel_vsyscall ()
31 #1 0xb75d99f0 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81
32 #2 0xb75d9828 in __sleep (seconds=2147483648) at ../sysdeps/unix/sysv/linux/sleep.c:138
33 #3 0x080487fa in bar ()
34 #4 0x0804883c in foo ()
35 #5 0x0804893d in main ()
37 sleep_funcs="(__|)nanosleep (__|)sleep bar foo main __libc_start_main _start"
38 for flags in custom default; do
39 test_crash_stack test1-$flags-sleep $sleep_funcs
42 crash_funcs="bar foo main __libc_start_main _start"
43 for method in crash ill; do
44 for flags in custom default; do
45 test_crash_worker test1-$flags-$method $crash_funcs