From: Karel Zak Date: Thu, 30 Nov 2023 09:25:45 +0000 (+0100) Subject: tests: add missing file and improve options-missing test X-Git-Tag: v2.40-rc1~136^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=201bc72ef7893d8215cb6065458360868a29c9c3;p=thirdparty%2Futil-linux.git tests: add missing file and improve options-missing test * remove optional ID= field (not on systems without statx()) * add missing tests/expected/mount/special-missing-options * make sure utab is created * use udevadm settle to wait for systemd Signed-off-by: Karel Zak --- diff --git a/tests/expected/mount/special-missing-options b/tests/expected/mount/special-missing-options new file mode 100644 index 0000000000..9ead32408b --- /dev/null +++ b/tests/expected/mount/special-missing-options @@ -0,0 +1 @@ +SRC=/foo TARGET=/mountpoint ROOT=/ OPTS=x-foo=123,x-bar=BAR diff --git a/tests/ts/mount/special b/tests/ts/mount/special index 40517e7116..e1351e41e1 100755 --- a/tests/ts/mount/special +++ b/tests/ts/mount/special @@ -56,8 +56,8 @@ ts_init_subtest "username" $TS_CMD_MOUNT -t mytest -ouser=name,abc /foo /bar &> $TS_OUTPUT ts_finalize_subtest -ts_init_subtest "missing-options" +ts_init_subtest "missing-options" cat > $MOUNTER < $MOUNTER < $LIBMOUNT_UTAB + $TS_CMD_MOUNT -t mytest -o x-bar=BAR /foo "$mountpoint" &> $TS_OUTPUT +udevadm settle + cat "$LIBMOUNT_UTAB" \ | grep "$mountpoint" \ | sed -e "s|$mountpoint|/mountpoint|g" \ + -e 's/ID=[[:digit:]]* //g' \ &> $TS_OUTPUT $TS_CMD_UMOUNT "$mountpoint" unset LIBMOUNT_UTAB