autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] Avoid PATH search for CONFIG_SITE.


From: Ralf Wildenhues
Subject: Re: [PATCH 2/2] Avoid PATH search for CONFIG_SITE.
Date: Tue, 8 Jun 2010 20:13:57 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

Hi Eric,

so the recent testsuite additions are already paying off, nice!

* Eric Blake wrote on Tue, Jun 08, 2010 at 02:53:26PM CEST:
> * lib/autoconf/general.m4 (AC_SITE_LOAD): Make more robust.
> * tests/base.at (AC_CACHE_CHECK): Enhance test.
> 
> Signed-off-by: Eric Blake <address@hidden>
> ---
> 
> ...this fixes the broken semantics that triggered the test
> failure in the first place, and strengthens the test.
> 
> Should I squash these patches into one before pushing?

However you like.

Does the manual and NEWS need an update that $PATH-findable $CONFIG_SITE
are not allowed any more?  I'm not actually sure whether this is used in
practice now, but it could be construed as a feature, no?

> --- a/tests/base.at
> +++ b/tests/base.at
> @@ -401,7 +401,7 @@ AT_DATA([config.site],
>  AT_DATA([sitecache],
>  [[my_cv_some_preset_cache_var=yes
>  ]])
> -CONFIG_SITE=$PWD/config.site
> +CONFIG_SITE=config.site
>  export CONFIG_SITE
>  AT_CHECK_CONFIGURE
>  AT_CHECK([grep my_cv_some_preset_cache_var sitecache], [], [ignore])
> @@ -409,6 +409,14 @@ AT_CHECK([grep my_cv_shell_true_works sitecache], [], 
> [ignore])
>  AT_CHECK_CONFIGURE([], [], [stdout])
>  AT_CHECK([grep 'whether true.*works.*cached' stdout], [], [ignore])
> 
> +# Check that config cache scripts must be well-formed.
> +AT_DATA([bad.site],
> +[[fi
> +]])
> +CONFIG_SITE=$PWD/bad.site

Is $PWD portable enough now (see Special Shell Variables; would be first
use in Autoconf)?

Should the test also ensure CONFIG_SITE=./nonexistent and ./config.site
(the latter as another working example, so that all code paths are
covered)?

OTOH, I don't think users are likely to use file names beginning with a
hyphen, that would seem pretty bad style.

> +AT_CHECK_CONFIGURE([], [1], [ignore], [stderr])
> +AT_CHECK([grep 'failed to load site script' stderr], [], [ignore])
> +
>  AT_CLEANUP

Thanks,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]