generic/402: Drop useless fail message
[xfstests-dev.git] / tests / generic / 486
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Oracle.  All Rights Reserved.
4 #
5 # FS QA Test No. 486
6 #
7 # Ensure that we can XATTR_REPLACE a tiny attr into a large attr.
8 # Kanda Motohiro <kanda.motohiro@gmail.com> reports that XATTR_REPLACE'ing
9 # a single-byte attr with a 2048-byte attr causes a fs shutdown because we
10 # remove the shortform attr, convert the attr fork to long format, and then
11 # try to re-add the attr having not cleared ATTR_REPLACE.
12 #
13 # Commit 7b38460dc8e4 ("xfs: don't fail when converting shortform attr to long
14 # form during ATTR_REPLACE") fixed the xfs bug.
15 #
16 seq=`basename $0`
17 seqres=$RESULT_DIR/$seq
18 echo "QA output created by $seq"
19
20 here=`pwd`
21 status=1        # failure is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
23
24 _cleanup()
25 {
26         cd /
27         rm -f $testfile
28 }
29
30 # get standard environment, filters and checks
31 . ./common/rc
32 . ./common/filter
33 . ./common/attr
34
35 # remove previous $seqres.full before test
36 rm -f $seqres.full
37
38 # real QA test starts here
39 _supported_fs generic
40 _require_test_program "attr_replace_test"
41 _require_attrs
42 _require_scratch
43
44 rm -f $seqres.full
45 _scratch_mkfs >>$seqres.full 2>&1
46 _scratch_mount >>$seqres.full 2>&1
47
48 filter_attr_output() {
49         _filter_scratch | grep world | \
50                 sed -e 's/has a [0-9]* byte value/has a NNNN byte value/g'
51 }
52
53 $here/src/attr_replace_test $SCRATCH_MNT/hello
54 $ATTR_PROG -l $SCRATCH_MNT/hello >>$seqres.full 2>&1
55 $ATTR_PROG -l $SCRATCH_MNT/hello | filter_attr_output
56
57 status=0
58 exit