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
39 _scratch_mkfs >/dev/null 2>&1
42 # Create root attr names which are substrings or superstrings
43 # of the reserved ACL names, and make sure xfs_repair copes.
45 # Due to various bugs, either the compared length was shorter
46 # than the reserved name (7 chars), so substrings matched, and/or only
47 # the reserved name length was compared, so superstrings matched.
49 rm -f $SCRATCH_MNT/$seq.*
51 # actual reserved names:
52 # SGI_ACL_FILE SGI_ACL_DEFAULT
55 SGI_ACL_FILE_FOO SGI_ACL_DEFAULT_FOO; do
56 touch $SCRATCH_MNT/${seq}.${NAME}
57 $ATTR_PROG -R -s $NAME -V "Wow, such $NAME" $SCRATCH_MNT/$seq.$NAME \
61 # Older repair failed because it sees the above names as matching
62 # SGI_ACL_FILE / SGI_ACL_DEFAULT but w/o valid acls on them
64 # The test harness will catch this (false positive) corruption