From: Felipe Contreras <felipe.contreras@gmail.com>
To: Alex Henrie <alexhenrie24@gmail.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Fabian Stelzer" <fabian.stelzer@campoint.net>,
"Git mailing list" <git@vger.kernel.org>
Subject: Re: progress test failure on fedora34
Date: Mon, 19 Jul 2021 19:40:33 -0500 [thread overview]
Message-ID: <60f61b81a3b74_14781320816@natae.notmuch> (raw)
In-Reply-To: <CAMMLpeT3bJcr7mRDpxmk32VqpAbNpN=fgPjmkcY+0zOBYruybQ@mail.gmail.com>
Alex Henrie wrote:
> On Mon, Jul 19, 2021 at 1:34 PM Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
> >
> > Felipe Contreras wrote:
> > > Ævar Arnfjörð Bjarmason wrote:
> > > >
> > > > On Wed, Jul 14 2021, Alex Henrie wrote:
> > > >
> > > > > On Wed, Jul 14, 2021 at 9:39 AM Ævar Arnfjörð Bjarmason
> > > > > <avarab@gmail.com> wrote:
> > > > >>
> > > > >>
> > > > >> On Wed, Jul 14 2021, Fabian Stelzer wrote:
> > > > >>
> > > > >> > Hi,
> > > > >> > The test t0500-progress-display.sh in current master fails on latest
> > > > >> > fedora34.
> > > > >> > The break was introduced with:
> > > > >> >
> > > > >> > 83ae1edff7ee0b7674bd556955d2cf1706bddb21
> > > > >> > ab/fix-columns-to-80-during-tests (2021-06-29) 1 commit
> > > > >> >
> > > > >> > Kind regards,
> > > > >> > Fabian
> > > > >>
> > > > >> I have not been able to reproduce this, it seems the below E-Mail was
> > > > >> word-wrapped by your mailer, which is especially bad here since getting
> > > > >> to the bottom of this requires looking at the whitespace.
> > > > >>
> > > > >> Is there a way you could tar that up and send it (to me personally is
> > > > >> fine, or some pastebin or whatever).
> > > > >>
> > > > >> I am able to reproduce something that looks like this if I
> > > > >> s/COLUMNS=80/COLUMNS=79/g in the test-lib, but given that we set it to
> > > > >> 80, and that the progress.c code just ends up with an
> > > > >> atoi(getenv("COLUMNS")), and we do our own wrapping (with no other fancy
> > > > >> logic) in progress.c, I'm not seeing right now how this could happen...
> > > > >
> > > > > This test also fails for me when using QTerminal or Konsole, but it
> > > > > passes on XTerm and LXTerminal.
> > > >
> > > > I tried this on Debian 11 with QTerminal 0.16.1 and can't reproduce it,
> > > > resized the window etc., always get COLUMNS=80 if I add some printf
> > > > debugging.
> > > >
> > > > Do you mind testing with an ad-hoc patch like this on top? It will fail
> > > > right away, but should say COLUMNS = 80 in the output.
> > > >
> > > > The only thing I can think of right now is that some terminals are doing
> > > > some evil trickery to LD_PRELOAD or whatever and intercept getenv() for
> > > > COLUMNS and the like, but that's an entirely unfounded hunch.
> > >
> > > I'm able to reproduce this. The test fails when running directly with
> > > bash, but not with prove.
> > >
> > > And it seems to be a bug in bash:
> > >
> > > export COLUMNS=80
> > >
> > > echo "COLUMNS: $COLUMNS"
> > > cat > /tmp/expect <<EOF
> > > foobar
> > > EOF
> > > echo "COLUMNS: $COLUMNS"
> > >
> > > I get:
> > >
> > > COLUMNS: 80
> > > COLUMNS: 115
> > >
> > > Even directly in the console.
> >
> > Hmm, from man bash:
> >
> > checkwinsize
> > If set, bash checks the window size after each external (non‐builtin) com‐
> > mand and, if necessary, updates the values of LINES and COLUMNS. This op‐
> > tion is enabled by default.
> >
> > Seems like since bash 5.0 this is on by default.
>
> Indeed, running `shopt -u checkwinsize` right after exporting COLUMNS
> in test-lib.sh fixes the tests. Great work!
Yeah, this fixes it, but it doesn't seem we are setting any
bash-specific options right now, and additionally I don't think bash
should be doing that in the first place. If the shell is
non-interactive, why is checkwinsize being honored?
Moreover, why does it work with prove? I'm investigating that right now,
but so far I haven't found any reason.
--
Felipe Contreras
next prev parent reply other threads:[~2021-07-20 1:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 12:39 progress test failure on fedora34 Fabian Stelzer
2021-07-14 15:35 ` Ævar Arnfjörð Bjarmason
2021-07-14 16:35 ` Alex Henrie
2021-07-18 8:05 ` Ævar Arnfjörð Bjarmason
2021-07-19 9:00 ` Jeff King
2021-07-19 17:18 ` Alex Henrie
2021-07-19 18:21 ` Alex Henrie
2021-07-19 18:43 ` Felipe Contreras
2021-07-19 19:34 ` Felipe Contreras
2021-07-19 20:42 ` Alex Henrie
2021-07-20 0:40 ` Felipe Contreras [this message]
2021-07-21 0:45 ` ZheNing Hu
2021-07-21 2:50 ` Felipe Contreras
2021-07-26 23:57 ` [PATCH] test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS Ævar Arnfjörð Bjarmason
2021-07-27 17:38 ` Jeff King
2021-07-28 0:53 ` Junio C Hamano
2021-08-02 13:46 ` [PATCH v2 0/3] " Ævar Arnfjörð Bjarmason
2021-08-02 13:46 ` [PATCH v2 1/3] test-lib-functions.sh: rename test_must_fail_acceptable() Ævar Arnfjörð Bjarmason
2021-08-02 13:46 ` [PATCH v2 2/3] test-lib-functions.sh: add a test_with_columns function Ævar Arnfjörð Bjarmason
2021-08-02 17:14 ` SZEDER Gábor
2021-08-02 17:24 ` Eric Sunshine
2021-08-02 13:46 ` [PATCH v2 3/3] test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 0/3] " Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 1/3] test-lib-functions.sh: rename test_must_fail_acceptable() Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 2/3] test-lib-functions.sh: add a test_with_columns function Ævar Arnfjörð Bjarmason
2021-08-04 23:05 ` [PATCH v3 3/3] test-lib.sh: use GIT_TEST_COLUMNS over COLUMNS Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60f61b81a3b74_14781320816@natae.notmuch \
--to=felipe.contreras@gmail.com \
--cc=alexhenrie24@gmail.com \
--cc=avarab@gmail.com \
--cc=fabian.stelzer@campoint.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).