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.
36 _require_scratch_dev_pool 4
39 declare -a TEST_VECTORS=(
40 # $nr_dev_min:$data:$metadata:$data_convert:$metadata_convert
51 IFS=':' read -ra args <<< $1
56 _scratch_dev_pool_get $num_disks
58 echo "=== Running test: $1 ===" >> $seqres.full
60 _scratch_pool_mkfs -d$src_type >> $seqres.full 2>&1
63 # Create random filesystem with 20k write ops
64 $FSSTRESS_PROG -d $SCRATCH_MNT -w -n 10000 $FSSTRESS_AVOID >>$seqres.full 2>&1
66 _run_btrfs_balance_start -f -dconvert=$dst_type $SCRATCH_MNT >> $seqres.full
67 [ $? -eq 0 ] || echo "$1: Failed convert"
69 $BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >>$seqres.full 2>&1
70 [ $? -eq 0 ] || echo "$1: Scrub failed"
73 _check_btrfs_filesystem $SCRATCH_DEV
77 for i in "${TEST_VECTORS[@]}"; do
81 echo "Silence is golden"