]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
src: rename idmapped-mounts folder
authorChristian Brauner <brauner@kernel.org>
Thu, 12 May 2022 16:52:39 +0000 (18:52 +0200)
committerZorro Lang <zlang@kernel.org>
Sun, 15 May 2022 00:52:27 +0000 (08:52 +0800)
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>
19 files changed:
.gitignore
common/rc
src/Makefile
src/detached_mounts_propagation.c
src/feature.c
src/vfs/Makefile [moved from src/idmapped-mounts/Makefile with 86% similarity]
src/vfs/idmapped-mounts.c [moved from src/idmapped-mounts/idmapped-mounts.c with 100% similarity]
src/vfs/missing.h [moved from src/idmapped-mounts/missing.h with 100% similarity]
src/vfs/mount-idmapped.c [moved from src/idmapped-mounts/mount-idmapped.c with 100% similarity]
src/vfs/utils.c [moved from src/idmapped-mounts/utils.c with 100% similarity]
src/vfs/utils.h [moved from src/idmapped-mounts/utils.h with 100% similarity]
tests/btrfs/245
tests/generic/633
tests/generic/644
tests/generic/645
tests/generic/656
tests/generic/689
tests/xfs/152
tests/xfs/153

index 5f24909ea6446bf1d1fce9c3d26056c6a1a608f2..b9e426351b79c6a7c4d3f13f98fd2c4b70e13e89 100644 (file)
@@ -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
 
index 9ba47d38482c6053dc694f70e8f0a35b546c7d26..4176c27b2b8f10ac195ceb7e74c5ea8322ada151 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -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"
index 24aef09b395ccb3c5042475da117b25c9e5264c9..7eeb08ef8ad24883afe0b9ce1cc219f64802f957 100644 (file)
@@ -76,7 +76,7 @@ TARGETS += uring_read_fault
 LLDLIBS += -luring
 endif
 
-SUBDIRS += idmapped-mounts
+SUBDIRS += vfs
 ifeq ($(HAVE_LIBCAP), true)
 LLDLIBS += -lcap
 endif
index d4bc87f90984777c199ce734b90c2f46019d0696..17db2c026ebfa283a7e761b7664f32ddf136372e 100644 (file)
@@ -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)
 {
index bc0b0b3026eb546e23e2ea8aea8d24290b95b3e8..941f96fb309710b17cba398252d35a952620e035 100644 (file)
@@ -46,7 +46,7 @@
 #include <liburing.h>
 #endif
 
-#include "idmapped-mounts/missing.h"
+#include "vfs/missing.h"
 
 #ifndef USRQUOTA
 #define USRQUOTA  0
similarity index 86%
rename from src/idmapped-mounts/Makefile
rename to src/vfs/Makefile
index ad4ddc9987b9c8b573e5d1779ce77f30d5243617..2df3daf83061aa9d08cd882f7ae50cca3eeb393b 100644 (file)
@@ -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
similarity index 100%
rename from src/idmapped-mounts/utils.c
rename to src/vfs/utils.c
similarity index 100%
rename from src/idmapped-mounts/utils.h
rename to src/vfs/utils.h
index f3380ac20bd382fa331b61173500c3d8f1b2b2e7..6403f878dc197bd1d063f07e68fbbc097dcc7f21 100755 (executable)
@@ -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"
 
index 3828064712239fbb14df11061a32858053729e40..2054b64604840292f4c5b42a46dcaf96defd3c2f 100755 (executable)
@@ -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=$?
index 9ed5a511f2b4823df2128c5cf2ff66b4e8338101..17fc053926c9e13ba844b1ebbf57daff091e93b3 100755 (executable)
@@ -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=$?
index ffe30bb4b1739a550c731f8ae0ca9c246015595a..f1209ad0a6416aa7bd202eb5cd441e8e81d72784 100755 (executable)
@@ -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=$?
index 1231de31721689420b53b6640e6d3ca4e48e7147..9e95ac96a7183d32cb9f34d5b453d8afba66fafa 100755 (executable)
@@ -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=$?
index 670f8e5a913672bb8d6bac7746879d121f13b557..a0aa7778c39679c4d86cd90feba9f9aac346db5c 100755 (executable)
@@ -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=$?
index 129d9c06c4c8f99c0e6e35a09ae9536135962225..de9b8fc6840cbcbeb84e0d0d5170a84ee27b48e9 100755 (executable)
@@ -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
index 37303701ea8482e1c955cf30a8e307022cf7e3d8..8e1430c0e9d827c95b4f488a681cd8175984a831 100755 (executable)
@@ -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