PATCH OBV: debuginfod testsuite tweak

Frank Ch. Eigler fche@redhat.com
Thu Feb 18 00:37:09 GMT 2021


Hi -

> Committing as obvious #2:


Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Wed Feb 17 19:34:09 2021 -0500

    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>

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.  Focus grooming
	test carefully at a more deterministic metric.
 
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 97f2a6ffee75..1ae63e0ee79a 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
 
 ########################################################################



More information about the Elfutils-devel mailing list