From: Karel Zak Date: Mon, 19 Jun 2023 12:36:59 +0000 (+0200) Subject: tests: backport special mount script X-Git-Tag: v2.39.1~27 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2278e2f913013245d45bec6c4552e3594fe8fce2;p=thirdparty%2Futil-linux.git tests: backport special mount script Signed-off-by: Karel Zak --- diff --git a/tests/expected/mount/special-basic b/tests/expected/mount/special-basic new file mode 100644 index 0000000000..99997d354f --- /dev/null +++ b/tests/expected/mount/special-basic @@ -0,0 +1 @@ +/sbin/mount.mytest called with "/foo /bar -o rw" diff --git a/tests/expected/mount/special-multi-types b/tests/expected/mount/special-multi-types new file mode 100644 index 0000000000..99997d354f --- /dev/null +++ b/tests/expected/mount/special-multi-types @@ -0,0 +1 @@ +/sbin/mount.mytest called with "/foo /bar -o rw" diff --git a/tests/expected/mount/special-options b/tests/expected/mount/special-options new file mode 100644 index 0000000000..820a74a9fc --- /dev/null +++ b/tests/expected/mount/special-options @@ -0,0 +1 @@ +/sbin/mount.mytest called with "/foo /bar -o rw,foo" diff --git a/tests/expected/mount/special-user b/tests/expected/mount/special-user new file mode 100644 index 0000000000..02c112e18a --- /dev/null +++ b/tests/expected/mount/special-user @@ -0,0 +1 @@ +/sbin/mount.mytest called with "/foo /bar -o rw,user,noexec,nosuid,nodev,abc" diff --git a/tests/expected/mount/special-username b/tests/expected/mount/special-username new file mode 100644 index 0000000000..c192562906 --- /dev/null +++ b/tests/expected/mount/special-username @@ -0,0 +1 @@ +/sbin/mount.mytest called with "/foo /bar -o rw,user=name,abc" diff --git a/tests/ts/mount/special b/tests/ts/mount/special index 87ebbf60f9..359d8aaca7 100755 --- a/tests/ts/mount/special +++ b/tests/ts/mount/special @@ -35,7 +35,26 @@ echo "$0 called with \"$*\"" EOF chmod +x $MOUNTER +ts_init_subtest "basic" +$TS_CMD_MOUNT -t mytest /foo /bar &> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "options" $TS_CMD_MOUNT -t mytest -o foo,defaults /foo /bar &> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "multi-types" +$TS_CMD_MOUNT -t mytest,invalid /foo /bar &> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "user" +$TS_CMD_MOUNT -t mytest -ouser,abc /foo /bar &> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest "username" +$TS_CMD_MOUNT -t mytest -ouser=name,abc /foo /bar &> $TS_OUTPUT +ts_finalize_subtest + rm -f $MOUNTER ts_finalize