summaryrefslogtreecommitdiff
path: root/tests/run-debuginfod-find.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-debuginfod-find.sh')
-rwxr-xr-xtests/run-debuginfod-find.sh31
1 files changed, 17 insertions, 14 deletions
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index cd31e30e..01c7e58e 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -81,7 +81,8 @@ wait_ready()
done;
if [ $timeout -eq 0 ]; then
- echo "metric $what never changed to $value on port $port"
+ echo "metric $what never changed to $value on port $port"
+ curl -s http://127.0.0.1:$port/metrics
exit 1;
fi
}
@@ -166,7 +167,7 @@ cp -rvp ${abs_srcdir}/debuginfod-rpms R
kill -USR1 $PID1
# All rpms need to be in the index
rpms=$(find R -name \*rpm | wc -l)
-wait_ready $PORT1 'scanned_total{source="archive"}' $rpms
+wait_ready $PORT1 'scanned_total{source=".rpm archive"}' $rpms
kill -USR1 $PID1 # two hits of SIGUSR1 may be needed to resolve .debug->dwz->srefs
# Expect all source files found in the rpms (they are all called hello.c :)
@@ -191,11 +192,11 @@ sourcefiles=$(find -name \*\\.debug \
cd ..
rm -rf extracted
-wait_ready $PORT1 'found_sourcerefs_total{source="archive"}' $sourcefiles
+wait_ready $PORT1 'found_sourcerefs_total{source=".rpm archive"}' $sourcefiles
-# Run a bank of queries against the debuginfod-rpms test cases
+# Run a bank of queries against the debuginfod-rpms / debuginfod-debs test cases
-rpm_test() {
+archive_test() {
__BUILDID=$1
__SOURCEPATH=$2
__SOURCESHA1=$3
@@ -221,14 +222,14 @@ rpm_test() {
# common source file sha1
SHA=f4a1a8062be998ae93b8f1cd744a398c6de6dbb1
# fedora30
-rpm_test c36708a78618d597dee15d0dc989f093ca5f9120 /usr/src/debug/hello2-1.0-2.x86_64/hello.c $SHA
-rpm_test 41a236eb667c362a1c4196018cc4581e09722b1b /usr/src/debug/hello2-1.0-2.x86_64/hello.c $SHA
+archive_test c36708a78618d597dee15d0dc989f093ca5f9120 /usr/src/debug/hello2-1.0-2.x86_64/hello.c $SHA
+archive_test 41a236eb667c362a1c4196018cc4581e09722b1b /usr/src/debug/hello2-1.0-2.x86_64/hello.c $SHA
# rhel7
-rpm_test bc1febfd03ca05e030f0d205f7659db29f8a4b30 /usr/src/debug/hello-1.0/hello.c $SHA
-rpm_test f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2 /usr/src/debug/hello-1.0/hello.c $SHA
+archive_test bc1febfd03ca05e030f0d205f7659db29f8a4b30 /usr/src/debug/hello-1.0/hello.c $SHA
+archive_test f0aa15b8aba4f3c28cac3c2a73801fefa644a9f2 /usr/src/debug/hello-1.0/hello.c $SHA
# rhel6
-rpm_test bbbf92ebee5228310e398609c23c2d7d53f6e2f9 /usr/src/debug/hello-1.0/hello.c $SHA
-rpm_test d44d42cbd7d915bc938c81333a21e355a6022fb7 /usr/src/debug/hello-1.0/hello.c $SHA
+archive_test bbbf92ebee5228310e398609c23c2d7d53f6e2f9 /usr/src/debug/hello-1.0/hello.c $SHA
+archive_test d44d42cbd7d915bc938c81333a21e355a6022fb7 /usr/src/debug/hello-1.0/hello.c $SHA
RPM_BUILDID=d44d42cbd7d915bc938c81333a21e355a6022fb7 # in rhel6/ subdir, for a later test
@@ -276,11 +277,13 @@ if type dpkg-deb 2>/dev/null; then
cp -rvp ${abs_srcdir}/debuginfod-debs/*deb D
kill -USR1 $PID2
# All debs need to be in the index
- debs=$(find D -name \*deb | wc -l)
- wait_ready $PORT2 'scanned_total{source="archive"}' `expr $debs`
+ debs=$(find D -name \*.deb | wc -l)
+ wait_ready $PORT2 'scanned_total{source=".deb archive"}' `expr $debs`
+ ddebs=$(find D -name \*.ddeb | wc -l)
+ wait_ready $PORT2 'scanned_total{source=".ddeb archive"}' `expr $ddebs`
# ubuntu
- rpm_test f17a29b5a25bd4960531d82aa6b07c8abe84fa66 "" ""
+ archive_test f17a29b5a25bd4960531d82aa6b07c8abe84fa66 "" ""
fi
rm -rf $DEBUGINFOD_CACHE_PATH