Skip to content

Add comprehensive readonly file regression tests for cp#9045

Merged
cakebaker merged 3 commits into
uutils:mainfrom
naoNao89:add-cp-readonly-regression-tests
Dec 10, 2025
Merged

Add comprehensive readonly file regression tests for cp#9045
cakebaker merged 3 commits into
uutils:mainfrom
naoNao89:add-cp-readonly-regression-tests

Conversation

@naoNao89

Copy link
Copy Markdown
Contributor

Fixes issue #5349

The tests ensure the readonly file behavior from PR #5261 cannot regress in future development.

@sylvestre

Copy link
Copy Markdown
Contributor

please remove the trivial comments :)

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@naoNao89 naoNao89 force-pushed the add-cp-readonly-regression-tests branch from 78e2aa7 to b8d7d4a Compare October 27, 2025 10:13
@codspeed-hq

codspeed-hq Bot commented Oct 27, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #9045 will not alter performance

Comparing naoNao89:add-cp-readonly-regression-tests (271621e) with main (1ffad82)

Summary

✅ 127 untouched
⏩ 6 skipped1

Footnotes

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

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
Comment thread tests/by-util/test_cp.rs Outdated
@naoNao89 naoNao89 force-pushed the add-cp-readonly-regression-tests branch 4 times, most recently from 5fddc7f to a1fb012 Compare October 28, 2025 10:45
@naoNao89 naoNao89 marked this pull request as draft October 28, 2025 11:00
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@naoNao89 naoNao89 force-pushed the add-cp-readonly-regression-tests branch 2 times, most recently from 9a80703 to 112f646 Compare October 28, 2025 11:22
@naoNao89 naoNao89 marked this pull request as ready for review October 28, 2025 11:38
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@naoNao89 naoNao89 closed this by deleting the head repository Nov 6, 2025
@naoNao89 naoNao89 reopened this Nov 7, 2025
- Add 10 new test functions covering readonly destination behavior
- Tests cover basic readonly copying, flag combinations, and edge cases
- Include macOS-specific clonefile behavior tests
- Ensure readonly file protection from PR uutils#5261 cannot regress
- Tests provide evidence for closing issue uutils#5349
- Reduce file I/O overhead by batching file operations
- Consolidate setup operations to minimize system calls
- Improve test execution time from 0.44s to 0.27s (38% improvement)
- Maintain comprehensive test coverage for readonly file behavior
- Remove test_cp_readonly_dest_regression (duplicate of test_cp_dest_no_permissions)
- Remove test_cp_readonly_dest_with_force (duplicate of test_cp_arg_force)
- Remove test_cp_readonly_dest_with_remove_destination (duplicate of test_cp_arg_remove_destination)
- Remove test_cp_macos_clonefile_readonly (duplicate of test_cp_existing_target)
- Remove test_cp_normal_copy_still_works (duplicate of test_cp_existing_target)
- Remove trivial performance comments from readonly tests
- Keep existing proven tests per maintainer preferences
- Keep unique readonly tests that provide additional coverage
@cakebaker cakebaker force-pushed the add-cp-readonly-regression-tests branch from 112f646 to 271621e Compare December 10, 2025 08:33
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@cakebaker cakebaker merged commit 415d01c into uutils:main Dec 10, 2025
127 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks!

@naoNao89 naoNao89 deleted the add-cp-readonly-regression-tests branch December 10, 2025 17:19
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.

3 participants