Skip to content

test: make t0025 and t9018 executable like every other t/ test - #205

Merged
mizchi merged 1 commit into
mainfrom
claude/modest-dirac-kceqee
Sep 21, 2026
Merged

mizchi merged 1 commit into
mainfrom
claude/modest-dirac-kceqee

Conversation

@mizchi

@mizchi mizchi commented Sep 21, 2026

Copy link
Copy Markdown
Member

Fixes #203.

Two files were committed as 100644 while the rest of t/*.sh are 100755:

100644 t/t0025-worktree-common-dir.sh
100644 t/t9018-workspace-flow-affected.sh

t/run-tests.sh chmods a test before running it, so nothing was broken — but the chmod lands on a tracked file, so every run of the suite left a mode change in the working tree:

$ bash t/run-tests.sh t901
$ git status --short
 M t/t9018-workspace-flow-affected.sh

That is easy to sweep into an unrelated commit with git add -A. It happened while I was preparing #201 and had to be stripped back out, and it happened again an hour ago when I ran the t0 suite to gather data for #204 — which is what prompted the issue.

Verification

After the change, running both tests leaves the tree clean:

$ bash t/run-tests.sh t9018   →  Total: 1  Passed: 1  Failed: 0
$ bash t/run-tests.sh t0025   →  Total: 1  Passed: 1  Failed: 0
$ git status --short
                                 (empty)

Every t/*.sh is now 100755 in the index — checked with git ls-files -s.

What I deliberately left alone

#203 also floated making run-tests.sh surface a wrong mode rather than silently chmodding. I kept the chmod, on reflection:

  • Skipping a non-executable test would leave a newly added test silently unrun. That is the failure mode this repo has just spent five PRs digging out of — a test that looks present but never executes is worse than a cosmetic mode change.
  • Invoking through sh "$test" would sidestep the mode entirely, but the suite mixes #!/bin/sh and #!/bin/bash shebangs, so the bash-dependent files would break.

The chmod is a reasonable safety net once the committed modes are correct; it simply never fires now.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VDVUJHu38YtVAr6sKZtRDB


Generated by Claude Code

Both were committed as 100644 while the rest of t/*.sh are 100755.
t/run-tests.sh chmods a test before running it, so nothing was broken — but
the chmod lands on a tracked file, so every run of the suite left a mode
change in the working tree.

That is easy to sweep into an unrelated commit with `git add -A`; it
happened to #201 and had to be stripped back out.

The runner keeps its chmod as a safety net. Dropping it would leave a
newly added test silently unrun, and invoking tests through `sh` instead
would break the ones with a bash shebang.

Fixes #203

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDVUJHu38YtVAr6sKZtRDB
@mizchi
mizchi merged commit 8d2f9c2 into main Sep 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t0025 and t9018 are not executable, so running the suite dirties the working tree

2 participants