fstests: use _require_symlinks on all necessary tests
[xfstests-dev.git] / tests / generic / 523
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0+
3 # Copyright (c) 2019 Oracle, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 523
6 #
7 # Check that xattrs can have slashes in their name.
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12 tmp=/tmp/$$
13 status=1        # failure is the default!
14 trap "_cleanup; exit \$status" 0 1 2 3 15
15
16 _cleanup()
17 {
18         cd /
19         rm -f $tmp.*
20 }
21
22 # get standard environment, filters and checks
23 . ./common/rc
24 . ./common/attr
25 . ./common/filter
26
27 # real QA test starts here
28 _supported_fs generic
29 _supported_os Linux
30 _require_scratch
31 _require_attrs
32
33 rm -f $seqres.full
34
35 _scratch_mkfs >> $seqres.full 2>&1
36 _scratch_mount
37
38 echo "set attr"
39 file=$SCRATCH_MNT/moofile
40 touch $file
41 $SETFATTR_PROG -n "user.boo/hoo" -v "woof" $file
42
43 echo "check attr"
44 _getfattr -d --absolute-names $file | _filter_scratch
45
46 # Now we let the fsck tool check the filesystem, because xfs_repair had a
47 # regression where it would flag and erase any xattr with a '/' in it.
48
49 status=0
50 exit