Windows CI: tar-patch returns exit code 0 when source file missing (local Windows returns 1)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the Windows CI test case that runs tar-patch for the missing solo/data/only.txt member, then inspect the tar-patch entry point and compare its exit status locally and in GitHub Actions. Reproduce the failure and verify that malformed output is removed when patch application fails, while the test still expects exit code 1.
Written by the indexing model from the issue text.
Description
The test-case assertion forces the creation of a source file that will be opened and used for the delta, but deletes it from the source directory right before .\tar-patch is run.
mkdir -p "$TEST_DIR/solo/data" "$TEST_DIR/solom/data" head -c 4096 /dev/zero >"$TEST_DIR/solo/data/only.txt" cp -a "$TEST_DIR/solo/data/only.txt" "$TEST_DIR/solom/data/only.txt" printf 'patched' | dd of="$TEST_DIR/solom/data/only.txt" bs=1 seek=2000 conv=notrunc status=none 2>/dev/null || \ printf 'patched' | dd of="$TEST_DIR/solom/data/only.txt" bs=1 seek=2000 conv=notrunc 2>/dev/null create_tar "$TEST_DIR/solo-old.tar" "$TEST_DIR/solo" create_tar "$TEST_DIR/solo-new.tar" "$TEST_DIR/solom" ./tar-diff -max-bsdiff-size 64 "$TEST_DIR/solo-old.tar.gz" "$TEST_DIR/solo-new.tar.bz2" "$TEST_DIR/solo.tardiff" rm -f "$TEST_DIR/solo/data/only.txt" if [[ -e "$TEST_DIR/solo/data/only.txt" ]]; then echo "expected solo/data/only.txt removed before tar-patch" >&2 exit 1 fi expect_fail "tar-patch missing source member" ./tar-patch "$TEST_DIR/solo.tardiff" "$TEST_DIR/solo" "$TEST_DIR/solo-out.tar"
All other runners successfully pass this test except for the Windows runner on GitHub Actions. To verify the tar-patch behavior on Windows, a Windows Server 2025 environment was set up locally on a virtual machine. Once the source file is deleted for testing purposes, we get the following error message:
Error applying diff: open extracted\test_dir\only.txt: The system cannot find the file specified.
On local Windows Server, the tool correctly displays the error message and exits with code 1 (failure). However, in the Windows CI environment, tar-patch exits with code 0 (success), causing the test to fail with: expected failure for: tar-patch missing source member.With both reconstructed.tar and original.tar SHA sums differing, this proves the patch application was unsuccessful and should have exited with
code 1.
In addition to investigating why the Windows CI environment exits with code 0 when local Windows correctly exits with code 1, a cleanup mechanism should also be implemented to remove malformed outputs. This will ensure users are not left with the impression that the tool succeeded when it didn't.
The current resolution is to skip this test on Windows while we investigate this issue.
- Dominant language
- Go
- Stars
- 66
- Forks
- 27
- Avg merge
- 14d 3h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from containers/tar-diff
-
Create CHANGELOG.md Open
Difficulty 2/5 Half a day Newbie friendliness 65/100
containers/tar-diff#44 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
containers/tar-diff#37 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
containers/tar-diff#89 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
containers/tar-diff#88 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
containers/tar-diff#87 ·
All issues in containers/tar-diff
Similar issues
-
kind/bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100