This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch, pushed, debuginfod testing self-checks


Hi -

Committed as obvious, after observing test failures on some VMs.

commit b260496cedbdec7615b01a5634fb416c18733a11 (HEAD -> master)
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Mon Feb 3 14:11:53 2020 -0500

    debuginfod test: assert curl & rpm2cpio during test prologue
    
    On debian & ubuntu hosts, rpm2cpio is not available by default,
    and heck, curl might not be either.  Check for both these programs
    during tests/run-debuginfod-find.sh startup, else exit-77 (skip).
    
    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>

diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 83ab3388f6e9..6b5dbf8421a6 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -18,6 +18,9 @@
 
 . $srcdir/test-subr.sh  # includes set -e
 
+type curl 2>/dev/null || (echo "need curl"; exit 77)
+type rpm2cpio 2>/dev/null || (echo "need rpm2cpio"; exit 77)
+
 # for test case debugging, uncomment:
 # set -x
 # VERBOSE=-vvvv
@@ -330,15 +333,13 @@ testrun ${abs_builddir}/debuginfod_build_id_find -e F/prog2 1
 
 ########################################################################
 
-# Fetch some metrics, if curl program is installed
-if type curl 2>/dev/null; then
-    curl -s http://127.0.0.1:$PORT1/badapi
-    curl -s http://127.0.0.1:$PORT1/metrics
-    curl -s http://127.0.0.1:$PORT2/metrics
-    curl -s http://127.0.0.1:$PORT1/metrics | grep -q 'http_responses_total.*result.*error'
-    curl -s http://127.0.0.1:$PORT1/metrics | grep -q 'http_responses_total.*result.*fdcache'
-    curl -s http://127.0.0.1:$PORT2/metrics | grep -q 'http_responses_total.*result.*upstream'
-fi
+# Fetch some metrics
+curl -s http://127.0.0.1:$PORT1/badapi
+curl -s http://127.0.0.1:$PORT1/metrics
+curl -s http://127.0.0.1:$PORT2/metrics
+curl -s http://127.0.0.1:$PORT1/metrics | grep -q 'http_responses_total.*result.*error'
+curl -s http://127.0.0.1:$PORT1/metrics | grep -q 'http_responses_total.*result.*fdcache'
+curl -s http://127.0.0.1:$PORT2/metrics | grep -q 'http_responses_total.*result.*upstream'
 
 ########################################################################
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]