From: Frank Ch. Eigler Date: Thu, 18 Feb 2021 00:34:09 +0000 (-0500) Subject: testsuite: run-debuginfod-find.sh: Fix grooming test indeterminacy X-Git-Tag: elfutils-0.184~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df2f49d83cebb59af84c133ad2b981fab9332209;p=thirdparty%2Felfutils.git 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 --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 7ced0526d..889f5066d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,11 +1,12 @@ -2021-02-12 Mark Wielaard - - * run-readelf-types.sh: Add CU start to type offset reference. - 2021-02-17 Frank Ch. Eigler * 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 + + * run-readelf-types.sh: Add CU start to type offset reference. 2021-02-07 Alexander Miller diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh index 97f2a6ffe..1ae63e0ee 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 ########################################################################