]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: backport special mount script
authorKarel Zak <kzak@redhat.com>
Mon, 19 Jun 2023 12:36:59 +0000 (14:36 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 19 Jun 2023 12:36:59 +0000 (14:36 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/mount/special-basic [new file with mode: 0644]
tests/expected/mount/special-multi-types [new file with mode: 0644]
tests/expected/mount/special-options [new file with mode: 0644]
tests/expected/mount/special-user [new file with mode: 0644]
tests/expected/mount/special-username [new file with mode: 0644]
tests/ts/mount/special

diff --git a/tests/expected/mount/special-basic b/tests/expected/mount/special-basic
new file mode 100644 (file)
index 0000000..99997d3
--- /dev/null
@@ -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 (file)
index 0000000..99997d3
--- /dev/null
@@ -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 (file)
index 0000000..820a74a
--- /dev/null
@@ -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 (file)
index 0000000..02c112e
--- /dev/null
@@ -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 (file)
index 0000000..c192562
--- /dev/null
@@ -0,0 +1 @@
+/sbin/mount.mytest called with "/foo /bar -o rw,user=name,abc"
index 87ebbf60f9d6f547835d460a2028ac86ae7bbb0f..359d8aaca798523c9b16f2aa75b375c6a71d701d 100755 (executable)
@@ -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