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

Re: Expected test suite behavior

From
ADAmogh Dambal <amoghdambal1@gmail.com>
Date
May 25, 2026, 22:01 UTC
Message-ID
<23221493-ea81-47c3-9647-6c6ac8d03360@gmail.com>
In-Reply-To
<20260525072711.GE2737798@coredump.intra.peff.net>
Thanks for the replies, and the pointers!
 >> Hello. If you run `make test GIT_TEST_OPTS=--verbose` or uncomment
 >> L16 of t/Makefile is there more information describing the issue?
 > You can use --verbose-log instead, and
 > then output is in t/test-results/t1234-whatever.out.

`GIT_TEST_OPTS=--verbose` was very illuminating. I captured STDOUT/STDERR: `make test GIT_TEST_OPTS=--verbose &> git-test-verbose-fail.tmp`, which shows that almost every test fails `check_config` because a `git init` is creating a `.git/config` file whose executable bit is set:

-- Initialized empty Git repository in /root/git/t/trash directory.t0001-init/plain/.git/ plain/.git/config is executable? not ok 1 - plain

[...]

However, I'm not able to reproduce this, e.g. directly using the local built binary seems to work fine:

mkdir -p /tmp/debug && cd /tmp/debug /root/git/git init plain ls -alhrt /tmp/debug/plain/.git root@ec94ab1b260e:/tmp/debug# ls -alhrt /tmp/debug/plain/.git total 24K -rw-r--r-- 1 root root 92 May 25 21:26 config drwxr-xr-x 3 root root 4.0K May 25 21:26 .. drwxr-xr-x 4 root root 4.0K May 25 21:26 refs drwxr-xr-x 4 root root 4.0K May 25 21:26 objects -rw-r--r-- 1 root root 23 May 25 21:26 HEAD drwxr-xr-x 4 root root 4.0K May 25 21:26 .

In fact, even the specific test directory that I assume is being checked reports properly set bits on the `config` file:

root@f695346357b9:~/git# ls -alhrt t/trash\ directory.t0001-init/plain/.git/ total 12K drwxr-xr-x 3 root root 96 May 25 21:08 .. drwxr-xr-x 3 root root 96 May 25 21:08 info -rwxr-xr-x 1 root root 73 May 25 21:08 description drwxr-xr-x 16 root root 512 May 25 21:08 hooks -rw-r--r-- 1 root root 111 May 25 21:08 config drwxr-xr-x 4 root root 128 May 25 21:08 refs -rw-r--r-- 1 root root 23 May 25 21:08 HEAD drwxr-xr-x 9 root root 288 May 25 21:08 . drwxr-xr-x 4 root root 128 May 25 21:08 objects

I've further checked that the POSIXPERM requirement is being set and verified that there are no shell differences (I'm using /bin/bash as my main shell in the Docker container, while the test scripts use /bin/sh (which on this Docker container is symlinked to `dash`):

root@ec94ab1b260e:~/git/t# ls -alhrt /bin/sh lrwxrwxrwx 1 root root 4 Feb 4 2025 /bin/sh -> dash

I'm sure that I'm missing something blindingly obvious with respect to my setup, but I have not yet been able to figure out what that might be.

Previous: Jeff KingNext: brian m. carlson
Message 3 of 7 in “Re: Expected test suite behavior”
  1. Michael MontalboMay 25, 2026
  2. Jeff KingMay 25, 2026
  3. Amogh DambalMay 25, 2026
  4. brian m. carlsonMay 25, 2026
  5. Amogh DambalMay 25, 2026
  6. brian m. carlsonMay 26, 2026
  7. Junio C HamanoMay 26, 2026

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.