systemtap/tests/Regression/elfutils-debuginfod-client-not-being-called/dotest.sh
Martin Cermak 96a7f16670 tests/Regression/elfutils-debuginfod-client-not-being-called: Debuginfod client cache location change
Reflect elfutils upstream commit e939590219 (PR25502) changing the
location of the client cache.  Without this update the first run of
the testcase works, but not the subsequent runs.
2022-08-10 14:05:07 +02:00

29 lines
663 B
Bash

#!/bin/bash
set -xe
rm -rf ~/.cache/debuginfod_client ~/.systemtap ||:
debuginfod -p 8008 -d $(mktemp) -vvvvv >& debuginfod.log &
PID=$!
sleep 5
export SYSTEMTAP_DEBUGINFO_PATH=/tmp
export DEBUGINFOD_URLS="http://127.0.0.1:8008"
# The following doesn't work on aarch64 and s390x because of:
# https://sourceware.org/bugzilla/show_bug.cgi?id=25498
# stap -p2 -e 'probe kernel.function("vfs_read") {println(pp())}' ||:
stap -p2 -e 'probe process("/bin/true").function("main") {println(pp())}' -c /bin/true ||:
sleep 5
kill -9 $PID
grep 'started http server on' debuginfod.log
grep 'searching for buildid=[a-z0-9]* artifacttype=debuginfo' debuginfod.log