diff options
author | Christian Brauner <brauner@kernel.org> | 2022-05-12 18:52:39 +0200 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2022-05-15 08:52:27 +0800 |
commit | 4cacbf7ae1010fc5500cb18672b00c560b9400bd (patch) | |
tree | 9b405f377adad3f6e54b57223d5fcba9d47799a6 | |
parent | 90c001261171da58c6ea47c1bafb8dd3e0e12963 (diff) |
src: rename idmapped-mounts folder
The idmapped mounts test suite has grown to cover a lot of generic vfs
functionality that is not concerned with idmapped mounts at all.
As was discussed upstream it's time to rename it to something that
reflects its generic nature. So rename it from idmapped-mounts to vfs.
[Zorro: fix generic/689 and add it into idmapped test group]
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | common/rc | 28 | ||||
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/detached_mounts_propagation.c | 2 | ||||
-rw-r--r-- | src/feature.c | 2 | ||||
-rw-r--r-- | src/vfs/Makefile (renamed from src/idmapped-mounts/Makefile) | 4 | ||||
-rw-r--r-- | src/vfs/idmapped-mounts.c (renamed from src/idmapped-mounts/idmapped-mounts.c) | 0 | ||||
-rw-r--r-- | src/vfs/missing.h (renamed from src/idmapped-mounts/missing.h) | 0 | ||||
-rw-r--r-- | src/vfs/mount-idmapped.c (renamed from src/idmapped-mounts/mount-idmapped.c) | 0 | ||||
-rw-r--r-- | src/vfs/utils.c (renamed from src/idmapped-mounts/utils.c) | 0 | ||||
-rw-r--r-- | src/vfs/utils.h (renamed from src/idmapped-mounts/utils.h) | 0 | ||||
-rwxr-xr-x | tests/btrfs/245 | 2 | ||||
-rwxr-xr-x | tests/generic/633 | 2 | ||||
-rwxr-xr-x | tests/generic/644 | 2 | ||||
-rwxr-xr-x | tests/generic/645 | 2 | ||||
-rwxr-xr-x | tests/generic/656 | 2 | ||||
-rwxr-xr-x | tests/generic/689 | 4 | ||||
-rwxr-xr-x | tests/xfs/152 | 2 | ||||
-rwxr-xr-x | tests/xfs/153 | 2 |
19 files changed, 30 insertions, 30 deletions
@@ -192,8 +192,8 @@ tags /src/aio-dio-regress/aio-last-ref-held-by-io /src/aio-dio-regress/aiocp /src/aio-dio-regress/aiodio_sparse2 -/src/idmapped-mounts/idmapped-mounts -/src/idmapped-mounts/mount-idmapped +/src/vfs/idmapped-mounts +/src/vfs/mount-idmapped /src/log-writes/replay-log /src/perf/*.pyc @@ -355,23 +355,23 @@ _scratch_mount_idmapped() if [ "$type" = "u" ]; then # This means root will be able to create files as uid %id in # the underlying filesystem by going through the idmapped mount. - $here/src/idmapped-mounts/mount-idmapped --map-mount u:0:$id:1 \ - --map-mount u:$id:0:1 \ - --map-mount g:0:0:1 \ - "$SCRATCH_MNT" "$SCRATCH_MNT" || _fail "mount-idmapped failed" + $here/src/vfs/mount-idmapped --map-mount u:0:$id:1 \ + --map-mount u:$id:0:1 \ + --map-mount g:0:0:1 \ + "$SCRATCH_MNT" "$SCRATCH_MNT" || _fail "mount-idmapped failed" elif [ "$type" = "g" ]; then # This means root will be able to create files as gid %id in # the underlying filesystem by going through the idmapped mount. - $here/src/idmapped-mounts/mount-idmapped --map-mount g:0:$id:1 \ - --map-mount g:$id:0:1 \ - --map-mount u:0:0:1 \ - "$SCRATCH_MNT" "$SCRATCH_MNT" || _fail "mount-idmapped failed" + $here/src/vfs/mount-idmapped --map-mount g:0:$id:1 \ + --map-mount g:$id:0:1 \ + --map-mount u:0:0:1 \ + "$SCRATCH_MNT" "$SCRATCH_MNT" || _fail "mount-idmapped failed" elif [ "$type" = "b" ]; then # This means root will be able to create files as uid and gid # %id in the underlying filesystem by going through the idmapped mount. - $here/src/idmapped-mounts/mount-idmapped --map-mount b:0:$id:1 \ - --map-mount b:$id:0:1 \ - "$SCRATCH_MNT" "$SCRATCH_MNT" || _fail "mount-idmapped failed" + $here/src/vfs/mount-idmapped --map-mount b:0:$id:1 \ + --map-mount b:$id:0:1 \ + "$SCRATCH_MNT" "$SCRATCH_MNT" || _fail "mount-idmapped failed" else _fail "usage: either \"u\" (uid), \"g\" (gid), or \"b\" (uid and gid) must be specified " fi @@ -490,7 +490,7 @@ _idmapped_mount() # {g,u}id 10000000 and $(id -u fsgqa) + 10000000. We change ownership # of $mnt so {g,u} id 0 can actually create objects in there. chown 10000000:10000000 $mnt || return 1 - $here/src/idmapped-mounts/mount-idmapped \ + $here/src/vfs/mount-idmapped \ --map-mount b:10000000:0:100000000000 \ $mnt $tmp if [ $? -ne 0 ]; then @@ -2370,12 +2370,12 @@ _require_mount_setattr() # test whether idmapped mounts are supported _require_idmapped_mounts() { - IDMAPPED_MOUNTS_TEST=$here/src/idmapped-mounts/idmapped-mounts + IDMAPPED_MOUNTS_TEST=$here/src/vfs/idmapped-mounts [ -x $IDMAPPED_MOUNTS_TEST ] || _notrun "idmapped-mounts utilities required" _require_mount_setattr - $here/src/idmapped-mounts/idmapped-mounts --supported \ + $here/src/vfs/idmapped-mounts --supported \ --device "$TEST_DEV" \ --mount "$TEST_DIR" \ --fstype "$FSTYP" diff --git a/src/Makefile b/src/Makefile index 24aef09b..7eeb08ef 100644 --- a/src/Makefile +++ b/src/Makefile @@ -76,7 +76,7 @@ TARGETS += uring_read_fault LLDLIBS += -luring endif -SUBDIRS += idmapped-mounts +SUBDIRS += vfs ifeq ($(HAVE_LIBCAP), true) LLDLIBS += -lcap endif diff --git a/src/detached_mounts_propagation.c b/src/detached_mounts_propagation.c index d4bc87f9..17db2c02 100644 --- a/src/detached_mounts_propagation.c +++ b/src/detached_mounts_propagation.c @@ -26,7 +26,7 @@ #include <sys/types.h> #include <unistd.h> -#include "idmapped-mounts/missing.h" +#include "vfs/missing.h" static bool is_shared_mountpoint(const char *path) { diff --git a/src/feature.c b/src/feature.c index bc0b0b30..941f96fb 100644 --- a/src/feature.c +++ b/src/feature.c @@ -46,7 +46,7 @@ #include <liburing.h> #endif -#include "idmapped-mounts/missing.h" +#include "vfs/missing.h" #ifndef USRQUOTA #define USRQUOTA 0 diff --git a/src/idmapped-mounts/Makefile b/src/vfs/Makefile index ad4ddc99..2df3daf8 100644 --- a/src/idmapped-mounts/Makefile +++ b/src/vfs/Makefile @@ -34,7 +34,7 @@ mount-idmapped: $(CFILES_MOUNT_IDMAPPED) $(Q)$(LTLINK) $(CFILES_MOUNT_IDMAPPED) -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) install: - $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src/idmapped-mounts - $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src/idmapped-mounts + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src/vfs + $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src/vfs -include .dep diff --git a/src/idmapped-mounts/idmapped-mounts.c b/src/vfs/idmapped-mounts.c index e06185b7..e06185b7 100644 --- a/src/idmapped-mounts/idmapped-mounts.c +++ b/src/vfs/idmapped-mounts.c diff --git a/src/idmapped-mounts/missing.h b/src/vfs/missing.h index c4f4cc32..c4f4cc32 100644 --- a/src/idmapped-mounts/missing.h +++ b/src/vfs/missing.h diff --git a/src/idmapped-mounts/mount-idmapped.c b/src/vfs/mount-idmapped.c index d8490bed..d8490bed 100644 --- a/src/idmapped-mounts/mount-idmapped.c +++ b/src/vfs/mount-idmapped.c diff --git a/src/idmapped-mounts/utils.c b/src/vfs/utils.c index faf06fcd..faf06fcd 100644 --- a/src/idmapped-mounts/utils.c +++ b/src/vfs/utils.c diff --git a/src/idmapped-mounts/utils.h b/src/vfs/utils.h index a62a4844..a62a4844 100644 --- a/src/idmapped-mounts/utils.h +++ b/src/vfs/utils.h diff --git a/tests/btrfs/245 b/tests/btrfs/245 index f3380ac2..6403f878 100755 --- a/tests/btrfs/245 +++ b/tests/btrfs/245 @@ -26,7 +26,7 @@ _scratch_mount "-o user_subvol_rm_allowed" >> $seqres.full echo "Silence is golden" -$here/src/idmapped-mounts/idmapped-mounts --test-btrfs --device "$TEST_DEV" \ +$here/src/vfs/idmapped-mounts --test-btrfs --device "$TEST_DEV" \ --mountpoint "$TEST_DIR" --scratch-device "$SCRATCH_DEV" \ --scratch-mountpoint "$SCRATCH_MNT" --fstype "$FSTYP" diff --git a/tests/generic/633 b/tests/generic/633 index 38280647..2054b646 100755 --- a/tests/generic/633 +++ b/tests/generic/633 @@ -19,7 +19,7 @@ _require_test echo "Silence is golden" -$here/src/idmapped-mounts/idmapped-mounts --test-core --device "$TEST_DEV" \ +$here/src/vfs/idmapped-mounts --test-core --device "$TEST_DEV" \ --mount "$TEST_DIR" --fstype "$FSTYP" status=$? diff --git a/tests/generic/644 b/tests/generic/644 index 9ed5a511..17fc0539 100755 --- a/tests/generic/644 +++ b/tests/generic/644 @@ -21,7 +21,7 @@ _require_test echo "Silence is golden" -$here/src/idmapped-mounts/idmapped-mounts --test-fscaps-regression \ +$here/src/vfs/idmapped-mounts --test-fscaps-regression \ --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP" status=$? diff --git a/tests/generic/645 b/tests/generic/645 index ffe30bb4..f1209ad0 100755 --- a/tests/generic/645 +++ b/tests/generic/645 @@ -21,7 +21,7 @@ _require_test echo "Silence is golden" -$here/src/idmapped-mounts/idmapped-mounts --test-nested-userns \ +$here/src/vfs/idmapped-mounts --test-nested-userns \ --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP" status=$? diff --git a/tests/generic/656 b/tests/generic/656 index 1231de31..9e95ac96 100755 --- a/tests/generic/656 +++ b/tests/generic/656 @@ -26,7 +26,7 @@ _require_group fsgqa2 echo "Silence is golden" -$here/src/idmapped-mounts/idmapped-mounts --test-setattr-fix-968219708108 \ +$here/src/vfs/idmapped-mounts --test-setattr-fix-968219708108 \ --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP" status=$? diff --git a/tests/generic/689 b/tests/generic/689 index 670f8e5a..a0aa7778 100755 --- a/tests/generic/689 +++ b/tests/generic/689 @@ -11,7 +11,7 @@ # 705191b03d50 ("fs: fix acl translation") # . ./common/preamble -_begin_fstest auto quick perms +_begin_fstest auto quick perms idmapped # Import common functions. . ./common/filter @@ -26,7 +26,7 @@ _require_group fsgqa echo "Silence is golden" -$here/src/idmapped-mounts/idmapped-mounts --test-setxattr-fix-705191b03d50 \ +$here/src/vfs/idmapped-mounts --test-setxattr-fix-705191b03d50 \ --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP" status=$? diff --git a/tests/xfs/152 b/tests/xfs/152 index 129d9c06..de9b8fc6 100755 --- a/tests/xfs/152 +++ b/tests/xfs/152 @@ -34,7 +34,7 @@ _cleanup() # real QA test starts here _supported_fs xfs _require_idmapped_mounts -_require_test_program "idmapped-mounts/mount-idmapped" +_require_test_program "vfs/mount-idmapped" _require_scratch _require_xfs_quota _require_user fsgqa diff --git a/tests/xfs/153 b/tests/xfs/153 index 37303701..8e1430c0 100755 --- a/tests/xfs/153 +++ b/tests/xfs/153 @@ -34,7 +34,7 @@ _require_scratch _require_xfs_quota _require_user fsgqa _require_idmapped_mounts -_require_test_program "idmapped-mounts/mount-idmapped" +_require_test_program "vfs/mount-idmapped" _scratch_mkfs >/dev/null 2>&1 _scratch_mount |