From: Christian Brauner <brauner@kernel.org>
To: fstests@vger.kernel.org, Eryu Guan <guan@eryu.me>,
Christoph Hellwig <hch@lst.de>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Subject: [PATCH v4 3/8] idmapped-mounts: introduce an explicit command line switch for testsuite
Date: Sat, 14 Aug 2021 12:48:00 +0200 [thread overview]
Message-ID: <20210814104805.1124023-4-brauner@kernel.org> (raw)
In-Reply-To: <20210814104805.1124023-1-brauner@kernel.org>
From: Christian Brauner <christian.brauner@ubuntu.com>
Introduce an explicit command line switch to runs the basic test suite.
This prepares for the introduction of additional command line switches
to run additional tests.
Cc: fstests@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
/* v2 */
patch not present
/* v3 */
- Christoph Hellwig <hch@lst.de>:
- Split into separate patch.
/* v4 */
unchanged
---
src/idmapped-mounts/idmapped-mounts.c | 11 ++++++++---
tests/generic/633 | 3 ++-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/idmapped-mounts/idmapped-mounts.c b/src/idmapped-mounts/idmapped-mounts.c
index 0e6698bd..e45248e1 100644
--- a/src/idmapped-mounts/idmapped-mounts.c
+++ b/src/idmapped-mounts/idmapped-mounts.c
@@ -8722,6 +8722,7 @@ static void usage(void)
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, "--test-core Run core idmapped mount testsuite\n");
_exit(EXIT_SUCCESS);
}
@@ -8732,7 +8733,8 @@ static const struct option longopts[] = {
{"mountpoint", required_argument, 0, 'm'},
{"supported", no_argument, 0, 's'},
{"help", no_argument, 0, 'h'},
- {NULL, 0, 0, 0 },
+ {"test-core", no_argument, 0, 'c'},
+ {NULL, 0, 0, 0},
};
struct t_idmapped_mounts {
@@ -8827,7 +8829,7 @@ int main(int argc, char *argv[])
{
int fret, ret;
int index = 0;
- bool supported = false;
+ bool supported = false, test_core = false;
while ((ret = getopt_long_only(argc, argv, "", longopts, &index)) != -1) {
switch (ret) {
@@ -8843,6 +8845,9 @@ int main(int argc, char *argv[])
case 's':
supported = true;
break;
+ case 'c':
+ test_core = true;
+ break;
case 'h':
/* fallthrough */
default:
@@ -8912,7 +8917,7 @@ int main(int argc, char *argv[])
fret = EXIT_FAILURE;
- if (!run_test(basic_suite, ARRAY_SIZE(basic_suite)))
+ if (test_core && !run_test(basic_suite, ARRAY_SIZE(basic_suite)))
goto out;
fret = EXIT_SUCCESS;
diff --git a/tests/generic/633 b/tests/generic/633
index 6be8a69e..67501177 100755
--- a/tests/generic/633
+++ b/tests/generic/633
@@ -20,7 +20,8 @@ _require_test
echo "Silence is golden"
-$here/src/idmapped-mounts/idmapped-mounts --device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP"
+$here/src/idmapped-mounts/idmapped-mounts --test-core --device "$TEST_DEV" \
+ --mount "$TEST_DIR" --fstype "$FSTYP"
status=$?
exit
--
2.30.2
next prev parent reply other threads:[~2021-08-14 10:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 10:47 [PATCH v4 0/8] Extend idmapped mount testsuite Christian Brauner
2021-08-14 10:47 ` [PATCH v4 1/8] idmapped-mounts: use die() helper Christian Brauner
2021-08-14 10:47 ` [PATCH v4 2/8] idmapped-mounts: switch to getopt_long_only() Christian Brauner
2021-08-15 8:22 ` Christoph Hellwig
2021-08-14 10:48 ` Christian Brauner [this message]
2021-08-14 10:48 ` [PATCH v4 4/8] generic/640: add fscaps regression test Christian Brauner
2021-08-14 10:48 ` [PATCH v4 5/8] idmapped-mounts: refactor helpers Christian Brauner
2021-08-14 10:48 ` [PATCH v4 6/8] idmapped-mounts: add nested userns creation helpers Christian Brauner
2021-08-14 10:48 ` [PATCH v4 7/8] generic/641: add nested user namespace tests Christian Brauner
2021-08-14 10:48 ` [PATCH v4 8/8] btrfs/244: introduce btrfs specific idmapped mounts tests Christian Brauner
2021-08-15 16:46 ` [PATCH v4 0/8] Extend idmapped mount testsuite Christian Brauner
2021-08-17 3:11 ` Eryu Guan
2021-08-17 12:31 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210814104805.1124023-4-brauner@kernel.org \
--to=brauner@kernel.org \
--cc=christian.brauner@ubuntu.com \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=hch@lst.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.