Git development
 help / color / mirror / Atom feed
* Expected test suite behavior
@ 2026-05-25  5:38 Amogh Dambal
  0 siblings, 0 replies; 8+ messages in thread
From: Amogh Dambal @ 2026-05-25  5:38 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 2761 bytes --]

Hey folks,

I wanted to get started hacking on/poking around the Git source, but I'm 
seeing some behavior with the tests that I can't quite figure out.

I've downloaded the full source tree from the GitHub mirror: 
https://github.com/git/git/tree/master. I'm using a Docker container as 
a development environment with the following information:

root@5d8a4c9110e2:~/git# uname -a
Linux 5d8a4c9110e2 6.10.14-linuxkit #1 SMP Mon Feb 24 16:35:16 UTC 2025 
aarch64 GNU/Linux

root@5d8a4c9110e2:~/git# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.5
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

The Docker container is run like so: `docker run -it -v $(PWD):/root/git 
-w /root/git git-debian:latest` from an image built from the following 
Dockerfile:

FROM debian:stable

LABEL Description="Debian (stable) build environment for Git"

# Install Git library dependencies
# https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
RUN apt-get update && apt-get upgrade && \
      apt-get install -y dh-autoreconf libcurl4-gnutls-dev libexpat1-dev \
          gettext libz-dev libssl-dev asciidoc xmlto docbook2x \
          make cargo cvs subversion install-info

# Set environment variables
ENV HOME=/root

# Launch the bash shell by default
CMD ["/bin/bash"]

