Subject: Re: [PATCH v3] t6020: fix incompatible parameter expansion

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Mon, 21 Jun 2021 10:41:36 +0200

On Thu, Jun 17 2021, Jiang Xin wrote:

> Ævar reported that the function `make_user_friendly_and_stable_output()`
> failed on a i386 box (gcc45) in the gcc farm boxes with error:
>
>     sed: couldn't re-allocate memory
>
> It turns out that older versions of bash (4.3) or dash (0.5.7) cannot
> evaluate expression like `${A%${A#???????}}` used to get the leading 7
> characters of variable A.
>
> Replace the incompatible parameter expansion so that t6020 works on
> older version of bash or dash.
>
> Reported-by: Ævar Arnfjörð Bjarmason <[email-masked]>
> Signed-off-by: Jiang Xin <[email-masked]>
> ---

For what it's worth I've also tested this v3 on gcc45, it works too.