summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2021-02-17 19:34:09 -0500
committerFrank Ch. Eigler <fche@redhat.com>2021-02-17 19:34:09 -0500
commitdf2f49d83cebb59af84c133ad2b981fab9332209 (patch)
tree3e8bfdbe977a826cb398b4b411b7e593a1b4e619
parent5fe3a5cda829fc28c71fd3ef4f5371b9f5698970 (diff)
downloadelfutils-df2f49d83cebb59af84c133ad2b981fab9332209.tar.gz
testsuite: run-debuginfod-find.sh: Fix grooming test indeterminacy
We were looking at a less-than-ideal metric to check the effects of grooming on the database. It turns out there is a counter just for removed files/archives, which will have the same value regardless of the presence of other test configurations. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
-rw-r--r--tests/ChangeLog11
-rwxr-xr-xtests/run-debuginfod-find.sh7
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 7ced0526..889f5066 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,11 +1,12 @@
-2021-02-12 Mark Wielaard <mark@klomp.org>
-
- * run-readelf-types.sh: Add CU start to type offset reference.
-
2021-02-17 Frank Ch. Eigler <fche@redhat.com>
* run-debuginfod-find.sh: Tweak wait_ready() to also print -vvv log of
- appropriate debuginfod if metric timeout occurs.
+ appropriate debuginfod if metric timeout occurs. Focus grooming
+ test carefully at a more deterministic metric.
+
+2021-02-12 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-types.sh: Add CU start to type offset reference.
2021-02-07 Alexander Miller <alex.miller@gmx.de>
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 97f2a6ff..1ae63e0e 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -348,15 +348,16 @@ RPM_BUILDID=d44d42cbd7d915bc938c81333a21e355a6022fb7 # in rhel6/ subdir, for a l
rm -r R/debuginfod-rpms/rhel6/*
kill -USR2 $PID1 # groom cycle
-# Expect 3 rpms to be deleted by the groom
# 1 groom cycle already took place at/soon-after startup, so -USR2 makes 2
wait_ready $PORT1 'thread_work_total{role="groom"}' 2
-wait_ready $PORT1 'groom{statistic="archive d/e"}' `expr $rpms - 3`
+# Expect 4 rpms containing 2 buildids to be deleted by the groom
+wait_ready $PORT1 'groomed_total{decision="stale"}' 4
rm -rf $DEBUGINFOD_CACHE_PATH # clean it from previous tests
+# this is one of the buildids from the groom-deleted rpms
testrun ${abs_top_builddir}/debuginfod/debuginfod-find executable $RPM_BUILDID && false || true
-
+# but this one was not deleted so should be still around
testrun ${abs_top_builddir}/debuginfod/debuginfod-find executable $BUILDID2
########################################################################