Message ID | 20201124085743.1249014-1-stli@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing | expand |
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.
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
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