The -x filesystem-boundary rejection branch is never tested #17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
TestWalkOneFilesystemSameFS(scan_test.go:280-298) only proves that-xskips nothing when every path is on one filesystem. That is the negative case. The branch that actually implements the flag —scan.go:745-747,if dev, ok := deviceOfInfo(info); ok && dev != parent.rootDev— has never been executed by a test, and neither has the!parent.rootDevOKbypass atscan.go:731-733.-xis a documented flag (README §scan mode, GNUdu/rsyncconvention) whose whole purpose is to not descend across a mount point. Getting it wrong on a ZFS server with many datasets means either scanning far more than asked or silently missing trees. Tests requiring a real second filesystem are not portable, but the branch is directly reachable throughsubdirJob.Definition of done
subdirJobdirectly with a fabricated parentdirJob{rootDev: someOtherDevice, rootDevOK: true}andoneFS = true, and asserts the subdirectory is rejected.rootDevOK: falseasserts the boundary check is bypassed and the subdirectory is accepted.e.Info()returns an error asserts the warning is emitted and the path skipped.-x) crosses the boundary.make checkgreen.