2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Fujitsu, Inc. All Rights Reserved.
5 # FS QA Test No. btrfs/090
7 # Check return value of "btrfs filesystem show" command executed on
9 # It should return 0 if nothing wrong happens.
11 # Regression in v3.18 btrfs-progs and fixed by the following patch:
13 # btrfs-progs: Fix wrong return value when executing 'fi show' on
17 seqres=$RESULT_DIR/$seq
18 echo "QA output created by $seq"
22 status=1 # failure is the default!
23 trap "_cleanup; exit \$status" 0 1 2 3 15
31 # get standard environment, filters and checks
33 . ./common/filter.btrfs
35 # real QA test starts here
37 # Modify as appropriate.
40 _require_scratch_dev_pool
44 FIRST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'`
45 TOTAL_DEVS=`echo $SCRATCH_DEV_POOL | wc -w`
47 _scratch_pool_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
49 _run_btrfs_util_prog filesystem show $FIRST_POOL_DEV | \
50 _filter_btrfs_filesystem_show $TOTAL_DEVS
53 echo "Silence is golden"