From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 83AB63858439 for ; Mon, 6 Sep 2021 21:14:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 83AB63858439 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x11.wildebeest.org [172.31.17.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 2883030008A9; Mon, 6 Sep 2021 23:14:47 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id AFB922E82166; Mon, 6 Sep 2021 23:14:46 +0200 (CEST) Date: Mon, 6 Sep 2021 23:14:46 +0200 From: Mark Wielaard To: buildbot@builder.wildebeest.org Cc: elfutils-devel@sourceware.org Subject: Re: Buildbot failure in Wildebeest Builder on whole buildset Message-ID: References: <20210903140840.A291B8026A2@builder.wildebeest.org> <31a5a4ff4a158f1e794a28defc30eb14423208ac.camel@klomp.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="JZxYeC+O50NJQprF" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_BADIPHTTP, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 21:14:50 -0000 --JZxYeC+O50NJQprF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Sep 06, 2021 at 10:02:11PM +0200, Mark Wielaard wrote: > This doesn't really explain the above failures, but there were still > two tests that didn't use their own debuginfod client cache. Also one > set a useless, but confusing DEBUGINFOD_URLS. > > Still looking for explanations of the other FAILS (which I cannot > reproduce locally). As expected there are still several failures on the buildbot workers, but I did manage to replicate one failure locally. It happened because PORT1 and PORT2 were equal. ss -atn | fgrep ":$PORT2" && $PORT1 -ne $PORT2 || break Does actually break when PORT1 == PORT2. The && -ne should have been || -eq. But just simplify the port selection a bit to use non-overlapping ranges (split the 100 possible ports in 0-49 for port1 and 50-99 for port2). Also because of a typo on error only the metrics of port1 were shown. Fix the typo so we can better diagnose the remaining failures. Cheers, Mark --JZxYeC+O50NJQprF Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-tests-Print-metrics-for-both-ports-on-error-and-fix-.patch" >From 7880ccb6483e76847cdf1c6c4e45a2180bee820a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 6 Sep 2021 23:04:06 +0200 Subject: [PATCH] tests: Print metrics for both ports on error and fix port selection On error we would only print the metrics of one port (twice) because of a typo. Also PORT1 and PORT2 could be equal because of a logic error. Fix the typo and simplify the port selection by using non-overlapping ranges to select PORT1 and PORT2. --- tests/ChangeLog | 7 +++++++ tests/debuginfod-subr.sh | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index c1760877..14eb4d98 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2021-09-06 Mark Wielaard + + * debuginfod-subr.sh (err): Change ports to port in for loop so both + PORT1 and PORT2 are used. + (get_ports): Simplify port selection by using for 50 for PORT1 and + second 50 for PORT2. + 2021-09-06 Mark Wielaard * run-debuginfod-file.sh: Set DEBUGINFOD_CACHE_PATH. Export diff --git a/tests/debuginfod-subr.sh b/tests/debuginfod-subr.sh index 3222a2b0..7d238436 100755 --- a/tests/debuginfod-subr.sh +++ b/tests/debuginfod-subr.sh @@ -39,7 +39,7 @@ trap cleanup 0 1 2 3 5 9 15 errfiles_list= err() { echo ERROR REPORTS - for ports in $PORT1 $PORT2 + for port in $PORT1 $PORT2 do echo ERROR REPORT $port metrics curl -s http://127.0.0.1:$port/metrics @@ -129,13 +129,13 @@ archive_test() { get_ports() { while true; do - PORT1=`expr '(' $RANDOM % 100 ')' + $base` + PORT1=`expr '(' $RANDOM % 50 ')' + $base` ss -atn | fgrep ":$PORT1" || break done # Some tests will use two servers, so assign the second var while true; do - PORT2=`expr '(' $RANDOM % 100 ')' + $base` - ss -atn | fgrep ":$PORT2" && $PORT1 -ne $PORT2 || break + PORT2=`expr '(' $RANDOM % 50 ')' + $base + 50` + ss -atn | fgrep ":$PORT2" || break done } -- 2.32.0 --JZxYeC+O50NJQprF--