Merge pull request #8507 from AkihiroSuda/test-rename-fuse-overlayfs

snapshots/testsuite: Rename: fix fuse-overlayfs incompatibility
This commit is contained in:
Fu Wei 2023-05-12 07:33:19 +08:00 committed by GitHub
commit e52fbfd5c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(