]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: Disable run-debuginfod-federation-metrics.sh for old libmicrohttpd
authorMark Wielaard <mark@klomp.org>
Thu, 2 Jun 2022 15:36:39 +0000 (17:36 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 2 Jun 2022 15:36:42 +0000 (17:36 +0200)
On really old libmicrohttpd the run-debuginfod-federation-metrics.sh
test will crash debuginfod after too many file descriptors have been
used. libmicrohttpd looses track of the state and aborts instead of
producing an error. Just disable the testcase on these very old versions.

Signed-off-by: Mark Wielaard <mark@klomp.org>
ChangeLog
configure.ac
tests/ChangeLog
tests/Makefile.am

index f1a14b5c0f090324ce910cf022b025a800d9fc76..c5e43e8cd89810f219655447db0c46d4f2b16d6d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-06-02  Mark Wielaard  <mark@klomp.org>
+
+       * configure.ac (OLD_LIBMICROHTTPD): New AM_CONDITIONAL based on
+       libmicrohttpd < 0.9.51.
+
 2022-05-02  Mark Wielaard  <mark@klomp.org>
 
        * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Remove
index 11d1cf82fe847b7bf15edbd7f6d81e21105de6b8..03b67a9da7f389d91db60b29f4e6744197ce39e9 100644 (file)
@@ -783,6 +783,7 @@ AS_IF([test "x$enable_debuginfod" != "xno"], [
     enable_debuginfod=yes # presume success
     PKG_PROG_PKG_CONFIG
     PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= 0.9.33],[],[enable_debuginfod=no])
+    PKG_CHECK_MODULES([oldlibmicrohttpd],[libmicrohttpd < 0.9.51],[old_libmicrohttpd=yes],[old_libmicrohttpd=no])
     PKG_CHECK_MODULES([sqlite3],[sqlite3 >= 3.7.17],[],[enable_debuginfod=no])
     PKG_CHECK_MODULES([libarchive],[libarchive >= 3.1.2],[],[enable_debuginfod=no])
     if test "x$enable_debuginfod" = "xno"; then
@@ -792,6 +793,7 @@ AS_IF([test "x$enable_debuginfod" != "xno"], [
 
 AS_IF([test "x$enable_debuginfod" != "xno"],AC_DEFINE([ENABLE_DEBUGINFOD],[1],[Build debuginfod]))
 AM_CONDITIONAL([DEBUGINFOD],[test "x$enable_debuginfod" = "xyes"])
+AM_CONDITIONAL([OLD_LIBMICROHTTPD],[test "x$old_libmicrohttpd" = "xyes"])
 
 dnl for /etc/profile.d/elfutils.{csh,sh}
 default_debuginfod_urls=""
index 44b8df885ab9800eca3d2f3235fac0f769a9d7e4..fb95692537affb4d850f3145727dd8717931db3a 100644 (file)
@@ -1,3 +1,8 @@
+2022-06-02  Mark Wielaard  <mark@klomp.org>
+
+       * Makefile.am (TESTS): Add run-debuginfod-federation-metrics.sh
+       only when OLD_LIBMICROHTTPD conditional is not set.
+
 2022-04-24  Mark Wielaard  <mark@klomp.org>
 
        * run-debuginfod-webapi-concurrency.sh: Fix PR number in xfail.
index 84c3950a185da2fd2ea1f0e78ff348da9d0c7f67..d30b07c4668fcbb38f9a26ce668ec1c14e3a0a30 100644 (file)
@@ -238,13 +238,17 @@ TESTS += run-debuginfod-dlopen.sh \
         run-debuginfod-archive-test.sh \
         run-debuginfod-federation-sqlite.sh \
         run-debuginfod-federation-link.sh \
-        run-debuginfod-federation-metrics.sh \
          run-debuginfod-percent-escape.sh \
          run-debuginfod-x-forwarded-for.sh \
          run-debuginfod-response-headers.sh \
          run-debuginfod-extraction-passive.sh \
         run-debuginfod-webapi-concurrency.sh
 endif
+if !OLD_LIBMICROHTTPD
+# Will crash on too old libmicrohttpd
+# Too many open file descriptors confuses libmicrohttpd < 0.9.51
+TESTS += run-debuginfod-federation-metrics.sh
+endif
 endif
 
 EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \