cp: GNU test script preserve-gid.sh fails due to environment variable
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
The GNU test file tests/cp/preserve-gid.sh fails in the CI due to the variable $abs_path_dir_ being the empty string, which eventually results in this error:
2025-04-05T09:52:15.8760689Z FAIL: tests/cp/preserve-gid
2025-04-05T09:52:15.8760900Z ===========================
2025-04-05T09:52:15.8761102Z
2025-04-05T09:52:15.8761220Z chroot --skip-chdir \
2025-04-05T09:52:15.8761456Z cp: cannot stat '/cp': No such file or directory
2025-04-05T09:52:15.8761742Z env: 'cp': No such file or directory
2025-04-05T09:52:15.8762010Z FAIL tests/cp/preserve-gid.sh (exit status: 1)
See the "Run GNU root tests" step in the "Run GNU tests" job; here is a recent build: https://github.com/uutils/coreutils/actions/runs/14280309835/job/40029506444
I'm not sure how the $abs_path_dir_ variable gets set normally, but I can't find any other reference to it. For our purposes, maybe it is just enough to set it explicitly in the tests/cp/preserve-gid.sh file? It looks like maybe it needs to be </path/to/gnucoreutils>/src?
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.
Research direction
Start with tests/cp/preserve-gid.sh and the “Run GNU root tests” step in the “Run GNU tests” CI job. Trace where abs_path_dir_ is expected to be set and reproduce the failure; done means the preserve-gid test finds cp through the intended path and passes in CI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100