diff options
author | Mark Wielaard <mark@klomp.org> | 2021-09-07 23:56:42 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2021-09-07 23:56:42 +0200 |
commit | 5ce85e424907d82797f5efe59a8416ec537ebd9e (patch) | |
tree | 0f2e3ee614e7888276bfef54f36660c3fc9a67e4 /tests/run-debuginfod-dlopen.sh | |
parent | dbd4c8766ea80cb0b6294a6755a556017215eb99 (diff) | |
download | elfutils-5ce85e424907d82797f5efe59a8416ec537ebd9e.tar.gz |
tests: Make sure to wait for initial scan and groom cycle earlier
At startup the debuginfod server does a scan and groom cycle. Make
sure to wait for that before making any changes to the scan dirs. And
not just right before triggering a new one with SIGUSR1 for scan or
SIGURS2 for groom.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'tests/run-debuginfod-dlopen.sh')
-rwxr-xr-x | tests/run-debuginfod-dlopen.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/run-debuginfod-dlopen.sh b/tests/run-debuginfod-dlopen.sh index 5f33394a..39ee5190 100755 --- a/tests/run-debuginfod-dlopen.sh +++ b/tests/run-debuginfod-dlopen.sh @@ -51,6 +51,10 @@ ps -q $PID1 -e -L -o '%p %c %a' | grep groom ps -q $PID1 -e -L -o '%p %c %a' | grep scan ps -q $PID1 -e -L -o '%p %c %a' | grep traverse +# Make sure the initial scan has finished. +# Before moving files under the scan dirs. +wait_ready $PORT1 'thread_work_total{role="traverse"}' 1 + # We use -t0 and -g0 here to turn off time-based scanning & grooming. # For testing purposes, we just sic SIGUSR1 / SIGUSR2 at the process. @@ -71,9 +75,6 @@ BUILDID=`env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../src/readelf \ mv p+r%o\$g F mv p+r%o\$g.debug F -# Make sure the initial scan has finished. -wait_ready $PORT1 'thread_work_total{role="traverse"}' 1 - kill -USR1 $PID1 # Wait till both files are in the index. wait_ready $PORT1 'thread_work_total{role="traverse"}' 2 |