mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
2529c9486a
Fully scripted conversion, see script in initial SPDX license commit message. tests/xfs/044 was hand massaged to remove duplicate copyright and divider lines before running the script. Signed-off-by: Dave Chinner <dchinner@redhat.com>
51 lines
1.0 KiB
Bash
Executable File
51 lines
1.0 KiB
Bash
Executable File
#! /bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (c) 2017 Oracle, Inc. All Rights Reserved.
|
|
#
|
|
# FS QA Test No. 383
|
|
#
|
|
# Populate a XFS filesystem and fuzz every symlink remote block field.
|
|
# Use xfs_scrub to fix the corruption.
|
|
#
|
|
seq=`basename $0`
|
|
seqres=$RESULT_DIR/$seq
|
|
echo "QA output created by $seq"
|
|
|
|
here=`pwd`
|
|
tmp=/tmp/$$
|
|
status=1 # failure is the default!
|
|
trap "_cleanup; exit \$status" 0 1 2 3 7 15
|
|
|
|
_cleanup()
|
|
{
|
|
cd /
|
|
rm -rf $tmp.*
|
|
}
|
|
|
|
# get standard environment, filters and checks
|
|
. ./common/rc
|
|
. ./common/filter
|
|
. ./common/populate
|
|
. ./common/fuzzy
|
|
|
|
# real QA test starts here
|
|
_supported_os Linux
|
|
_supported_fs xfs
|
|
_require_scratch_xfs_fuzz_fields
|
|
|
|
echo "Format and populate"
|
|
_scratch_populate_cached nofill > $seqres.full 2>&1
|
|
|
|
echo "Find symlink remote block"
|
|
_scratch_mount
|
|
inum=$(stat -c '%i' $SCRATCH_MNT/S_IFLNK.FMT_EXTENTS)
|
|
_scratch_unmount
|
|
|
|
echo "Fuzz symlink remote block"
|
|
_scratch_xfs_fuzz_metadata '' 'online' "inode ${inum}" 'dblock 0' >> $seqres.full
|
|
echo "Done fuzzing symlink remote block"
|
|
|
|
# success, all done
|
|
status=0
|
|
exit
|