2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2019 SUSE Linux Products GmbH. All Rights Reserved.
7 # Test raid profile conversion. It's sufficient to test all dest profiles as
8 # source profiles just rely on being able to read the data and metadata.
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
29 # remove previous $seqres.full before test
32 # real QA test starts here
34 # Modify as appropriate.
37 _require_scratch_dev_pool 4
40 declare -a TEST_VECTORS=(
41 # $nr_dev_min:$data:$metadata:$data_convert:$metadata_convert
52 IFS=':' read -ra args <<< $1
57 _scratch_dev_pool_get $num_disks
59 echo "=== Running test: $1 ===" >> $seqres.full
61 _scratch_pool_mkfs -d$src_type >> $seqres.full 2>&1
64 # Create random filesystem with 20k write ops
65 $FSSTRESS_PROG -d $SCRATCH_MNT -w -n 10000 $FSSTRESS_AVOID >>$seqres.full 2>&1
67 $BTRFS_UTIL_PROG balance start -f -dconvert=$dst_type $SCRATCH_MNT >> $seqres.full 2>&1
68 [ $? -eq 0 ] || echo "$1: Failed convert"
70 $BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >>$seqres.full 2>&1
71 [ $? -eq 0 ] || echo "$1: Scrub failed"
74 _check_btrfs_filesystem $SCRATCH_DEV
78 for i in "${TEST_VECTORS[@]}"; do
82 echo "Silence is golden"