From 076153f8168d3dd7be073e24b4baf4c6d0a78c00 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 8 Mar 2016 13:38:36 +0100 Subject: [PATCH] tests: don't compare btrfs mount options We don't control mount options in the mountinfo file and the options depend on kernel version. It does not make sense to hardcode the options in the expected outputs. Note that libmount should be portable enough to be able to work with all kernel versions. It seems better to check libmount functionality than kernel mount options formatting. Signed-off-by: Karel Zak --- tests/expected/libmount/context-utab | 3 --- tests/expected/libmount/context-utab-py | 3 --- tests/ts/libmount/context-utab | 10 +++++++--- tests/ts/libmount/context-utab-py | 11 ++++++++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/expected/libmount/context-utab b/tests/expected/libmount/context-utab index 2149373b8f..10d4d566a8 100644 --- a/tests/expected/libmount/context-utab +++ b/tests/expected/libmount/context-utab @@ -2,7 +2,4 @@ Create partitions Create filesystem Do tests... Create filesystem [btrfs] -All mount options (btrfs subvolume + utab) --- -rw,relatime,ssd,space_cache,uhelper=foo ---- ...done. diff --git a/tests/expected/libmount/context-utab-py b/tests/expected/libmount/context-utab-py index 2149373b8f..10d4d566a8 100644 --- a/tests/expected/libmount/context-utab-py +++ b/tests/expected/libmount/context-utab-py @@ -2,7 +2,4 @@ Create partitions Create filesystem Do tests... Create filesystem [btrfs] -All mount options (btrfs subvolume + utab) --- -rw,relatime,ssd,space_cache,uhelper=foo ---- ...done. diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab index 38bc1701c7..4eb68ffcb4 100755 --- a/tests/ts/libmount/context-utab +++ b/tests/ts/libmount/context-utab @@ -112,9 +112,13 @@ grep -q $DEVICE $LIBMOUNT_UTAB || \ echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest -ts_log "All mount options (btrfs subvolume + utab) ---" -$TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1 -ts_log "---" +# Don't temporary write btrfs mount options to the test output, +# the options depend on kernel version (since 4.2 it contains +# subvol= and subvolid=). +# +#ts_log "All mount options (btrfs subvolume + utab) ---" +#$TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1 +#ts_log "---" ts_init_subtest "umount-subvol" ts_valgrind $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 diff --git a/tests/ts/libmount/context-utab-py b/tests/ts/libmount/context-utab-py index fdde63a7aa..b781fafd3a 100755 --- a/tests/ts/libmount/context-utab-py +++ b/tests/ts/libmount/context-utab-py @@ -113,9 +113,14 @@ grep -q $DEVICE $LIBMOUNT_UTAB || \ echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1 ts_finalize_subtest -ts_log "All mount options (btrfs subvolume + utab) ---" -$TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1 -ts_log "---" + +# Don't temporary write btrfs mount options to the test output, +# the options depend on kernel version (since 4.2 it contains +# subvol= and subvolid=). +# +#ts_log "All mount options (btrfs subvolume + utab) ---" +#$TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1 +#ts_log "---" ts_init_subtest "umount-subvol" $PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1 -- 2.39.5