On Sunday 17 April 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Sun, Apr 17, 2011 at 06:27:44PM CEST:
> > Subject: [PATCH] test defs: allow overriding of `$me'
> > 
> > * tests/defs.in ($me): Allow overriding by the including test
> > script.  Add some explicative comments.
> 
> What if the user environment contains $me?
>
I thought that was very unlikely.  But I might be wrong, and I prefer to
err on the safe side after all ...

> Will that be overridden still by the testsuite?
>
No.

> Otherwise you will have spurious failures (and to some extent
> "arbitrary code execution" upon a testsuite run).
>
What about initilizing me from `$am_test_name' then?  On the line of:

 if test -z "$am_test_name"; then
   me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
 else
   me=$am_test_name
 fi

I'll prepare a patch tomorrow if you are OK with this proposal.

Thanks, and sorry for the noise,
  Stefano

Reply via email to