2 # FS QA Test No. btrfs/090
4 # Check return value of "btrfs filesystem show" command executed on
6 # It should return 0 if nothing wrong happens.
8 # Regression in v3.18 btrfs-progs and fixed by the following patch:
10 # btrfs-progs: Fix wrong return value when executing 'fi show' on
13 #-----------------------------------------------------------------------
14 # Copyright (c) 2015 Fujitsu, Inc. All Rights Reserved.
16 # This program is free software; you can redistribute it and/or
17 # modify it under the terms of the GNU General Public License as
18 # published by the Free Software Foundation.
20 # This program is distributed in the hope that it would be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write the Free Software Foundation,
27 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 #-----------------------------------------------------------------------
32 seqres=$RESULT_DIR/$seq
33 echo "QA output created by $seq"
37 status=1 # failure is the default!
38 trap "_cleanup; exit \$status" 0 1 2 3 15
46 # get standard environment, filters and checks
48 . ./common/filter.btrfs
50 # real QA test starts here
52 # Modify as appropriate.
56 _require_scratch_dev_pool
60 FIRST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'`
61 TOTAL_DEVS=`echo $SCRATCH_DEV_POOL | wc -w`
63 _scratch_pool_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
65 _run_btrfs_util_prog filesystem show $FIRST_POOL_DEV | \
66 _filter_btrfs_filesystem_show $TOTAL_DEVS
69 echo "Silence is golden"