common/fuzzy: if the fuzz verb is random, keep fuzzing until we get a new value
[xfstests-dev.git] / common / btrfs
index 96c3635bcc5113c00c2a586da95e2d04ae289c69..c09206c6f29240b27fc2af40341dab018122057f 100644 (file)
@@ -105,9 +105,7 @@ _check_btrfs_filesystem()
        if [ -f ${RESULT_DIR}/require_scratch.require_qgroup_report ]; then
                $BTRFS_UTIL_PROG check $device --qgroup-report > $tmp.qgroup_report 2>&1
                if grep -qE "Counts for qgroup.*are different" $tmp.qgroup_report ; then
-                       echo "_check_btrfs_filesystem: filesystem on $device has wrong qgroup numbers (see $seqres.full)"
-                       echo "_check_btrfs_filesystem: filesystem on $device has wrong qgroup numbers" \
-                               >> $seqres.full
+                       _log_err "_check_btrfs_filesystem: filesystem on $device has wrong qgroup numbers"
                        echo "*** qgroup_report.$FSTYP output ***"      >>$seqres.full
                        cat $tmp.qgroup_report                          >>$seqres.full
                        echo "*** qgroup_report.$FSTYP output ***"      >>$seqres.full
@@ -117,9 +115,7 @@ _check_btrfs_filesystem()
 
        $BTRFS_UTIL_PROG check $device >$tmp.fsck 2>&1
        if [ $? -ne 0 ]; then
-               echo "_check_btrfs_filesystem: filesystem on $device is inconsistent (see $seqres.full)"
-
-               echo "_check_btrfs_filesystem: filesystem on $device is inconsistent" >>$seqres.full
+               _log_err "_check_btrfs_filesystem: filesystem on $device is inconsistent"
                echo "*** fsck.$FSTYP output ***"       >>$seqres.full
                cat $tmp.fsck                           >>$seqres.full
                echo "*** end fsck.$FSTYP output"       >>$seqres.full
@@ -353,14 +349,10 @@ _btrfs_qgroup_units()
        $BTRFS_UTIL_PROG qgroup show --help 2>&1 | grep -q -- --raw && echo "--raw"
 }
 
-_require_btrfs_loadable()
+_btrfs_compression_algos()
 {
-       modprobe -r btrfs || _notrun "btrfs unloadable"
-       modprobe btrfs || _notrun "Can't load btrfs"
-}
-
-_reload_btrfs_ko()
-{
-       modprobe -r btrfs || _fail "btrfs unload failed"
-       modprobe btrfs || _fail "btrfs load failed"
+       echo zlib
+       for feature in /sys/fs/btrfs/features/compress_*; do
+               echo "${feature#/sys/fs/btrfs/features/compress_}"
+       done
 }