This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] [BZ #14579] rtld: limit self loading check to normal mode only


> +$(objpfx)tst-rtld-load-self.out: tst-rtld-load-self.sh $(objpfx)ld.so
> +	$(SHELL) $^

We normally write the .out files via redirection.
So make this:
	$(SHELL) $^ > $@

and don't redirect stdout in the script itself.  If there is normally
some stderr output in a successful test run, then add 2>&1 to the
command line or put "exec 2>&1" inside the script (or 2>&1 on each of
its commands).  If a successful run normally produces nothing on stderr,
then just leave stderr alone so it appears in build output.

> +# normal mode
> +$rtld $rtld > $out 2> $err
> +test $? -le 127 || exit

This doesn't make the .out file contents very informative.
I'd do "echo normal mode" or suchlike before each run.

We normally test all cases in a test rather than bailing out at the
first failure.  So I'd make these:

test $? -eq 0 || result=1

etc. and "exit $result" at the end.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]