cp: label the destination of -Z when it is named relatively - #14161
cp: label the destination of -Z when it is named relatively#14161sylvestre wants to merge 2 commits into
Conversation
a206c73 to
c052ae5
Compare
Merging this PR will degrade performance by 3.62%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | true_consecutive_calls |
294.7 ns | 350.2 ns | -15.86% |
| ❌ | Simulation | du_deep_tree[(100, 3)] |
2 ms | 2.2 ms | -5.35% |
| ⚡ | Simulation | mv_directory |
8.2 ms | 7.3 ms | +12.41% |
| 🆕 | Memory | base16_encode_to_dev_null |
N/A | 22.6 KB | N/A |
| 🆕 | Memory | base16_encode_to_file |
N/A | 22.6 KB | N/A |
| 🆕 | Simulation | base16_encode_to_dev_null |
N/A | 184.3 ms | N/A |
| 🆕 | Simulation | base16_encode_to_file |
N/A | 184.2 ms | N/A |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing sylvestre:fix-gnu-cp-a-selinux (1b72452) with main (1a6fb19)2
Footnotes
-
50 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
main(7d10e5b) during the generation of this report, so 1a6fb19 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
|
GNU testsuite comparison: |
Three problems kept tests/cp/cp-a-selinux.sh from running and passing under the SELinux CI job: * build-gnu.sh stubbed out src/getlimits with an empty, non-executable file when SELINUX_ENABLED=1, on the assumption that the SELinux tests do not use it. cp-a-selinux.sh calls getlimits_, so the test died with "hard error: running getlimits" (exit 99) before running anything. Build the real program instead -- only that one, together with the generated sources it needs, so the job still skips the rest of the GNU tree. Key the build on the program being executable rather than merely existing, and do it also when reusing an existing GNU build directory, so a tree left behind by the previous version of the script repairs itself. Remove a stale copy in the uutils build directory before installing it, since copying onto an existing file keeps that file's permissions. * -Z asks the policy for the default context of the destination, and the policy only ever lists absolute names: a relative name matched nothing, the lookup reported success because "no default context" is not an error, and the file silently kept the context it had inherited or already carried. Resolve the name first, leaving the last component alone so a symbolic link is still labelled itself. * A failure to set the context lost its errno on the way into CpError, so the ENOTSUP that a mount with a fixed context returns could no longer be recognised, and -a printed a diagnostic where GNU stays quiet. Should make test tests/cp/cp-a-selinux.sh pass uutils#13841
Stripping the factor tests leaves tests/local.mk with a trailing backslash that automake rejects. Building getlimits while local.mk was still newer than Makefile.in sent make into the remake rule, which died there; the || true hid it, nothing was copied to the uutils build directory, and the tests calling getlimits_ ended in "hard error: running getlimits". Move the build below the touch that settles those timestamps, and say so when getlimits is missing instead of failing silently. Should make test tests/cp/cp-a-selinux.sh pass
c052ae5 to
1b72452
Compare
\o/ |
Should make test tests/cp/cp-a-selinux.sh pass
#13841