]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
src/vfs: rename idmapped-mounts.c file
authorChristian Brauner <brauner@kernel.org>
Thu, 12 May 2022 16:52:40 +0000 (18:52 +0200)
committerZorro Lang <zlang@kernel.org>
Sun, 15 May 2022 00:58:47 +0000 (08:58 +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 the source file from
idmapped-mounts.c to vfstest.c before we split it into multiple source
files in the next patches.

[Zorro: fix generic/689]

Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
.gitignore
common/rc
src/vfs/Makefile
src/vfs/vfstest.c [moved from src/vfs/idmapped-mounts.c with 99% similarity]
tests/btrfs/245
tests/generic/633
tests/generic/644
tests/generic/645
tests/generic/656
tests/generic/689
tests/xfs/152

index b9e426351b79c6a7c4d3f13f98fd2c4b70e13e89..88c7941249572e3c0a5aea10387bcbae8b1df20c 100644 (file)
@@ -192,7 +192,7 @@ tags
 /src/aio-dio-regress/aio-last-ref-held-by-io
 /src/aio-dio-regress/aiocp
 /src/aio-dio-regress/aiodio_sparse2
-/src/vfs/idmapped-mounts
+/src/vfs/vfstest
 /src/vfs/mount-idmapped
 /src/log-writes/replay-log
 /src/perf/*.pyc
index 4176c27b2b8f10ac195ceb7e74c5ea8322ada151..4201a059357561066be8839aee9c36c172cb256a 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2370,18 +2370,18 @@ _require_mount_setattr()
 # test whether idmapped mounts are supported
 _require_idmapped_mounts()
 {
-        IDMAPPED_MOUNTS_TEST=$here/src/vfs/idmapped-mounts
-        [ -x $IDMAPPED_MOUNTS_TEST ] || _notrun "idmapped-mounts utilities required"
+        IDMAPPED_MOUNTS_TEST=$here/src/vfs/vfstest
+        [ -x $IDMAPPED_MOUNTS_TEST ] || _notrun "vfstest utilities required"
 
        _require_mount_setattr
 
-       $here/src/vfs/idmapped-mounts --supported \
+       $here/src/vfs/vfstest --idmapped-mounts-supported \
                --device "$TEST_DEV" \
                --mount "$TEST_DIR" \
                --fstype "$FSTYP"
 
        if [ $? -ne 0 ]; then
-               _notrun "idmapped-mounts not support by $FSTYP"
+               _notrun "vfstest not support by $FSTYP"
        fi
 }
 
index 2df3daf83061aa9d08cd882f7ae50cca3eeb393b..adef9ff375e4557334f0866a2a24227122536b4b 100644 (file)
@@ -3,8 +3,8 @@
 TOPDIR = ../..
 include $(TOPDIR)/include/builddefs
 
-TARGETS = idmapped-mounts mount-idmapped
-CFILES_IDMAPPED_MOUNTS = idmapped-mounts.c utils.c
+TARGETS = vfstest mount-idmapped
+CFILES_VFSTEST = vfstest.c utils.c
 CFILES_MOUNT_IDMAPPED = mount-idmapped.c utils.c
 
 HFILES = missing.h utils.h
@@ -25,9 +25,9 @@ depend: .dep
 
 include $(BUILDRULES)
 
-idmapped-mounts: $(CFILES_IDMAPPED_MOUNTS)
+vfstest: $(CFILES_VFSTEST)
        @echo "    [CC]    $@"
-       $(Q)$(LTLINK) $(CFILES_IDMAPPED_MOUNTS) -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
+       $(Q)$(LTLINK) $(CFILES_VFSTEST) -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
 
 mount-idmapped: $(CFILES_MOUNT_IDMAPPED)
        @echo "    [CC]    $@"
similarity index 99%
rename from src/vfs/idmapped-mounts.c
rename to src/vfs/vfstest.c
index e06185b78bc04ff0d4738b971156d1204142e93b..7f57b77783c8224940af1ed4639d6fcebaa5a639 100644 (file)
@@ -14278,7 +14278,7 @@ static void usage(void)
        fprintf(stderr, "--fstype                            Filesystem type used in the tests\n");
        fprintf(stderr, "--help                              Print help\n");
        fprintf(stderr, "--mountpoint                        Mountpoint of device\n");
-       fprintf(stderr, "--supported                         Test whether idmapped mounts are supported on this filesystem\n");
+       fprintf(stderr, "--idmapped-mounts-supported         Test whether idmapped mounts are supported on this filesystem\n");
        fprintf(stderr, "--scratch-mountpoint                Mountpoint of scratch device used in the tests\n");
        fprintf(stderr, "--scratch-device                    Scratch device used in the tests\n");
        fprintf(stderr, "--test-core                         Run core idmapped mount testsuite\n");
@@ -14297,7 +14297,7 @@ static const struct option longopts[] = {
        {"mountpoint",                          required_argument,      0,      'm'},
        {"scratch-mountpoint",                  required_argument,      0,      'a'},
        {"scratch-device",                      required_argument,      0,      'e'},
-       {"supported",                           no_argument,            0,      's'},
+       {"idmapped-mounts-supported",           no_argument,            0,      's'},
        {"help",                                no_argument,            0,      'h'},
        {"test-core",                           no_argument,            0,      'c'},
        {"test-fscaps-regression",              no_argument,            0,      'g'},
@@ -14494,9 +14494,9 @@ int main(int argc, char *argv[])
 {
        int fret, ret;
        int index = 0;
-       bool supported = false, test_btrfs = false, test_core = false,
-            test_fscaps_regression = false, test_nested_userns = false,
-            test_setattr_fix_968219708108 = false,
+       bool idmapped_mounts_supported = false, test_btrfs = false,
+            test_core = false, test_fscaps_regression = false,
+            test_nested_userns = false, test_setattr_fix_968219708108 = false,
             test_setxattr_fix_705191b03d50 = false;
 
        while ((ret = getopt_long_only(argc, argv, "", longopts, &index)) != -1) {
@@ -14511,7 +14511,7 @@ int main(int argc, char *argv[])
                        t_mountpoint = optarg;
                        break;
                case 's':
-                       supported = true;
+                       idmapped_mounts_supported = true;
                        break;
                case 'c':
                        test_core = true;
@@ -14570,7 +14570,7 @@ int main(int argc, char *argv[])
                die("failed to open %s", t_mountpoint_scratch);
 
        t_fs_allow_idmap = fs_allow_idmap();
-       if (supported) {
+       if (idmapped_mounts_supported) {
                /*
                 * Caller just wants to know whether the filesystem we're on
                 * supports idmapped mounts.
index 6403f878dc197bd1d063f07e68fbbc097dcc7f21..dadc8492b6418f7c533d81414b49051c72d61b6f 100755 (executable)
@@ -26,7 +26,7 @@ _scratch_mount "-o user_subvol_rm_allowed" >> $seqres.full
 
 echo "Silence is golden"
 
-$here/src/vfs/idmapped-mounts --test-btrfs --device "$TEST_DEV" \
+$here/src/vfs/vfstest --test-btrfs --device "$TEST_DEV" \
        --mountpoint "$TEST_DIR" --scratch-device "$SCRATCH_DEV" \
        --scratch-mountpoint "$SCRATCH_MNT" --fstype "$FSTYP"
 
index 2054b64604840292f4c5b42a46dcaf96defd3c2f..9b29dbf1cacc1d67ecc3ca2d89159326922a70e4 100755 (executable)
@@ -19,7 +19,7 @@ _require_test
 
 echo "Silence is golden"
 
-$here/src/vfs/idmapped-mounts --test-core --device "$TEST_DEV" \
+$here/src/vfs/vfstest --test-core --device "$TEST_DEV" \
        --mount "$TEST_DIR" --fstype "$FSTYP"
 
 status=$?
index 17fc053926c9e13ba844b1ebbf57daff091e93b3..edf9b03e23fb5b2518680df01a3b30b52a9ebf77 100755 (executable)
@@ -21,7 +21,7 @@ _require_test
 
 echo "Silence is golden"
 
-$here/src/vfs/idmapped-mounts --test-fscaps-regression \
+$here/src/vfs/vfstest --test-fscaps-regression \
        --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP"
 
 status=$?
index f1209ad0a6416aa7bd202eb5cd441e8e81d72784..74e0f58928267ce2df5b572d9a8f56add95a3612 100755 (executable)
@@ -21,7 +21,7 @@ _require_test
 
 echo "Silence is golden"
 
-$here/src/vfs/idmapped-mounts --test-nested-userns \
+$here/src/vfs/vfstest --test-nested-userns \
        --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP"
 
 status=$?
index 9e95ac96a7183d32cb9f34d5b453d8afba66fafa..5c090cfa9c11f00073955b9c7c5d92c7c3367451 100755 (executable)
@@ -26,7 +26,7 @@ _require_group fsgqa2
 
 echo "Silence is golden"
 
-$here/src/vfs/idmapped-mounts --test-setattr-fix-968219708108 \
+$here/src/vfs/vfstest --test-setattr-fix-968219708108 \
        --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP"
 
 status=$?
index a0aa7778c39679c4d86cd90feba9f9aac346db5c..6aff9695c99c539877063b9252259a4a0756d8ce 100755 (executable)
@@ -26,7 +26,7 @@ _require_group fsgqa
 
 echo "Silence is golden"
 
-$here/src/vfs/idmapped-mounts --test-setxattr-fix-705191b03d50 \
+$here/src/vfs/vfstest --test-setxattr-fix-705191b03d50 \
        --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP"
 
 status=$?
index de9b8fc6840cbcbeb84e0d0d5170a84ee27b48e9..dd33801d5ec55aae686598fbbde11cfb8637d790 100755 (executable)
@@ -246,7 +246,7 @@ qmount_idmapped()
        mkdir -p "${SCRATCH_MNT}/unmapped"
        mkdir -p "${SCRATCH_MNT}/idmapped"
 
-       $here/src/idmapped-mounts/mount-idmapped \
+       $here/src/vfs/mount-idmapped \
                --map-mount b:$id:$id2:1 \
                --map-mount b:0:0:1 \
                "$SCRATCH_MNT/unmapped" "$SCRATCH_MNT/idmapped" || _fail "mount-idmapped failed"