Skip to content

Test the error for blocked full copies - #3

Merged
RhysSullivan merged 2 commits into
fix/copy-all-unsearchable-dirsfrom
fix/copy-all-unsearchable-dirs-tests
Oct 7, 2026
Merged

RhysSullivan merged 2 commits into
fix/copy-all-unsearchable-dirsfrom
fix/copy-all-unsearchable-dirs-tests

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Oct 7, 2026 •

Copy link
Copy Markdown

Tests for the parent PR:

  • full_copy_names_a_directory_without_search_permission: an empty 0644 directory next to node_modules. The full copy fails with an error that names the directory and suggests chmod u+x <dir>, after the kernel's original error. Nothing is created, and the source, including the directory's mode, is unchanged.
  • full_copy_names_a_blocked_entry_inside_node_modules: an unreadable file inside node_modules is still found after the deferred scan.
  • clone_errors_name_copy_on_write_only_when_it_is_unavailable: ENOSPC, EIO and EACCES read clone failed for <path>. EXDEV and ENOTSUP stay CowUnavailable.
  • full_copy_quotes_the_suggested_command: a source path with ', $, spaces and ;. The suggested command runs as is under /bin/sh and fixes only that directory.
  • full_copy_does_not_blame_the_source_when_the_destination_refuses: the source has a 0644 directory, and the destination parent is uchg (kernel EPERM) or 0555. The kernel's error is returned unchanged with no chmod hint.
  • full_copy_keeps_the_clone_error_when_the_scan_is_inconclusive: a child process lowers RLIMIT_NOFILE so the scan hits EMFILE. The scan reports EMFILE, and the original EACCES clone error is returned without blaming a healthy entry.
  • blocked_full_copy_leaves_no_child_or_registry_row (macOS): through Manager::create with the real APFS strategy, a blocked full copy leaves no child directory, no registry row and an unchanged source.

cargo test --release passes on macOS/APFS.

@RhysSullivan
RhysSullivan force-pushed the fix/copy-all-unsearchable-dirs branch from bb94532 to be766cb Compare October 7, 2026 17:27
@RhysSullivan
RhysSullivan force-pushed the fix/copy-all-unsearchable-dirs-tests branch from 19e9d56 to 9dcd16f Compare October 7, 2026 17:28
@RhysSullivan RhysSullivan changed the title Test full copies of unsearchable directories Test the error for blocked full copies Oct 7, 2026
@RhysSullivan
RhysSullivan force-pushed the fix/copy-all-unsearchable-dirs-tests branch from 9dcd16f to db36be3 Compare October 7, 2026 17:40
@RhysSullivan
RhysSullivan force-pushed the fix/copy-all-unsearchable-dirs-tests branch from db36be3 to 4cc5a8e Compare October 7, 2026 18:40
@RhysSullivan
RhysSullivan marked this pull request as ready for review October 7, 2026 19:04
@RhysSullivan
RhysSullivan merged commit 5ed7304 into fix/copy-all-unsearchable-dirs Oct 7, 2026
9 checks passed
RhysSullivan added a commit that referenced this pull request Oct 7, 2026
* Name the entry that blocks a full copy

* Keep the clone error and blame only denied entries

* Do not treat an append-only destination parent as refusing

* Test the error for blocked full copies (#3)

* Test the error for blocked full copies

* Test quoting, destination refusals, inconclusive scans and append-only parents
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.

1 participant