From 201bc72ef7893d8215cb6065458360868a29c9c3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 30 Nov 2023 10:25:45 +0100 Subject: [PATCH] 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 --- tests/expected/mount/special-missing-options | 1 + tests/ts/mount/special | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/expected/mount/special-missing-options 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 -- 2.47.2