git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>,
	Brandon Casey <drafnel@gmail.com>
Subject: Re: What's cooking in git.git (Sep 2018, #01; Tue, 4)
Date: Wed, 05 Sep 2018 10:29:21 +0200	[thread overview]
Message-ID: <87bm9cs5y6.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqmusw6gbo.fsf@gitster-ct.c.googlers.com>


On Tue, Sep 04 2018, Junio C Hamano wrote:

> Git 2.19-rc2 is out.  Hopefully the tip of 'master' is more or less
> identical to the final one without needing much updates.
>
> You can find the changes described here in the integration branches
> of the repositories listed at
>
>     http://git-blame.blogspot.com/p/git-public-repositories.html
>
> --------------------------------------------------
> [Graduated to "master"]
>
> * ab/portable (2018-08-27) 6 commits
>   (merged to 'next' on 2018-08-27 at 37640e66ef)
>  + tests: fix and add lint for non-portable grep --file
>  + tests: fix version-specific portability issue in Perl JSON
>  + tests: use shorter labels in chainlint.sed for AIX sed
>  + tests: fix comment syntax in chainlint.sed for AIX sed
>  + tests: fix and add lint for non-portable seq
>  + tests: fix and add lint for non-portable head -c N
>  (this branch is used by ab/portable-more.)

I recently gained access to a Solaris 10 SPARC (5.10) box and discovered
that the chainlint.sed implementation in 2.19.0 has more sed portability
issues.

First, whoever implemented the /bin/sed on Solaris apparently read the
POSIX requirements for a max length label of 8 to mean that 8 characters
should include the colon, so a bunch of things fail because of that, but
are fixed with a shorter 7 character label.

Then GIT_TEST_CHAIN_LINT=1 still fails because 878f988350 ("t/test-lib:
teach --chain-lint to detect broken &&-chains in subshells", 2018-07-11)
added a "grep -q" invocation. The /bin/grep on that version of Solaris
doesn't have -q. We fixed a similar issue way back in 80700fde91
("t/t1304: make a second colon optional in the mask ACL check",
2010-03-15) by redirecting to /dev/null instead.

A bunch of other tests in the test suite rely on "grep -q", but nothing
as central as chainlint, so it makes everything break. Do we want to
away with "grep -q" entirely because of old Solaris /bin/grep?

At this point those familiar with Solaris are screaming ("why are you
using anything in /bin!"). Okey fine, but it mostly worked before, so
are we OK with breaking it? "Mostly" here is "test suite would fail
20-30 tests for various reasons, but at least no failures in test-lib.sh
and the like".

However, if as config.mak.uname does we run the tests with
PATH=/usr/xpg6/bin:/usr/xpg4/bin:$PATH, at this point sed is fine with 8
character labels, but starts complaining about this (also in
chainlint.sed):

    sed: Too many commands, last: s/\n//

As with other sed issues I fixed recently in chainlint.sed this one is
just the tip of the iceberg. Once you "fix" one (just remove it, I have
no idea how to rewrite it) others appear.

I was hoping this would just be a Solaris 10 issue, but it's also an
issue in Solaris 11 (5.11 11.3).

So, do we want to chase this down or just do this?:

    diff --git a/Makefile b/Makefile
    index 5a969f5..f125dc5 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -2602,6 +2602,9 @@ endif
     ifdef TEST_GIT_INDEX_VERSION
            @echo TEST_GIT_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(TEST_GIT_INDEX_VERSION)))'\' >>$@+
     endif
    +ifdef GIT_TEST_CHAIN_LINT
    +       @echo GIT_TEST_CHAIN_LINT=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_CHAIN_LINT)))'\' >>$@+
    +endif
            @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi

     ### Detect Python interpreter path changes
    diff --git a/config.mak.uname b/config.mak.uname
    index e47af72..2b02a2b 100644
    --- a/config.mak.uname
    +++ b/config.mak.uname
    @@ -163,6 +163,10 @@ ifeq ($(uname_S),SunOS)
            INSTALL = /usr/ucb/install
            TAR = gtar
            BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__
    +       # t/chainlint.sed is hopelessly broken all known (tested
    +       # Solaris 10 & 11) versions of Solaris, both /bin/sed and
    +       # /usr/xpg4/bin/sed
    +       GIT_TEST_CHAIN_LINT = 0
     endif
     ifeq ($(uname_O),Cygwin)
            ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4)

