From: Ævar Arnfjörð Bjarmason Date: Mon, 21 Jun 2021 08:41:36 GMT Subject: Re: [PATCH v3] t6020: fix incompatible parameter expansion Message-ID: <87v96736ph.fsf@evledraar.gmail.com> In-Reply-To: <20210617031411.80684-1-zhiyou.jx@alibaba-inc.com> 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 > Signed-off-by: Jiang Xin > --- For what it's worth I've also tested this v3 on gcc45, it works too.