From 5dbae38191df1e390ab570e7cc1de5bc920c36f4 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Thu, 11 May 2023 16:58:17 +0900 Subject: [PATCH] snapshots/testsuite: Rename: fix fuse-overlayfs incompatibility Signed-off-by: Akihiro Suda --- snapshots/testsuite/issues.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/snapshots/testsuite/issues.go b/snapshots/testsuite/issues.go index df6eb4848..108176318 100644 --- a/snapshots/testsuite/issues.go +++ b/snapshots/testsuite/issues.go @@ -128,10 +128,16 @@ func checkRename(ss string) func(ctx context.Context, t *testing.T, sn snapshots ) var applier []fstest.Applier - if ss != "overlayfs" { - // With neither OVERLAY_FS_REDIRECT_DIR nor redirect_dir, - // renaming the directory on the lower directory doesn't work on overlayfs. - // https://github.com/torvalds/linux/blob/v5.18/Documentation/filesystems/overlayfs.rst#renaming-directories + switch ss { + // With neither OVERLAY_FS_REDIRECT_DIR nor redirect_dir, + // renaming the directory on the lower directory doesn't work on overlayfs. + // https://github.com/torvalds/linux/blob/v5.18/Documentation/filesystems/overlayfs.rst#renaming-directories + // + // It doesn't work on fuse-overlayfs either. + // https://github.com/containerd/fuse-overlayfs-snapshotter/pull/53#issuecomment-1543442048 + case "overlayfs", "fuse-overlayfs": + // NOP + default: applier = append(applier, fstest.Rename("/dir1", "/dir2")) } applier = append(