4 # Ensure that xfs_repair can properly spot SGI_ACL_FILE
5 # and SGI_ACL_DEFAULT in the root attr namespace.
7 # Due to bugs here and there, we sometimes matched on partial
8 # strings with those names, and threw off xfs_repair.
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2015 Red Hat, Inc. All Rights Reserved.
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation.
17 # This program is distributed in the hope that it would be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write the Free Software Foundation,
24 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #-----------------------------------------------------------------------
29 seqres=$RESULT_DIR/$seq
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
36 # get standard environment, filters and checks
46 trap "_cleanup; exit \$status" 0 1 2 3 15
48 # real QA test starts here
51 _supported_os IRIX Linux
55 _scratch_mkfs >/dev/null 2>&1
58 # Create root attr names which are substrings or superstrings
59 # of the reserved ACL names, and make sure xfs_repair copes.
61 # Due to various bugs, either the compared length was shorter
62 # than the reserved name (7 chars), so substrings matched, and/or only
63 # the reserved name length was compared, so superstrings matched.
65 rm -f $SCRATCH_MNT/$seq.*
67 # actual reserved names:
68 # SGI_ACL_FILE SGI_ACL_DEFAULT
71 SGI_ACL_FILE_FOO SGI_ACL_DEFAULT_FOO; do
72 touch $SCRATCH_MNT/${seq}.${NAME}
73 $ATTR_PROG -R -s $NAME -V "Wow, such $NAME" $SCRATCH_MNT/$seq.$NAME \
77 # Older repair failed because it sees the above names as matching
78 # SGI_ACL_FILE / SGI_ACL_DEFAULT but w/o valid acls on them
80 # The test harness will catch this (false positive) corruption