git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] test: fix for COLUMNS and bash 5

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Aug 6, 2021, 16:15 UTC
Message-ID
<610d6024abb9d_1594208ae@natae.notmuch>
In-Reply-To
<87k0kzzc91.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 15 quoted lines
> On Thu, Aug 05 2021, Felipe Contreras wrote:
> 
> > Since c49a177bec (test-lib.sh: set COLUMNS=80 for --verbose
> > repeatability, 2021-06-29) multiple tests have been failing when using
> > bash 5 because checkwinsize is enabled by default, therefore COLUMNS is
> > reset using TIOCGWINSZ even for non-interactive shells.
> >
> > It's debatable whether or not bash should even be doing that, but for
> > now we can avoid this undesirable behavior by disabling this option.
> >
> > Reported-by: Fabian Stelzer <fabian.stelzer@campoint.net>
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> 
> I've got an alternative way of solving the same immeditate issue in[1],
> there's discussion on that approach in the latest What's Cooking[2].
Yes, but I'm not allowed to participate in that discussion.
Show 6 quoted lines
> My preference for mine is in no small part that I'd like to not be
> responsible for into-the-past test suite breakage the next time a
> popular shell decides to be clever about COLUMNS.
> 
> But this way we'll solve the immediate problem with bash, and I can say
> I told you so if that submarine breakage occurs with this approach :)

I believe what bash is doing is a mistake. I don't think COLUMNS should be updated within a non-interactive shell by default. I'll report that as a bug once I'm able to subsscribe to the bug-bash mailing list.

So I think it's the opposite: not only would similar fixes not be needed for other shells, but it won't be needed for bash either.

-- 
Felipe Contreras
Previous: Ævar Arnfjörð BjarmasonNext: SZEDER Gábor
Message 3 of 9 in “test: fix for COLUMNS and bash 5”
  1. test: fix for COLUMNS and bash 5Felipe Contreras, Aug 5, 2021
  2. Ævar Arnfjörð BjarmasonAug 5, 2021
  3. Felipe ContrerasAug 6, 2021
  4. SZEDER GáborAug 6, 2021
  5. Junio C HamanoAug 6, 2021
  6. Ævar Arnfjörð BjarmasonAug 23, 2021
  7. Junio C HamanoAug 23, 2021
  8. test: fix for COLUMNS and bash 5Felipe Contreras, Aug 6, 2021
  9. ZheNing HuAug 7, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.