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

Re: [PATCH] test-lib.sh: set COLUMNS=80 for --verbose repeatability

From
Jeff King <peff@peff.net>
Date
Jun 24, 2021, 14:50 UTC
Message-ID
<YNSbzYvwSC0ZOo+Y@coredump.intra.peff.net>
In-Reply-To
<patch-1.1-765c2793122-20210624T101839Z-avarab@gmail.com>
On Thu, Jun 24, 2021 at 12:19:31PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 20 quoted lines
> Some tests will fail under --verbose because while we've unset COLUMNS
> since b1d645b58ac (tests: unset COLUMNS inherited from environment,
> 2012-03-27), we also look for the columns with an ioctl(..,
> TIOCGWINSZ, ...) on some platforms. By setting COLUMNS again we
> preempt the TIOCGWINSZ lookup in pager.c's term_columns(), it'll take
> COLUMNS over TIOCGWINSZ,
> 
> This fixes the t0500-progress-display.sh test when run as:
> 
>     ./t0500-progress-display.sh --verbose
> 
> It broke because of a combination of the this issue and the progress
> output reacting to the column width since 545dc345ebd (progress: break
> too long progress bar lines, 2019-04-12). The
> t5324-split-commit-graph.sh fails in a similar manner due to progress
> output, see [1] for details.
> 
> A more narrow fix here would be to only do this in the --verbose mode,
> but there's no harm in setting this for everything. If we're not
> connected to a TTY the COLUMNS setting won't matter.
Thanks, this explanation and location make sense to me.
(minor s/the this/this/ in the third paragraph above).
-Peff
Previous: Ævar Arnfjörð BjarmasonNext: SZEDER Gábor
Message 7 of 10 in “progress.c tests: fix breakage with COLUMNS != 80”
  1. progress.c tests: fix breakage with COLUMNS != 80Ævar Arnfjörð Bjarmason, Jun 21, 2021
  2. Jeff KingJun 23, 2021
  3. SZEDER GáborJun 24, 2021
  4. Jeff KingJun 24, 2021
  5. Philip OakleyJun 24, 2021
  6. test-lib.sh: set COLUMNS=80 for --verbose repeatabilityÆvar Arnfjörð Bjarmason, Jun 24, 2021
  7. Jeff KingJun 24, 2021
  8. SZEDER GáborJun 27, 2021
  9. Junio C HamanoJun 29, 2021
  10. test-lib.sh: set COLUMNS=80 for --verbose repeatabilityÆvar Arnfjörð Bjarmason, Jun 29, 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.