* [PATCH] Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing
@ 2020-11-24 8:57 Stefan Liebler
2020-11-24 9:36 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Liebler @ 2020-11-24 8:57 UTC (permalink / raw)
To: libc-alpha; +Cc: tuliom, hjl.tools, Stefan Liebler
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..51d3c17d99 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 \
+ && $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace > $@ \
+ || sh -c 'echo "bug-ga2.mtrace does not exist"; exit 77' > $@; \
$(evaluate-test)
bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace
diff --git a/resolv/Makefile b/resolv/Makefile
index 462c111e13..d3e1d8f41f 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 \
+ && $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@ \
+ || sh -c 'echo "tst-leaks2.mtrace does not exist"; exit 77' > $@; \
$(evaluate-test)
tst-resolv-res_ninit-ENV = MALLOC_TRACE=$(objpfx)tst-resolv-res_ninit.mtrace
--
2.23.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing
2020-11-24 8:57 [PATCH] Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing Stefan Liebler
@ 2020-11-24 9:36 ` Andreas Schwab
2020-11-24 10:38 ` Stefan Liebler
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2020-11-24 9:36 UTC (permalink / raw)
To: Stefan Liebler via Libc-alpha; +Cc: Stefan Liebler, tuliom
On Nov 24 2020, Stefan Liebler via Libc-alpha wrote:
> diff --git a/posix/Makefile b/posix/Makefile
> index fa2d0675cd..51d3c17d99 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 \
> + && $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace > $@ \
> + || sh -c 'echo "bug-ga2.mtrace does not exist"; exit 77' > $@; \
Why do you need to call the shell in a shell script?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing
2020-11-24 9:36 ` Andreas Schwab
@ 2020-11-24 10:38 ` Stefan Liebler
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Liebler @ 2020-11-24 10:38 UTC (permalink / raw)
To: Andreas Schwab, Stefan Liebler via Libc-alpha; +Cc: tuliom
On 11/24/20 10:36 AM, Andreas Schwab wrote:
> On Nov 24 2020, Stefan Liebler via Libc-alpha wrote:
>
>> diff --git a/posix/Makefile b/posix/Makefile
>> index fa2d0675cd..51d3c17d99 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 \
>> + && $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace > $@ \
>> + || sh -c 'echo "bug-ga2.mtrace does not exist"; exit 77' > $@; \
>
> Why do you need to call the shell in a shell script?
>
> Andreas.
>
Sure, you are right. I can also just use a subshell.
Or is there another way to force a specific exit-code without exiting
the "make-rule" itself?
Please have a look at v2:
"[PATCH v2] Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or
tst-leaks2.mtrace are missing"
https://sourceware.org/pipermail/libc-alpha/2020-November/119946.html
Thanks,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-24 10:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 8:57 [PATCH] Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing Stefan Liebler
2020-11-24 9:36 ` Andreas Schwab
2020-11-24 10:38 ` Stefan Liebler
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).