If I could wave a magic wand I'd say "let's just rewrite chainlint.sed
in perl, at least that's portable", but that's a lot of effort (and I
doubt Eric wants to). It slightly sucks to not have chainlint on
Solaris, but it would also suck to revert chainlint.sed back to 2.18.0
(there were some big improvements). So I think the patch above is the
best way forward, especially since we're on rc2. What do you think?

  parent reply	other threads:[~2018-09-05  8:29 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23  9:14 [PATCH] tests: fix and add lint for non-portable head -c N Ævar Arnfjörð Bjarmason
2018-08-23  9:56 ` Test failures on OpenBSD Ævar Arnfjörð Bjarmason
2018-08-23 15:53   ` Junio C Hamano
2018-08-23 15:25 ` [PATCH v2 1/2] tests: fix and add lint for non-portable head -c N Ævar Arnfjörð Bjarmason
2018-08-23 16:11   ` Jeff King
2018-08-23 15:25 ` [PATCH v2 2/2] tests: fix and add lint for non-portable seq Ævar Arnfjörð Bjarmason
2018-08-23 16:08   ` Junio C Hamano
2018-08-23 17:20     ` Ævar Arnfjörð Bjarmason
2018-08-23 20:35   ` [PATCH v3 0/5] OpenBSD & AIX etc. portability fixes Ævar Arnfjörð Bjarmason
2018-08-23 20:36   ` [PATCH v3 1/5] tests: fix and add lint for non-portable head -c N Ævar Arnfjörð Bjarmason
2018-08-23 20:36   ` [PATCH v3 2/5] tests: fix and add lint for non-portable seq Ævar Arnfjörð Bjarmason
2018-08-23 20:36   ` [PATCH v3 3/5] tests: use shorter here-docs in chainlint.sed for AIX sed Ævar Arnfjörð Bjarmason
2018-08-23 20:42     ` Junio C Hamano
2018-08-23 20:56     ` Eric Sunshine
2018-08-24 15:20       ` [PATCH v4 0/6] OpenBSD & AIX etc. portability fixes Ævar Arnfjörð Bjarmason
2018-08-24 15:20       ` [PATCH v4 1/6] tests: fix and add lint for non-portable head -c N Ævar Arnfjörð Bjarmason
2018-08-24 15:20       ` [PATCH v4 2/6] tests: fix and add lint for non-portable seq Ævar Arnfjörð Bjarmason
2018-08-24 15:20       ` [PATCH v4 3/6] tests: fix comment syntax in chainlint.sed for AIX sed Ævar Arnfjörð Bjarmason
2018-08-24 20:52         ` Eric Sunshine
2018-08-24 15:20       ` [PATCH v4 4/6] tests: use shorter here-docs " Ævar Arnfjörð Bjarmason
2018-08-24 21:29         ` Eric Sunshine
2018-08-28 20:14           ` Ævar Arnfjörð Bjarmason
2018-08-28 20:17             ` Eric Sunshine
2018-08-27 19:36         ` Junio C Hamano
2018-09-04 22:36         ` What's cooking in git.git (Sep 2018, #01; Tue, 4) Junio C Hamano
2018-09-05  9:14           ` Eric Sunshine
2018-09-05 17:45             ` Junio C Hamano
2018-09-05 18:44             ` Eric Sunshine
2018-09-05  9:50           ` Eric Sunshine
2018-09-05 20:31             ` Jeff King
2018-09-05 21:56               ` Junio C Hamano
2018-09-05 13:38           ` jc/rebase-in-c-9-fixes, was " Johannes Schindelin
2018-09-05 16:41             ` Junio C Hamano
     [not found]           ` <xmqqbm9b6gxs.fsf@gitster-ct.c.googlers.com>
2018-09-05 16:48             ` Duy Nguyen
2018-09-05 18:18               ` SZEDER Gábor
2018-09-05  8:29         ` Ævar Arnfjörð Bjarmason [this message]
2018-09-05  8:59           ` Eric Sunshine
2018-09-05 11:07             ` Ævar Arnfjörð Bjarmason
2018-11-24 19:33               ` Ævar Arnfjörð Bjarmason
2018-11-25  4:28                 ` Torsten Bögershausen
2018-11-25  8:21                   ` Torsten Bögershausen
2018-11-25 14:14                     ` Ævar Arnfjörð Bjarmason
2018-09-05 16:45             ` Junio C Hamano
2018-08-24 15:20       ` [PATCH v4 5/6] tests: fix version-specific portability issue in Perl JSON Ævar Arnfjörð Bjarmason
2018-08-24 20:41         ` Eric Sunshine
2018-08-24 15:20       ` [PATCH v4 6/6] tests: fix and add lint for non-portable grep --file Ævar Arnfjörð Bjarmason
2018-08-23 20:36   ` [PATCH v3 4/5] tests: fix version-specific portability issue in Perl JSON Ævar Arnfjörð Bjarmason
2018-08-23 20:36   ` [PATCH v3 5/5] tests: fix and add lint for non-portable grep --file Ævar Arnfjörð Bjarmason
2018-08-23 20:44     ` Junio C Hamano
2018-08-24 13:49       ` Derrick Stolee
2018-08-23 15:42 ` [PATCH] tests: fix and add lint for non-portable head -c N Junio C Hamano
2018-08-23 17:24   ` Æ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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bm9cs5y6.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).