public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Frank Ch. Eigler" <fche@redhat.com>, elfutils-devel@sourceware.org
Subject: Re: patch rfc - valgrind vs. debuginfod
Date: Fri, 02 Jul 2021 18:24:05 +0200	[thread overview]
Message-ID: <c76f8d6d04f5da1b27ec49243acde8fe429e3946.camel@klomp.org> (raw)
In-Reply-To: <18c1ccc2c44a4212a08a9888556781807e8b8e49.camel@klomp.org>

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Hi Frank,

On irc we discussed some issues with trying to disable debuginfod
client for valgrind while actually using it in the to be tested
executable. The main issue is that valgrind and the test executable are
actually one and the same. So disabling or enabling DEBUGINFOD_URLS for
one also disables or enables it for the other.

So maybe it is just simpler to disable testing under valgrind for those
tests that are testing the debuginfod client cache dir directly.

That is what the attached patch does. It is pity to not have valgrind
run over all the tests, but it is the simplest I could come up with.
And this has given us more headaches than we deserve in the first
place.

What do you think?

Thanks,

Mark

[-- Attachment #2: 0001-run-debuginfod-find.sh-Disable-valgrind-for-debuginf.patch --]
[-- Type: text/x-patch, Size: 1721 bytes --]

From ad3c57cfb68d1ef5f6a1d426578d8005048c251e Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Fri, 2 Jul 2021 18:16:00 +0200
Subject: [PATCH] run-debuginfod-find.sh: Disable valgrind for debuginfod
 client cache tests

valgrind itself might use the debuginfod client. So disable valgrind
when testing the cache.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 tests/ChangeLog              | 5 +++++
 tests/run-debuginfod-find.sh | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index d8fa97fa..a0e4ec52 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-02  Mark Wielaard  <mark@klomp.org>
+
+	* run-debuginfo-find.sh: unset VALGRIND_CMD before testing debuginfod
+	client cache.
+
 2021-06-16  Frank Ch. Eigler <fche@redhat.com>
 
 	* run-debuginfod-find.sh: Fix intermittent groom/stale failure,
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 456dc2f8..74a5ceff 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -583,6 +583,11 @@ curl -s http://127.0.0.1:$PORT2/buildid/deadbeef/debuginfo > /dev/null || true
 curl -s http://127.0.0.1:$PORT2/buildid/deadbeef/badtype > /dev/null || true
 (curl -s http://127.0.0.1:$PORT2/metrics | grep 'badtype') && false
 
+# DISABLE VALGRIND checking because valgrind might use debuginfod client
+# requests itself, causing confusion about who put what in the cache.
+# It stays disabled till the end of this test.
+unset VALGRIND_CMD
+
 # Confirm that reused curl connections survive 404 errors.
 # The rm's force an uncached fetch
 rm -f $DEBUGINFOD_CACHE_PATH/$BUILDID/debuginfo .client_cache*/$BUILDID/debuginfo
-- 
2.18.4


  reply	other threads:[~2021-07-02 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  2:34 Frank Ch. Eigler
2021-06-17 10:27 ` Mark Wielaard
2021-07-02 16:24   ` Mark Wielaard [this message]
2021-07-02 18:06     ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c76f8d6d04f5da1b27ec49243acde8fe429e3946.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).