]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: Add initial scan wait_ready in run-debuginfod-percent-escape.sh
authorMark Wielaard <mark@klomp.org>
Mon, 1 Aug 2022 10:18:30 +0000 (12:18 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 1 Aug 2022 10:18:30 +0000 (12:18 +0200)
Otherwise wait_ready for thread_work_total{role="traverse"} after the
kill -USR1 can be either zero, one or two. We want to see it change to
one first, then after the kill -USR1 it should change to two to be sure
the scan happened after the new binary was created.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tests/ChangeLog
tests/run-debuginfod-percent-escape.sh

index fb573d80c4b1aeb0ad3cf25eb41f19c66814666c..0c6f68ef20e294d0e72fe1133ccced490dcbd1c5 100644 (file)
@@ -1,3 +1,7 @@
+2022-08-01  Mark Wielaard  <mark@klomp.org>
+
+       * run-debuginfod-percent-escape.sh: Add initial scan wait_ready.
+
 2022-04-28  Di Chen  <dichen@redhat.com>
 
        * run-readelf-Dd.sh: New test.
index f7d8dc66ea48f286955f1a08b7168a9080c61f6b..cd8674273ae6307bc605e34ef4355ae1350827b1 100755 (executable)
@@ -34,7 +34,8 @@ tempfiles vlog$PORT1
 errfiles vlog$PORT1
 # Server must become ready
 wait_ready $PORT1 'ready' 1
-# Be patient when run on a busy machine things might take a bit.
+# And initial scan should be done
+wait_ready $PORT1 'thread_work_total{role="traverse"}' 1
 
 # Build a non-stripped binary
 echo "int main() { return 0; }" > ${PWD}/F/p++r\$\#o^^g.c
@@ -44,7 +45,7 @@ BUILDID=`env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../src/readelf \
 tempfiles ${PWD}/F/p++r\$\#o^^g.c ${PWD}/F/p++r\$\#o^^g
 kill -USR1 $PID1
 # Now there should be 1 files in the index
-wait_ready $PORT1 'thread_work_total{role="traverse"}' 1
+wait_ready $PORT1 'thread_work_total{role="traverse"}' 2
 wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
 wait_ready $PORT1 'thread_busy{role="scan"}' 0
 rm -rf $DEBUGINFOD_CACHE_PATH # clean it from previous tests