summaryrefslogtreecommitdiff
path: root/tests/run-debuginfod-archive-rename.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-debuginfod-archive-rename.sh')
-rwxr-xr-xtests/run-debuginfod-archive-rename.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/run-debuginfod-archive-rename.sh b/tests/run-debuginfod-archive-rename.sh
index 4fc1b441..5369949b 100755
--- a/tests/run-debuginfod-archive-rename.sh
+++ b/tests/run-debuginfod-archive-rename.sh
@@ -44,13 +44,18 @@ 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
+# wait till the initial scan is done before triggering a new one
+# and before dropping new file into the scan dirs
+wait_ready $PORT1 'thread_work_total{role="traverse"}' 1
+# Same for the initial groom cycle, we don't want it to be done
+# half way initializing the file setup
+wait_ready $PORT1 'thread_work_total{role="groom"}' 1
+
cp -rvp ${abs_srcdir}/debuginfod-rpms R
if [ "$zstd" = "false" ]; then # nuke the zstd fedora 31 ones
rm -vrf R/debuginfod-rpms/fedora31
fi
-# Make sure the initial scan is done
-wait_ready $PORT1 'thread_work_total{role="traverse"}' 1
kill -USR1 $PID1
# Now there should be 1 files in the index
wait_ready $PORT1 'thread_work_total{role="traverse"}' 2
@@ -65,8 +70,6 @@ SHA=f4a1a8062be998ae93b8f1cd744a398c6de6dbb1
# there are two copies of the same buildid in the index, one for the
# no-longer-existing file name, and one under the new name.
-# Make sure the initial groom cycle has been done
-wait_ready $PORT1 'thread_work_total{role="groom"}' 1
# run a groom cycle to force server to drop its fdcache
kill -USR2 $PID1 # groom cycle
wait_ready $PORT1 'thread_work_total{role="groom"}' 2