#
# Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
# Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
+# Copyright (c) 2014-2017 The strace developers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
check_prog sed
check_prog tr
-run_prog ./stack-fcall
+run_prog ../stack-fcall
run_strace -e getpid -k $args
expected='getpid f3 f2 f1 f0 main '
-result=$(sed -n '1,/(main+0x[a-f0-9]\+) .*/ s/^.*(\([^+]\+\)+0x[a-f0-9]\+) .*/\1/p' "$LOG" |
+result=$(sed -r -n '1,/\(main\+0x[a-f0-9]+\) .*/ s/^.*\(([^+]+)\+0x[a-f0-9]+\) .*/\1/p' "$LOG" |
tr '\n' ' ')
test "$result" = "$expected" || {