I'm able to successfully run `make` + `make configure` + `make all doc 
info` but `make test` fails, the following tests specifically:

not ok 1 - plain
not ok 2 - plain nested in bare
not ok 3 - plain through aliased command, outside any git repo
not ok 4 - plain nested through aliased command
not ok 5 - plain nested in bare through aliased command
not ok 8 - plain bare
not ok 10 - GIT_DIR bare
not ok 11 - init --bare
not ok 12 - GIT_DIR non-bare
not ok 13 - GIT_DIR & GIT_WORK_TREE (1)
not ok 20 - init --bare/--shared overrides system/global config
not ok 28 - init creates a new deep directory (umask vs. shared)
not ok 63 - extensions.refStorage with files backend

as does `prove -j$(nproc) --shuffle t[0-9]*.sh`. I've attached the full 
test summary which includes all failed tests (it's 17KB, hence why not 
inline). All the failures report `(Wstat: 256 (exited 1)`.

I've read through Documentation/MyFirstContribution.adoc and t/README, 
and gone through the mailing list archives, but I'm not seeing anything 
outlining why these tests would fail, nor am I seeing a common pattern 
in the failing test scripts that'd point to e.g. a missing dependency.

Is there a README/documentation I've missed reading that can help 
explain the behavior I'm seeing?

Thanks,
Amogh

[-- Attachment #2: git-failed-tests.tmp --]
[-- Type: text/plain, Size: 17341 bytes --]

Test Summary Report
-------------------
t4253-am-keep-cr-dos.sh                          (Wstat: 256 (exited 1) Tests: 7 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 1
t3437-rebase-fixup-options.sh                    (Wstat: 256 (exited 1) Tests: 13 Failed: 11)
  Failed tests:  2-4, 6-13
  Non-zero exit status: 1
t1301-shared-repo.sh                             (Wstat: 256 (exited 1) Tests: 21 Failed: 6)
  Failed tests:  6-8, 12, 14, 16
  Non-zero exit status: 1
t3436-rebase-more-options.sh                     (Wstat: 256 (exited 1) Tests: 19 Failed: 14)
  Failed tests:  3-15, 18
  Non-zero exit status: 1
t7012-skip-worktree-writing.sh                   (Wstat: 256 (exited 1) Tests: 11 Failed: 2)
  Failed tests:  4, 11
  Non-zero exit status: 1
t9350-fast-export.sh                             (Wstat: 256 (exited 1) Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t3507-cherry-pick-conflict.sh                    (Wstat: 256 (exited 1) Tests: 44 Failed: 4)
  Failed tests:  17-18, 33-34
  Non-zero exit status: 1
t4137-apply-submodule.sh                         (Wstat: 256 (exited 1) Tests: 28 Failed: 3)
  Failed tests:  3, 17-18
  Non-zero exit status: 1
t6432-merge-recursive-space-options.sh           (Wstat: 256 (exited 1) Tests: 11 Failed: 7)
  Failed tests:  3, 6-11
  Non-zero exit status: 1
t3401-rebase-and-am-rename.sh                    (Wstat: 256 (exited 1) Tests: 10 Failed: 3)
  Failed tests:  7-9
  Non-zero exit status: 1
t5517-push-mirror.sh                             (Wstat: 256 (exited 1) Tests: 13 Failed: 2)
  Failed tests:  8, 13
  Non-zero exit status: 1
t3429-rebase-edit-todo.sh                        (Wstat: 256 (exited 1) Tests: 7 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t5545-push-options.sh                            (Wstat: 256 (exited 1) Tests: 10 Failed: 1)
  Failed test:  10
  Non-zero exit status: 1
t6427-diff3-conflict-markers.sh                  (Wstat: 256 (exited 1) Tests: 9 Failed: 1)
  Failed test:  7
  Non-zero exit status: 1
t0610-reftable-basics.sh                         (Wstat: 256 (exited 1) Tests: 91 Failed: 2)
  Failed tests:  32, 62
  Non-zero exit status: 1
t6041-bisect-submodule.sh                        (Wstat: 256 (exited 1) Tests: 14 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 1
t3910-mac-os-precompose.sh                       (Wstat: 256 (exited 1) Tests: 29 Failed: 10)
  Failed tests:  1, 4, 6, 8, 11-16
  TODO passed:   23
  Non-zero exit status: 1
t4012-diff-binary.sh                             (Wstat: 256 (exited 1) Tests: 13 Failed: 1)
  Failed test:  11
  Non-zero exit status: 1
t4128-apply-root.sh                              (Wstat: 256 (exited 1) Tests: 12 Failed: 5)
  Failed tests:  3-7
  Non-zero exit status: 1
t3428-rebase-signoff.sh                          (Wstat: 256 (exited 1) Tests: 7 Failed: 2)
  Failed tests:  6-7
  Non-zero exit status: 1
t5527-fetch-odd-refs.sh                          (Wstat: 256 (exited 1) Tests: 5 Failed: 2)
  Failed tests:  4-5
  Non-zero exit status: 1
t4151-am-abort.sh                                (Wstat: 256 (exited 1) Tests: 20 Failed: 2)
  Failed tests:  5-6
  Non-zero exit status: 1
t6430-merge-recursive.sh                         (Wstat: 256 (exited 1) Tests: 36 Failed: 6)
  Failed tests:  19-20, 23-26
  Non-zero exit status: 1
t1450-fsck.sh                                    (Wstat: 256 (exited 1) Tests: 96 Failed: 2)
  Failed tests:  71, 74
  Non-zero exit status: 1
t4114-apply-typechange.sh                        (Wstat: 256 (exited 1) Tests: 12 Failed: 8)
  Failed tests:  2-6, 8-9, 12
  Non-zero exit status: 1
t1423-ref-backend.sh                             (Wstat: 256 (exited 1) Tests: 36 Failed: 1)
  Failed test:  22
  Non-zero exit status: 1
t3403-rebase-skip.sh                             (Wstat: 256 (exited 1) Tests: 20 Failed: 4)
  Failed tests:  5, 10-12
  Non-zero exit status: 1
t0050-filesystem.sh                              (Wstat: 256 (exited 1) Tests: 13 Failed: 1)
  Failed test:  7
  Non-zero exit status: 1
t3453-history-fixup.sh                           (Wstat: 256 (exited 1) Tests: 28 Failed: 2)
  Failed tests:  11, 20
  Non-zero exit status: 1
t4129-apply-samemode.sh                          (Wstat: 256 (exited 1) Tests: 23 Failed: 3)
  Failed tests:  11, 21, 23
  Non-zero exit status: 1
t3404-rebase-interactive.sh                      (Wstat: 256 (exited 1) Tests: 133 Failed: 62)
  Failed tests:  17-23, 26-43, 46-48, 50, 52-77, 81, 86-88
                101-102, 118
  Non-zero exit status: 1
t3452-history-split.sh                           (Wstat: 256 (exited 1) Tests: 25 Failed: 3)
  Failed tests:  4, 13, 16
  Non-zero exit status: 1
t3510-cherry-pick-sequence.sh                    (Wstat: 256 (exited 1) Tests: 55 Failed: 3)
  Failed tests:  9, 24, 33
  Non-zero exit status: 1
t6438-submodule-directory-file-conflicts.sh      (Wstat: 256 (exited 1) Tests: 56 Failed: 7)
  Failed tests:  3-4, 17-18, 31, 45-46
  Non-zero exit status: 1
t4150-am.sh                                      (Wstat: 256 (exited 1) Tests: 87 Failed: 8)
  Failed tests:  25, 27-32, 70
  Non-zero exit status: 1
t5702-protocol-v2.sh                             (Wstat: 256 (exited 1) Tests: 60 Failed: 1)
  Failed test:  52
  Non-zero exit status: 1
t0602-reffiles-fsck.sh                           (Wstat: 256 (exited 1) Tests: 23 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
t1091-sparse-checkout-builtin.sh                 (Wstat: 256 (exited 1) Tests: 77 Failed: 1)
  Failed test:  31
  Non-zero exit status: 1
t4051-diff-function-context.sh                   (Wstat: 256 (exited 1) Tests: 42 Failed: 6)
  Failed tests:  3, 11, 17, 28, 34, 39
  Non-zero exit status: 1
t4126-apply-empty.sh                             (Wstat: 256 (exited 1) Tests: 8 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t2400-worktree-add.sh                            (Wstat: 256 (exited 1) Tests: 232 Failed: 9)
  Failed tests:  109, 115, 130, 140, 144, 164, 176, 178
                209
  Non-zero exit status: 1
t9300-fast-import.sh                             (Wstat: 256 (exited 1) Tests: 256 Failed: 1)
  Failed test:  101
  Non-zero exit status: 1
t1410-reflog.sh                                  (Wstat: 256 (exited 1) Tests: 41 Failed: 1)
  Failed test:  34
  Non-zero exit status: 1
t1001-read-tree-m-2way.sh                        (Wstat: 256 (exited 1) Tests: 29 Failed: 8)
  Failed tests:  3-6, 14, 17-19
  Non-zero exit status: 1
t4255-am-submodule.sh                            (Wstat: 256 (exited 1) Tests: 33 Failed: 3)
  Failed tests:  3, 17-18
  Non-zero exit status: 1
t2080-parallel-checkout-basics.sh                (Wstat: 256 (exited 1) Tests: 11 Failed: 2)
  Failed tests:  1, 3
  Non-zero exit status: 1
t3408-rebase-multi-line.sh                       (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
t3513-revert-submodule.sh                        (Wstat: 256 (exited 1) Tests: 14 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 1
t3508-cherry-pick-many-commits.sh                (Wstat: 256 (exited 1) Tests: 14 Failed: 12)
  Failed tests:  2-3, 5-14
  Non-zero exit status: 1
t7512-status-help.sh                             (Wstat: 256 (exited 1) Tests: 47 Failed: 1)
  Failed test:  9
  Non-zero exit status: 1
t1015-read-index-unmerged.sh                     (Wstat: 256 (exited 1) Tests: 6 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t3700-add.sh                                     (Wstat: 256 (exited 1) Tests: 58 Failed: 1)
  Failed test:  49
  Non-zero exit status: 1
t4116-apply-reverse.sh                           (Wstat: 256 (exited 1) Tests: 7 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 1
t7600-merge.sh                                   (Wstat: 256 (exited 1) Tests: 83 Failed: 1)
  Failed test:  63
  Non-zero exit status: 1
t1002-read-tree-m-u-2way.sh                      (Wstat: 256 (exited 1) Tests: 22 Failed: 3)
  Failed tests:  2, 19, 22
  Non-zero exit status: 1
t7503-pre-commit-and-pre-merge-commit-hooks.sh   (Wstat: 256 (exited 1) Tests: 22 Failed: 1)
  Failed test:  16
  Non-zero exit status: 1
t4301-merge-tree-write-tree.sh                   (Wstat: 256 (exited 1) Tests: 44 Failed: 3)
  Failed tests:  7, 33, 37
  Non-zero exit status: 1
t1004-read-tree-m-u-wf.sh                        (Wstat: 256 (exited 1) Tests: 17 Failed: 2)
  Failed tests:  10, 15
  Non-zero exit status: 1
t3012-ls-files-dedup.sh                          (Wstat: 256 (exited 1) Tests: 3 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 1
t7110-reset-merge.sh                             (Wstat: 256 (exited 1) Tests: 21 Failed: 7)
  Failed tests:  3-4, 7, 9-10, 12, 19
  Non-zero exit status: 1
t3426-rebase-submodule.sh                        (Wstat: 256 (exited 1) Tests: 29 Failed: 17)
  Failed tests:  2-6, 11-13, 15-20, 25-27
  Non-zero exit status: 1
t5526-fetch-submodules.sh                        (Wstat: 256 (exited 1) Tests: 56 Failed: 11)
  Failed tests:  27-31, 40-45
  Non-zero exit status: 1
t3400-rebase.sh                                  (Wstat: 256 (exited 1) Tests: 39 Failed: 2)
  Failed tests:  12-13
  Non-zero exit status: 1
t0020-crlf.sh                                    (Wstat: 256 (exited 1) Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t3405-rebase-malformed.sh                        (Wstat: 256 (exited 1) Tests: 5 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 1
t2201-add-update-typechange.sh                   (Wstat: 256 (exited 1) Tests: 6 Failed: 5)
  Failed tests:  2-6
  Non-zero exit status: 1
t4014-format-patch.sh                            (Wstat: 256 (exited 1) Tests: 226 Failed: 31)
  Failed tests:  1, 3-4, 6-7, 10-11, 77, 162-179, 182, 184-185
                197-198
  Non-zero exit status: 1
t2013-checkout-submodule.sh                      (Wstat: 256 (exited 1) Tests: 74 Failed: 13)
  Failed tests:  9-10, 14, 24, 30, 34, 41-43, 49-50, 63-64
  Non-zero exit status: 1
t7900-maintenance.sh                             (Wstat: 256 (exited 1) Tests: 75 Failed: 1)
  Failed test:  74
  Non-zero exit status: 1
t1013-read-tree-submodule.sh                     (Wstat: 256 (exited 1) Tests: 68 Failed: 12)
  Failed tests:  3-4, 8, 18, 23-24, 28, 36-37, 44, 57-58
  Non-zero exit status: 1
t7611-merge-abort.sh                             (Wstat: 256 (exited 1) Tests: 19 Failed: 6)
  Failed tests:  7-10, 12-13
  Non-zero exit status: 1
t3903-stash.sh                                   (Wstat: 256 (exited 1) Tests: 144 Failed: 3)
  Failed tests:  18, 57, 136
  Non-zero exit status: 1
t3406-rebase-message.sh                          (Wstat: 256 (exited 1) Tests: 32 Failed: 6)
  Failed tests:  12-14, 17-19
  Non-zero exit status: 1
t5408-send-pack-stdin.sh                         (Wstat: 256 (exited 1) Tests: 10 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
t3402-rebase-merge.sh                            (Wstat: 256 (exited 1) Tests: 13 Failed: 7)
  Failed tests:  6-10, 12-13
  Non-zero exit status: 1
t6423-merge-rename-directories.sh                (Wstat: 256 (exited 1) Tests: 82 Failed: 1)
  Failed test:  59
  Non-zero exit status: 1
t7814-grep-recurse-submodules.sh                 (Wstat: 256 (exited 1) Tests: 34 Failed: 1)
  Failed test:  19
  Non-zero exit status: 1
t7505-prepare-commit-msg-hook.sh                 (Wstat: 256 (exited 1) Tests: 23 Failed: 1)
  Failed test:  16
  Non-zero exit status: 1
t5326-multi-pack-bitmaps.sh                      (Wstat: 256 (exited 1) Tests: 357 Failed: 2)
  Failed tests:  219, 356
  Non-zero exit status: 1
t7031-verify-tag-signed-ssh.sh                   (Wstat: 256 (exited 1) Tests: 14 Failed: 7)
  Failed tests:  1, 3, 8-11, 14
  Non-zero exit status: 1
t5520-pull.sh                                    (Wstat: 256 (exited 1) Tests: 80 Failed: 3)
  Failed tests:  25-26, 79
  Non-zero exit status: 1
t3415-rebase-autosquash.sh                       (Wstat: 256 (exited 1) Tests: 28 Failed: 23)
  Failed tests:  2-24
  Non-zero exit status: 1
t3512-cherry-pick-submodule.sh                   (Wstat: 256 (exited 1) Tests: 15 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 1
t3600-rm.sh                                      (Wstat: 256 (exited 1) Tests: 82 Failed: 0)
  TODO passed:   73
  Non-zero exit status: 1
t3407-rebase-abort.sh                            (Wstat: 256 (exited 1) Tests: 17 Failed: 2)
  Failed tests:  13-14
  Non-zero exit status: 1
t5570-git-daemon.sh                              (Wstat: 256 (exited 1) Tests: 16 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t7615-diff-algo-with-mergy-operations.sh         (Wstat: 256 (exited 1) Tests: 7 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
t0021-conversion.sh                              (Wstat: 256 (exited 1) Tests: 42 Failed: 1)
  Failed test:  24
  Non-zero exit status: 1
t0001-init.sh                                    (Wstat: 256 (exited 1) Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t2009-checkout-statinfo.sh                       (Wstat: 256 (exited 1) Tests: 3 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 1
t3905-stash-include-untracked.sh                 (Wstat: 256 (exited 1) Tests: 34 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t7528-signed-commit-ssh.sh                       (Wstat: 256 (exited 1) Tests: 29 Failed: 13)
  Failed tests:  1, 4-5, 10-11, 13, 16-17, 19-23
  Non-zero exit status: 1
t3420-rebase-autostash.sh                        (Wstat: 256 (exited 1) Tests: 52 Failed: 17)
  Failed tests:  26-32, 35-36, 38-45
  Non-zero exit status: 1
t3418-rebase-continue.sh                         (Wstat: 256 (exited 1) Tests: 30 Failed: 8)
  Failed tests:  3, 8, 20, 26-30
  Non-zero exit status: 1
t3434-rebase-i18n.sh                             (Wstat: 256 (exited 1) Tests: 6 Failed: 3)
  Failed tests:  4-6
  Non-zero exit status: 1
t4108-apply-threeway.sh                          (Wstat: 256 (exited 1) Tests: 18 Failed: 2)
  Failed tests:  16-17
  Non-zero exit status: 1
t3417-rebase-whitespace-fix.sh                   (Wstat: 256 (exited 1) Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t3900-i18n-commit.sh                             (Wstat: 256 (exited 1) Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t4045-diff-relative.sh                           (Wstat: 256 (exited 1) Tests: 39 Failed: 1)
  Failed test:  38
  Non-zero exit status: 1
t4127-apply-same-fn.sh                           (Wstat: 256 (exited 1) Tests: 7 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t6422-merge-rename-corner-cases.sh               (Wstat: 256 (exited 1) Tests: 26 Failed: 1)
  Failed test:  20
  Non-zero exit status: 1
t7504-commit-msg-hook.sh                         (Wstat: 256 (exited 1) Tests: 30 Failed: 2)
  Failed tests:  19-20
  Non-zero exit status: 1
t5407-post-rewrite-hook.sh                       (Wstat: 256 (exited 1) Tests: 17 Failed: 10)
  Failed tests:  7-8, 10-17
  Non-zero exit status: 1
t5572-pull-submodule.sh                          (Wstat: 256 (exited 1) Tests: 69 Failed: 7)
  Failed tests:  3-4, 17-18, 31-32, 46
  Non-zero exit status: 1
t6428-merge-conflicts-sparse.sh                  (Wstat: 256 (exited 1) Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 1
t7519-status-fsmonitor.sh                        (Wstat: 256 (exited 1) Tests: 33 Failed: 5)
  Failed tests:  13, 18, 21, 25, 28
  Non-zero exit status: 1
t3440-rebase-trailer.sh                          (Wstat: 256 (exited 1) Tests: 10 Failed: 6)
  Failed tests:  5-10
  Non-zero exit status: 1
t7001-mv.sh                                      (Wstat: 256 (exited 1) Tests: 54 Failed: 3)
  Failed tests:  1, 48-49
  Non-zero exit status: 1
t7402-submodule-rebase.sh                        (Wstat: 256 (exited 1) Tests: 6 Failed: 3)
  Failed tests:  2-3, 6
  Non-zero exit status: 1
t7520-ignored-hook-warning.sh                    (Wstat: 256 (exited 1) Tests: 5 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 1
t5516-fetch-push.sh                              (Wstat: 256 (exited 1) Tests: 125 Failed: 4)
  Failed tests:  23, 28, 67, 83
  Non-zero exit status: 1
t3705-add-sparse-checkout.sh                     (Wstat: 256 (exited 1) Tests: 20 Failed: 1)
  Failed test:  11
  Non-zero exit status: 1
t5329-pack-objects-cruft.sh                      (Wstat: 256 (exited 1) Tests: 25 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t7112-reset-submodule.sh                         (Wstat: 256 (exited 1) Tests: 82 Failed: 15)
  Failed tests:  3-4, 8, 18, 23-24, 28, 36-37, 43-44, 57-58
                71-72
  Non-zero exit status: 1
t5310-pack-bitmaps.sh                            (Wstat: 256 (exited 1) Tests: 236 Failed: 1)
  Failed test:  203
  Non-zero exit status: 1
t1092-sparse-checkout-compatibility.sh           (Wstat: 256 (exited 1) Tests: 106 Failed: 41)
  Failed tests:  2, 10-11, 13, 15, 22, 24-25, 28, 32-40
                42, 44, 49-52, 55, 57, 65, 71, 80, 86, 88-89
                91, 93, 96, 98-100, 102-104
  Non-zero exit status: 1
Files=1044, Tests=32622, 878 wallclock secs ( 4.92 usr  1.95 sys + 263.79 cusr 1013.76 csys = 1284.42 CPU)
Result: FAIL

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Expected test suite behavior
@ 2026-05-25  6:20 Michael Montalbo
  2026-05-25  7:27 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Montalbo @ 2026-05-25  6:20 UTC (permalink / raw)
  To: amoghdambal1; +Cc: git

Amogh Dambal <amoghdambal1@gmail.com> writes:
> Hey folks,
>
> I wanted to get started hacking on/poking around the Git source, but I'm
> seeing some behavior with the tests that I can't quite figure out.
> [...]
> Is there a README/documentation I've missed reading that can help
> explain the behavior I'm seeing?
>

Hello. If you run `make test GIT_TEST_OPTS=--verbose` or uncomment
L16 of t/Makefile is there more information describing the issue?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Expected test suite behavior
  2026-05-25  6:20 Expected test suite behavior Michael Montalbo
@ 2026-05-25  7:27 ` Jeff King
  2026-05-25 22:01   ` Amogh Dambal
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2026-05-25  7:27 UTC (permalink / raw)
  To: Michael Montalbo; +Cc: amoghdambal1, git

On Sun, May 24, 2026 at 11:20:54PM -0700, Michael Montalbo wrote:

> Amogh Dambal <amoghdambal1@gmail.com> writes:
> > Hey folks,
> >
> > I wanted to get started hacking on/poking around the Git source, but I'm
> > seeing some behavior with the tests that I can't quite figure out.
> > [...]
> > Is there a README/documentation I've missed reading that can help
> > explain the behavior I'm seeing?
> 
> 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't use --verbose when running under the "prove" TAP harness
(which the OP seems to be doing). You can use --verbose-log instead, and
then output is in t/test-results/t1234-whatever.out.

However, when debugging tests I find it easier to focus on a single
failing test by running it individually, like:

  cd t
  ./t1234-whatever.sh -v -i -x

That will stop at the first failure (-i), showing the output of all
commands (-v), and additionally enabling shell tracing (-x) so you can
see which command in the test failed.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Expected test suite behavior
  2026-05-25  7:27 ` Jeff King
@ 2026-05-25 22:01   ` Amogh Dambal
  2026-05-25 22:18     ` brian m. carlson
  0 siblings, 1 reply; 8+ messages in thread
From: Amogh Dambal @ 2026-05-25 22:01 UTC (permalink / raw)
  To: Jeff King, Michael Montalbo; +Cc: git

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Expected test suite behavior
  2026-05-25 22:01   ` Amogh Dambal
@ 2026-05-25 22:18     ` brian m. carlson
  2026-05-25 22:25       ` Amogh Dambal
  0 siblings, 1 reply; 8+ messages in thread
From: brian m. carlson @ 2026-05-25 22:18 UTC (permalink / raw)
  To: Amogh Dambal; +Cc: Jeff King, Michael Montalbo, git

[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]

On 2026-05-25 at 22:01:23, Amogh Dambal wrote:
> `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:

What are the OS and file system on the host?  We tend to see
executable bits set when NTFS, FAT, or other Windows-adjacent file
systems are used on Linux and you're mounting `$(PWD)` into the
container as a volume.

> --
> 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 .

Git doesn't use `/tmp` for most files in the tests.  Those are stored
under `t/`, so you'd want to create your test directory there.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Expected test suite behavior
  2026-05-25 22:18     ` brian m. carlson
@ 2026-05-25 22:25       ` Amogh Dambal
  2026-05-26  0:41         ` brian m. carlson
  0 siblings, 1 reply; 8+ messages in thread
From: Amogh Dambal @ 2026-05-25 22:25 UTC (permalink / raw)
  To: brian m. carlson, Jeff King, Michael Montalbo, git

 > What are the OS and file system on the host?  We tend to see
 > executable bits set when NTFS, FAT, or other Windows-adjacent file
 > systems are used on Linux and you're mounting `$(PWD)` into the
 > container as a volume.

Ah, this is a smoking gun. I'm not on a Windows-adjacent file system; 
I'm running macOS Sequoia 15.5 on the host. Specifically:

$ uname -msprsv
Darwin 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:26 PDT 
2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8112 arm64 arm

But I am mounting $(PWD) into the container as a volume.


 > Git doesn't use `/tmp` for most files in the tests.  Those are stored
 > under `t/`, so you'd want to create your test directory there.

ACK, good to know, thanks! I am still seeing the same behavior with a 
`debug` directory under `t/`:

root@ec94ab1b260e:~/git/t/debug# /root/git/git init plain
root@ec94ab1b260e:~/git/t/debug# ls -alhrt 
/root/git/t/debug/plain/.git/config
-rw-r--r-- 1 root root 111 May 25 22:24 /root/git/t/debug/plain/.git/config

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Expected test suite behavior
  2026-05-25 22:25       ` Amogh Dambal
@ 2026-05-26  0:41         ` brian m. carlson
  2026-05-26  1:11           ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: brian m. carlson @ 2026-05-26  0:41 UTC (permalink / raw)
  To: Amogh Dambal; +Cc: Jeff King, Michael Montalbo, git

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

On 2026-05-25 at 22:25:11, Amogh Dambal wrote:
> > What are the OS and file system on the host?  We tend to see
> > executable bits set when NTFS, FAT, or other Windows-adjacent file
> > systems are used on Linux and you're mounting `$(PWD)` into the
> > container as a volume.
> 
> Ah, this is a smoking gun. I'm not on a Windows-adjacent file system; I'm
> running macOS Sequoia 15.5 on the host. Specifically:
> 
> $ uname -msprsv
> Darwin 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:26 PDT 2025;
> root:xnu-11417.121.6~2/RELEASE_ARM64_T8112 arm64 arm
> 
> But I am mounting $(PWD) into the container as a volume.

I wouldn't expect that to be a problem, then.  macOS uses Unix-style
permissions and I've never seen odd permissions behaviour mounting a
macOS APFS file system into a container.  I will, however, note that I
am using a case-sensitive APFS volume, but I cannot imagine how this
would occur with _any_ macOS APFS volume mounted into a Linux container.

> > Git doesn't use `/tmp` for most files in the tests.  Those are stored
> > under `t/`, so you'd want to create your test directory there.
> 
> ACK, good to know, thanks! I am still seeing the same behavior with a
> `debug` directory under `t/`:
> 
> root@ec94ab1b260e:~/git/t/debug# /root/git/git init plain
> root@ec94ab1b260e:~/git/t/debug# ls -alhrt
> /root/git/t/debug/plain/.git/config
> -rw-r--r-- 1 root root 111 May 25 22:24 /root/git/t/debug/plain/.git/config

I think I know what the problem is: you're running as root.  I suspect
`test -x` in the test says that you have permission to execute it
because you're root and root always ignores permissions.  My guess is
that most of the tests you're failing have to do with permissions of
some sort that are being ignored because you're privileged.

In general, you would not want to run this as root.  Use `adduser` to
create yourself a regular user and then use the `USER` directive in the
Dockerfile to change users.  I don't run the tests as root and I'm sure
none of the other regular contributors do, either.  Running unprivileged
in a container is a best practice anyway.

I'll just note that if you just want to do Git development, macOS is a
fully supported platform on which to do that.  I will admit most of the
major contributors (with the notable exception of the Git for Windows
maintainer) do use Linux and of course I like and endorse Debian, but
macOS should build and run just fine if you prefer that.

But if you do want to use a container, I'd try unprivileged and see if
substantially more of the tests pass.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Expected test suite behavior
  2026-05-26  0:41         ` brian m. carlson
@ 2026-05-26  1:11           ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2026-05-26  1:11 UTC (permalink / raw)
  To: brian m. carlson; +Cc: Amogh Dambal, Jeff King, Michael Montalbo, git

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> I think I know what the problem is: you're running as root.  I suspect
> `test -x` in the test says that you have permission to execute it
> because you're root and root always ignores permissions.  My guess is
> that most of the tests you're failing have to do with permissions of
> some sort that are being ignored because you're privileged.

I know !SANITY defeats a-rw and lets the tester read or write to the
path, but this is the first time I heard that !SANITY defeats a-x
and lets the tester _execute_ it.

I do not think we drop POSIXPERM prereq when !SANITY automatically,
and I do not think we should, but we should probably have an
automated check to drop POSIXPERM?

    (
	# is an unexecutable look to the user as executable?
	umask 0; >testfile; chmod a-w testfile; test -x testfile;
	status=$?;
	rm -f testfile; exit $status
    )

> I'll just note that if you just want to do Git development, macOS is a
> fully supported platform on which to do that.  I will admit most of the
> major contributors (with the notable exception of the Git for Windows
> maintainer) do use Linux and of course I like and endorse Debian, but
> macOS should build and run just fine if you prefer that.

Hear hear.

We want to encourage developers to do more _native_ development on
their own system, and this is not limited to macOS.  As long as
users on a particular platform rely on working Git there, we are
better off if we have more people actively using that platform to
build, test, develop on, and debug Git for their own use.

Thanks.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-26  1:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25  6:20 Expected test suite behavior Michael Montalbo
2026-05-25  7:27 ` Jeff King
2026-05-25 22:01   ` Amogh Dambal
2026-05-25 22:18     ` brian m. carlson
2026-05-25 22:25       ` Amogh Dambal
2026-05-26  0:41         ` brian m. carlson
2026-05-26  1:11           ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2026-05-25  5:38 Amogh Dambal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox