From: Karel Zak Date: Tue, 8 Mar 2016 12:38:36 +0000 (+0100) Subject: tests: don't compare btrfs mount options X-Git-Tag: v2.28-rc1~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=076153f8;p=thirdparty%2Futil-linux.git 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 --- 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