scan: warnings for skipped paths do not say "skipped", and the lines that say it are not counted #170

Closed
opened 2026-11-11 01:03:43 +01:00 by clawbot · 1 comment
Collaborator

Defect, found in the acceptance test (#164) on next at 202f083.

Steps

As a user other than root:

make build
d=$(mktemp -d /var/tmp/sfdupes.XXXXXX)
export SFDUPES_DATABASE="$(mktemp -d /var/tmp/sfdupes.XXXXXX)/db.sqlite"
mkdir -p "$d/closed"
cp /bin/true "$d/closed/inside"
cp /bin/true "$d/unreadable"
chmod 000 "$d/closed" "$d/unreadable"
./sfdupes scan "$d"

What happened

walk $d/closed: open $d/closed: permission denied
hash $d/unreadable: open $d/unreadable: permission denied
scan: 0 files seen (0 added, 0 updated, 0 removed, 0 unchanged), 2 skipped
  • The two warnings start with walk and hash. Every other line scan prints starts with scan:.
  • Each names its path twice, which doubles the line for a long path.
  • Neither says skipped, the word the summary uses to count them.
  • The lines that do say skipped are the ones README.md says are not counted: scan: skipped /var/tmp (default exclude) and scan: skipped /dev/shm (tmpfs, not a persistent filesystem).
  • A dropped operand gets a third form: walk PATH: skipping FIFO operand.

Why it matters

After a scan from cron the summary says 2 skipped. Searching the log for skipped finds the summary and, after a scan of /, the paths left out on purpose. It finds neither of the two paths that need attention.

What should happen

  • A warning for a path the summary counts as skipped reads scan: skipped PATH (REASON), with the path once, for example scan: skipped /srv/a/closed (permission denied). Dropped operands use the same form, for example scan: skipped /srv/a/pipe (a FIFO).
  • A line for a path left out on purpose reads scan: left out PATH (...), the words README.md already uses for these paths.
  • Searching the log for scan: skipped then finds the paths the summary counts.
  • README.md gives the wording under "What scan prints", and its two example lines under "Rules for the walk" change to match.

Model: fable-5-2

Defect, found in the acceptance test (https://git.eeqj.de/sneak/sfdupes/issues/164) on `next` at `202f083`. ## Steps As a user other than root: ```sh make build d=$(mktemp -d /var/tmp/sfdupes.XXXXXX) export SFDUPES_DATABASE="$(mktemp -d /var/tmp/sfdupes.XXXXXX)/db.sqlite" mkdir -p "$d/closed" cp /bin/true "$d/closed/inside" cp /bin/true "$d/unreadable" chmod 000 "$d/closed" "$d/unreadable" ./sfdupes scan "$d" ``` ## What happened ``` walk $d/closed: open $d/closed: permission denied hash $d/unreadable: open $d/unreadable: permission denied scan: 0 files seen (0 added, 0 updated, 0 removed, 0 unchanged), 2 skipped ``` - The two warnings start with `walk` and `hash`. Every other line `scan` prints starts with `scan:`. - Each names its path twice, which doubles the line for a long path. - Neither says `skipped`, the word the summary uses to count them. - The lines that do say `skipped` are the ones `README.md` says are not counted: `scan: skipped /var/tmp (default exclude)` and `scan: skipped /dev/shm (tmpfs, not a persistent filesystem)`. - A dropped operand gets a third form: `walk PATH: skipping FIFO operand`. ## Why it matters After a scan from `cron` the summary says `2 skipped`. Searching the log for `skipped` finds the summary and, after a scan of `/`, the paths left out on purpose. It finds neither of the two paths that need attention. ## What should happen - A warning for a path the summary counts as skipped reads `scan: skipped PATH (REASON)`, with the path once, for example `scan: skipped /srv/a/closed (permission denied)`. Dropped operands use the same form, for example `scan: skipped /srv/a/pipe (a FIFO)`. - A line for a path left out on purpose reads `scan: left out PATH (...)`, the words `README.md` already uses for these paths. - Searching the log for `scan: skipped` then finds the paths the summary counts. - `README.md` gives the wording under "What `scan` prints", and its two example lines under "Rules for the walk" change to match. Model: fable-5-2
Author
Collaborator

Built in #195: each counted path now gets a scan: skipped PATH (REASON) line, and paths left out on purpose get scan: left out PATH (...). A file with several hard links that cannot be read now gets one line for each path, because the summary counts each one.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/sfdupes/pulls/195: each counted path now gets a `scan: skipped PATH (REASON)` line, and paths left out on purpose get `scan: left out PATH (...)`. A file with several hard links that cannot be read now gets one line for each path, because the summary counts each one. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/sfdupes#170