From 3a5d3179e7fe160ca1fc01033f0ae094e05a9d91 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 14 Feb 2020 14:36:15 -0800 Subject: [PATCH] Add WalkCrossDevice option to walk policy Add the walk policy flag WalkCrossDevice to the fswalker Walk calls. This will avoid potential issues when running in a docker container where a FS tree is made of many overlays. Without the flag set, the Walk operation skips over files on devices that do not match the device at the base path. --- tests/tools/fswalker/walker/walker.go | 1 + tests/tools/fswalker/walker/walker_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/tools/fswalker/walker/walker.go b/tests/tools/fswalker/walker/walker.go index 575ff9c28..8c8b62089 100644 --- a/tests/tools/fswalker/walker/walker.go +++ b/tests/tools/fswalker/walker/walker.go @@ -65,5 +65,6 @@ func WalkPathHash(ctx context.Context, path string) (*fspb.Walk, error) { Include: []string{path}, HashPfx: []string{""}, // Hash everything MaxHashFileSize: MaxFileSizeToHash, + WalkCrossDevice: true, }) } diff --git a/tests/tools/fswalker/walker/walker_test.go b/tests/tools/fswalker/walker/walker_test.go index c4f4d1862..d935cf868 100644 --- a/tests/tools/fswalker/walker/walker_test.go +++ b/tests/tools/fswalker/walker/walker_test.go @@ -37,6 +37,7 @@ func TestWalk(t *testing.T) { Include: []string{ dataDir, }, + WalkCrossDevice: true, }) testenv.AssertNoError(t, err)