mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
a860a167d8
fstests only supports Linux, so get rid of this unnecessary predicate. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
69 lines
1.6 KiB
Bash
Executable File
69 lines
1.6 KiB
Bash
Executable File
#! /bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (c) 2015 Red Hat, Inc. All Rights Reserved.
|
|
#
|
|
# FS QA Test 053
|
|
#
|
|
# Ensure that xfs_repair can properly spot SGI_ACL_FILE
|
|
# and SGI_ACL_DEFAULT in the root attr namespace.
|
|
#
|
|
# Due to bugs here and there, we sometimes matched on partial
|
|
# strings with those names, and threw off xfs_repair.
|
|
#
|
|
seq=`basename $0`
|
|
seqres=$RESULT_DIR/$seq
|
|
echo "QA output created by $seq"
|
|
|
|
here=`pwd`
|
|
tmp=/tmp/$$
|
|
status=1 # failure is the default!
|
|
|
|
# get standard environment, filters and checks
|
|
. ./common/rc
|
|
. ./common/filter
|
|
. ./common/attr
|
|
|
|
_cleanup()
|
|
{
|
|
cd /
|
|
rm -f $tmp.*
|
|
}
|
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
|
|
|
# real QA test starts here
|
|
|
|
_supported_fs xfs
|
|
_require_scratch
|
|
_require_attrs
|
|
|
|
_scratch_mkfs >/dev/null 2>&1
|
|
_scratch_mount
|
|
|
|
# Create root attr names which are substrings or superstrings
|
|
# of the reserved ACL names, and make sure xfs_repair copes.
|
|
|
|
# Due to various bugs, either the compared length was shorter
|
|
# than the reserved name (7 chars), so substrings matched, and/or only
|
|
# the reserved name length was compared, so superstrings matched.
|
|
|
|
rm -f $SCRATCH_MNT/$seq.*
|
|
|
|
# actual reserved names:
|
|
# SGI_ACL_FILE SGI_ACL_DEFAULT
|
|
for NAME in SGI_ACL \
|
|
SGI_ACL_F SGI_ACL_D \
|
|
SGI_ACL_FILE_FOO SGI_ACL_DEFAULT_FOO; do
|
|
touch $SCRATCH_MNT/${seq}.${NAME}
|
|
$ATTR_PROG -R -s $NAME -V "Wow, such $NAME" $SCRATCH_MNT/$seq.$NAME \
|
|
| _filter_scratch
|
|
done
|
|
|
|
# Older repair failed because it sees the above names as matching
|
|
# SGI_ACL_FILE / SGI_ACL_DEFAULT but w/o valid acls on them
|
|
|
|
# The test harness will catch this (false positive) corruption
|
|
|
|
# success, all done
|
|
status=0
|
|
exit
|