]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
testsuite: run-debuginfod-find.sh: Fix grooming test indeterminacy
authorFrank Ch. Eigler <fche@redhat.com>
Thu, 18 Feb 2021 00:34:09 +0000 (19:34 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 18 Feb 2021 00:34:09 +0000 (19:34 -0500)
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>
tests/ChangeLog
tests/run-debuginfod-find.sh

index 7ced0526d88e3f2c92c69ac1a3a31b38aea7eecf..889f5066d537aee9c7f207db6f39b42cf0ebf3b8 100644 (file)
@@ -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>
 
index 97f2a6ffee751ca47bcb242c556e859dac530a1e..1ae63e0ee79afd4f1f6ddbbe8938c422ecf0d3e1 100755 (executable)
@@ -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
 
 ########################################################################