2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat, Inc. All Rights Reserved.
7 # Ensure that xfs_repair can properly spot SGI_ACL_FILE
8 # and SGI_ACL_DEFAULT in the root attr namespace.
10 # Due to bugs here and there, we sometimes matched on partial
11 # strings with those names, and threw off xfs_repair.
14 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
19 status=1 # failure is the default!
21 # get standard environment, filters and checks
31 trap "_cleanup; exit \$status" 0 1 2 3 15
33 # real QA test starts here
40 _scratch_mkfs >/dev/null 2>&1
43 # Create root attr names which are substrings or superstrings
44 # of the reserved ACL names, and make sure xfs_repair copes.
46 # Due to various bugs, either the compared length was shorter
47 # than the reserved name (7 chars), so substrings matched, and/or only
48 # the reserved name length was compared, so superstrings matched.
50 rm -f $SCRATCH_MNT/$seq.*
52 # actual reserved names:
53 # SGI_ACL_FILE SGI_ACL_DEFAULT
56 SGI_ACL_FILE_FOO SGI_ACL_DEFAULT_FOO; do
57 touch $SCRATCH_MNT/${seq}.${NAME}
58 $ATTR_PROG -R -s $NAME -V "Wow, such $NAME" $SCRATCH_MNT/$seq.$NAME \
62 # Older repair failed because it sees the above names as matching
63 # SGI_ACL_FILE / SGI_ACL_DEFAULT but w/o valid acls on them
65 # The test harness will catch this (false positive) corruption