help-bash
[Top][All Lists]
Advanced

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

Re: Bash 5.2 SHLVL change and autoconf test failures


From: Zack Weinberg
Subject: Re: Bash 5.2 SHLVL change and autoconf test failures
Date: Fri, 30 Sep 2022 10:40:41 -0400
User-agent: Cyrus-JMAP/3.7.0-alpha0-968-g04df58079d-fm-20220921.001-g04df5807

On Fri, Sep 30, 2022, at 9:24 AM, Chet Ramey wrote:
> On 9/30/22 1:45 AM, Xi Ruoyao wrote:
>> 
>> Hmm, it makes sense but I can't see how this affects autoconf test suite
>> (I don't really understand M4).
>
> It might also be the result of a different change that optimizes out some
> unnecessary forks; there are a couple of those. I'm not sure why autoconf
> is keeping track of SHLVL anyway, unless it's recording state.

Autoconf's test suite is testing for Autoconf macros that modify shell 
variables that are "outside the Autoconf namespace" (see 
https://git.savannah.gnu.org/cgit/autoconf.git/tree/tests/local.at#n320 for 
further explanation).

We already have a long list of built-in shell variables that may change without 
our code having done anything, and so should be ignored by this check.  The 
only reason SHLVL isn't already in that list is because, hitherto, it has 
consistently had the same value before and after each of our top-level macros.  
I'm a little puzzled why that's no longer true, but clearly it's not a bug _in 
Autoconf_ and shouldn't be flagged by our test suite.

Xi's original patch adds SHLVL to that list and I'm going to go ahead and apply 
it.

zw



reply via email to

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