#!/bin/bash SCRIPTPATH="@CRASH_TESTS_PATH@" source "$SCRIPTPATH/tests_common.sh" source "$SCRIPTPATH/crash_common.sh" test ! -z "$CRASH_STACK" test_result $? crash-stack installed # GDB backtrace examples: # armv7l #0 0xb6eabbe8 in nanosleep () from /lib/libc.so.6 #1 0xb6eab954 in sleep () from /lib/libc.so.6 #2 0x0001097c in bar () #3 0x000109e0 in foo () #4 0x00010b7c in main () # aarch64 #0 0x0000007f79c1a6d4 in ?? () from /lib64/libc.so.6 #1 0x0000007f79c1a4dc in sleep () from /lib64/libc.so.6 #2 0x0000000000400bc4 in bar () #3 0x0000000000400c24 in foo () #4 0x0000000000400da0 in main () # x86_64 emulator #0 0x00007ff6d96e3f40 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81 #1 0x00007ff6d96e3df7 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:138 #2 0x0000000000400a23 in bar () #3 0x0000000000400a67 in foo () #4 0x0000000000400b81 in main () # i686 emulator #0 0xb76e4a41 in __kernel_vsyscall () #1 0xb75d99f0 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81 #2 0xb75d9828 in __sleep (seconds=2147483648) at ../sysdeps/unix/sysv/linux/sleep.c:138 #3 0x080487fa in bar () #4 0x0804883c in foo () #5 0x0804893d in main () sleep_funcs="(__|)nanosleep (__|)sleep bar foo main __libc_start_main _start" for flags in custom default; do test_crash_stack test1-$flags-sleep $sleep_funcs done crash_funcs="bar foo main __libc_start_main _start" for method in crash ill; do for flags in custom default; do test_crash_worker test1-$flags-$method $crash_funcs done done print_info exit $?