public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stefan Liebler <stli@linux.ibm.com>
To: libc-alpha@sourceware.org
Cc: Stefan Liebler <stli@linux.ibm.com>,
	Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Subject: [PATCH v2] Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing
Date: Tue, 24 Nov 2020 11:33:25 +0100	[thread overview]
Message-ID: <20201124103325.1422161-1-stli@linux.ibm.com> (raw)

Starting with commit 29fddfc7dfd6444fa61a256e9a0d0127545e1f2e, the
tests posix/bug-ga2 and resolv/tst-leaks2 are test-container tests.

If test-container.c returns with EXIT_UNSUPPORTED, the tests with
mtrace() are not executed and the mtrace files do not exist.

Therefore the "mtrace-analysis-part" of those tests are marked
UNSUPPORTED if the mtrace files are missing.

Reported-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
---
 posix/Makefile  | 4 +++-
 resolv/Makefile | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/posix/Makefile b/posix/Makefile
index fa2d0675cd..a69a38f795 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -358,7 +358,9 @@ $(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
 	$(evaluate-test)
 
 $(objpfx)bug-ga2-mem.out: $(objpfx)bug-ga2.out
-	$(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace > $@; \
+	test -r $(objpfx)bug-ga2.mtrace \
+	|| ( echo "bug-ga2.mtrace does not exist" > $@; exit 77; ) \
+	&& $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace > $@; \
 	$(evaluate-test)
 
 bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace
diff --git a/resolv/Makefile b/resolv/Makefile
index 462c111e13..1d7ffd868e 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -158,7 +158,9 @@ $(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out
 
 tst-leaks2-ENV = MALLOC_TRACE=$(objpfx)tst-leaks2.mtrace
 $(objpfx)mtrace-tst-leaks2.out: $(objpfx)tst-leaks2.out
-	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@; \
+	test -r $(objpfx)tst-leaks2.mtrace \
+	|| ( echo "tst-leaks2.mtrace does not exist" > $@; exit 77; ) \
+	&& $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@; \
 	$(evaluate-test)
 
 tst-resolv-res_ninit-ENV = MALLOC_TRACE=$(objpfx)tst-resolv-res_ninit.mtrace
-- 
2.23.0


             reply	other threads:[~2020-11-24 10:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 10:33 Stefan Liebler [this message]
2020-11-24 10:47 ` Andreas Schwab
2020-11-24 13:14   ` Stefan Liebler

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=20201124103325.1422161-1-stli@linux.ibm.com \
    --to=stli@linux.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=tuliom@linux.ibm.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).