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

Re: [PATCH] tests: don't give unportable ">" to "test" built-in, use -gt

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 7, 2017, 01:18 UTC
Message-ID
<20170807011832.oy6lxf2ewkmzg65s@genre.crustytoothpaste.net>
In-Reply-To
<20170806233850.14711-1-avarab@gmail.com>
On Sun, Aug 06, 2017 at 11:38:50PM +0000, Ævar Arnfjörð Bjarmason wrote:
Show 22 quoted lines
> Change an argument to test_line_count (which'll ultimately be turned
> into a "test" expression) to use "-gt" instead of ">" for an
> arithmetic test.
> 
> This broken on e.g. OpenBSD as of v2.13.0 with my commit
> ac3f5a3468 ("ref-filter: add --no-contains option to
> tag/branch/for-each-ref", 2017-03-24).
> 
> Upstream just worked around it by patching git and didn't tell us
> about it, I discovered this when reading various Git packaging
> implementations: https://github.com/openbsd/ports/commit/7e48bf88a20
> 
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> 
> David, it would be great to get a quick bug report to
> git@vger.kernel.org if you end up having to monkeypatch something
> we've done. We won't bite, promise :)
> 
> As shown in that linked Github commit OpenBSD has another recent
> workaround in turning on DIR_HAS_BSD_GROUP_SEMANTICS and skipping a
> related test, maybe René can make more sense of that?

I've confirmed using the NetBSD 7.1 man pages that NetBSD will also want DIR_HAS_BSD_GROUP_SEMANTICS. MirBSD will also, according to its man pages.

As I understand it, the only consequence of not setting this flag on BSD systems is that some directories will be setgid, which, while ugly and useless, should have no negative effect.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
Previous: Ævar Arnfjörð BjarmasonNext: René Scharfe
Message 2 of 17 in “tests: don't give unportable ">" to "test" built-in, use -gt”
  1. tests: don't give unportable ">" to "test" built-in, use -gtÆvar Arnfjörð Bjarmason, Aug 6, 2017
  2. brian m. carlsonAug 7, 2017
  3. René ScharfeAug 7, 2017
  4. Ævar Arnfjörð BjarmasonAug 7, 2017
  5. t0001: skip test with restrictive permissions if getpwd(3) respects themRené Scharfe, Aug 7, 2017
  6. t0001: fix broken not-quite getcwd(3) test in bed67874e2Ævar Arnfjörð Bjarmason, Jun 1, 2021
  7. René ScharfeJun 1, 2021
  8. Junio C HamanoJun 1, 2021
  9. Ævar Arnfjörð BjarmasonJun 7, 2021
  10. Ævar Arnfjörð BjarmasonJun 7, 2021
  11. René ScharfeJun 7, 2021
  12. Ævar Arnfjörð BjarmasonJun 7, 2021
  13. t0001: fix broken not-quite getcwd(3) test in bed67874e2Ævar Arnfjörð Bjarmason, Jul 30, 2021
  14. Junio C HamanoJul 30, 2021
  15. Junio C HamanoAug 7, 2017
  16. Junio C HamanoAug 7, 2017
  17. Andreas SchwabAug 7, 2017

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.