+2021-06-16 Frank Ch. Eigler <fche@redhat.com>
+
+ * run-debuginfod-find.sh: Fix intermittent groom/stale failure,
+ due to SIGUSR1/SIGUSR2 races. Trace more.
+
2021-06-15 Frank Ch. Eigler <fche@redhat.com>
* run-debuginfod-find.sh (err): Elaborate. Use as the reliable
echo "zstd=$zstd bsdtar=`bsdtar --version`"
# for test case debugging, uncomment:
-#set -x
+set -x
VERBOSE=-vvv
DB=${PWD}/.debuginfod_tmp.sqlite
}
-
# find an unused port number
while true; do
PORT1=`expr '(' $RANDOM % 1000 ')' + 9000`
cp -rvp ${abs_srcdir}/debuginfod-tars Z
kill -USR1 $PID1
+# Wait till both files are in the index and scan/index fully finished
+wait_ready $PORT1 'thread_work_total{role="traverse"}' 4
+wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
+wait_ready $PORT1 'thread_busy{role="scan"}' 0
+
# All rpms need to be in the index, except the dummy permission-000 one
rpms=$(find R -name \*rpm | grep -v nothing | wc -l)
wait_ready $PORT1 'scanned_files_total{source=".rpm archive"}' $rpms
wait_ready $PORT1 'scanned_files_total{source=".tar.bz2 archive"}' $tb2
kill -USR1 $PID1 # two hits of SIGUSR1 may be needed to resolve .debug->dwz->srefs
+# Wait till both files are in the index and scan/index fully finished
+wait_ready $PORT1 'thread_work_total{role="traverse"}' 5
+wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
+wait_ready $PORT1 'thread_busy{role="scan"}' 0
+
# Expect all source files found in the rpms (they are all called hello.c :)
# We will need to extract all rpms (in their own directory) and could all
# sources referenced in the .debug files.
# copy in the deb files
cp -rvp ${abs_srcdir}/debuginfod-debs/*deb D
kill -USR1 $PID2
+ wait_ready $PORT2 'thread_work_total{role="traverse"}' 2
+ wait_ready $PORT2 'thread_work_pending{role="scan"}' 0
+ wait_ready $PORT2 'thread_busy{role="scan"}' 0
+
# All debs need to be in the index
debs=$(find D -name \*.deb | wc -l)
wait_ready $PORT2 'scanned_files_total{source=".deb archive"}' `expr $debs`