]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: test utab options after helper call
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Nov 2023 18:15:47 +0000 (19:15 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Nov 2023 18:18:00 +0000 (19:18 +0100)
See #2607

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tests/ts/mount/special

index 359d8aaca798523c9b16f2aa75b375c6a71d701d..40517e71167e8846aac70ceb4a0d988ae0d5cfdc 100755 (executable)
@@ -23,6 +23,7 @@ MOUNTER="/sbin/mount.mytest"
 ts_init "$*"
 
 ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
 
 ts_skip_nonroot
 
@@ -55,7 +56,29 @@ ts_init_subtest "username"
 $TS_CMD_MOUNT -t mytest -ouser=name,abc /foo /bar &> $TS_OUTPUT
 ts_finalize_subtest
 
+ts_init_subtest "missing-options"
+
+cat > $MOUNTER <<EOF
+#!/bin/bash
+# This util-linux regression test component
+# It's safe to remove me...
+#
+$TS_CMD_MOUNT -t tmpfs -i "\$1" "\$2" -o x-foo=123
+EOF
+
+mountpoint="$TS_OUTDIR/mnt"
+mkdir -p "$mountpoint"
+export LIBMOUNT_UTAB=$TS_OUTDIR/utab
+$TS_CMD_MOUNT -t mytest -o x-bar=BAR /foo "$mountpoint" &> $TS_OUTPUT
+cat "$LIBMOUNT_UTAB" \
+       | grep "$mountpoint" \
+       | sed -e "s|$mountpoint|/mountpoint|g" \
+       &> $TS_OUTPUT
+$TS_CMD_UMOUNT "$mountpoint"
+unset LIBMOUNT_UTAB
+
+ts_finalize_subtest
+
 rm -f $MOUNTER
 
 ts_finalize
-