diff options
| author | Karel Zak <kzak@redhat.com> | 2025-10-14 10:52:31 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2025-10-14 10:52:31 +0200 |
| commit | 87277a5c2c685fa51ba0b211f45d5cb2c9875c58 (patch) | |
| tree | af9856d4ef6e05a69bd0e68371a7f026293595d0 | |
| parent | 5034323c6fb85e43f7abb8275c695954d8bf2658 (diff) | |
| parent | 95f3fbfc4f5584261e1ad91dba35c92673f03890 (diff) | |
| download | util-linux-87277a5c2c685fa51ba0b211f45d5cb2c9875c58.tar.gz | |
Merge branch 'fix/test_libmount_explicit_rw' of https://github.com/cgoesche/util-linux-fork
* 'fix/test_libmount_explicit_rw' of https://github.com/cgoesche/util-linux-fork:
tests: (libmount) improve explicit loop read-write mount check
| -rw-r--r-- | tests/expected/libmount/loop-explicit-rw | 1 | ||||
| -rwxr-xr-x | tests/ts/libmount/loop | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/expected/libmount/loop-explicit-rw b/tests/expected/libmount/loop-explicit-rw index e7787c0590..35821117c8 100644 --- a/tests/expected/libmount/loop-explicit-rw +++ b/tests/expected/libmount/loop-explicit-rw @@ -1,2 +1 @@ -rw Success diff --git a/tests/ts/libmount/loop b/tests/ts/libmount/loop index db807bd44a..72fd27f014 100755 --- a/tests/ts/libmount/loop +++ b/tests/ts/libmount/loop @@ -142,7 +142,8 @@ ts_finalize_subtest ts_init_subtest "explicit-rw" [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT $TS_CMD_MOUNT -o rw "$BACKFILE" "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG -$TS_CMD_FINDMNT -no FS-OPTIONS --mountpoint "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG +FINDMNT_RES=$( $TS_CMD_FINDMNT -Q 'OPTIONS =~ "[,]?rw[,]?"' -no OPTIONS --mountpoint "$TS_MOUNTPOINT" ) +[ -n "$FINDMNT_RES" ] || ts_log "$TS_MOUNTPOINT not mounted as read-write" $TS_CMD_UMOUNT "$TS_MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG udevadm settle ts_log "Success" |
