mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fix up xfstests for realtime fs
Filter out inode numbers; these change with realtime
This commit is contained in:
+300
-300
File diff suppressed because it is too large
Load Diff
+300
-300
File diff suppressed because it is too large
Load Diff
+301
-301
File diff suppressed because it is too large
Load Diff
+200
-200
File diff suppressed because it is too large
Load Diff
@@ -104,7 +104,7 @@ _grow_loop()
|
||||
|
||||
echo "*** unmount and check"
|
||||
umount $LOOP_MNT
|
||||
_check_xfs_filesystem $LOOP_DEV
|
||||
_check_xfs_filesystem $LOOP_DEV none none
|
||||
rm -f $LOOP_DEV
|
||||
}
|
||||
|
||||
|
||||
+204
-204
File diff suppressed because it is too large
Load Diff
+300
-300
File diff suppressed because it is too large
Load Diff
+300
-300
File diff suppressed because it is too large
Load Diff
+301
-301
File diff suppressed because it is too large
Load Diff
+200
-200
File diff suppressed because it is too large
Load Diff
@@ -52,22 +52,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
. ./common.log
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_do_logprint()
|
||||
{
|
||||
xfs_logprint -t $SCRATCH_DEV | tee -a $seq.full >$tmp.logprint
|
||||
if grep -q "<DIRTY>" $tmp.logprint; then
|
||||
echo "dirty log"
|
||||
fi
|
||||
if grep -q "<CLEAN>" $tmp.logprint; then
|
||||
echo "clean log"
|
||||
fi
|
||||
}
|
||||
|
||||
rm -f $seq.full
|
||||
rm -f $tmp.log
|
||||
|
||||
@@ -91,7 +81,7 @@ echo "unmount"
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
echo "logprint after going down..."
|
||||
_do_logprint
|
||||
_print_logstate
|
||||
|
||||
# curious if FS consistent at start
|
||||
if false; then
|
||||
@@ -111,7 +101,7 @@ echo "unmount"
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
echo "logprint after mount and replay..."
|
||||
_do_logprint
|
||||
_print_logstate
|
||||
|
||||
if _check_scratch_fs; then
|
||||
echo "filesystem is checked ok"
|
||||
|
||||
@@ -169,6 +169,10 @@ _filter_logprint()
|
||||
/^[ ]*$/d;
|
||||
s/ */ /g;
|
||||
s/ $//;
|
||||
s/newino: 0x[0-9a-f]*$/newino: <INO>/g
|
||||
s/newino:0x[0-9a-f]*$/newino:<INO>/g
|
||||
s/ino: 0x[0-9a-f]* flags:/ino: <INO> flags:/g
|
||||
s/ino:0x[0-9a-f]* flags:/ino:<INO> flags:/g
|
||||
'|\
|
||||
awk '
|
||||
# collapse BUF DATA group into 1 line
|
||||
|
||||
@@ -214,6 +214,8 @@ _scratch_xfs_repair()
|
||||
SCRATCH_OPTIONS=""
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
|
||||
SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
|
||||
SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -r$SCRATCH_RTDEV"
|
||||
[ "$USE_BIG_LOOPFS" = yes ] && SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
|
||||
$XFS_REPAIR_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
|
||||
}
|
||||
@@ -648,20 +650,21 @@ USE_REMOUNT=0
|
||||
|
||||
_check_xfs_filesystem()
|
||||
{
|
||||
if [ $# -ne 1 -a $# -ne 2 -a $# -ne 3 ]; then
|
||||
echo "Usage: _check_fs device [logdevice [rtdevice]]" 1>&2
|
||||
if [ $# -ne 3 ]
|
||||
then
|
||||
echo "Usage: _check_fs device <logdev>|none <rtdev>|none" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
device=$1
|
||||
if [ $# -eq 2 -a "$2" != "" ]; then
|
||||
if [ "$2" != "none" ]; then
|
||||
extra_log_options="-l$2"
|
||||
extra_mount_options="-ologdev=$2"
|
||||
fi
|
||||
if [ $# -eq 3 -a "$3" != "" ]; then
|
||||
|
||||
if [ "$3" != "none" ]; then
|
||||
extra_rt_options="-r$3"
|
||||
extra_log_options="-l$2"
|
||||
extra_mount_options="-ologdev=$2 -ortdev=$3"
|
||||
extra_mount_options=$extra_mount_options" -ortdev=$3"
|
||||
fi
|
||||
|
||||
[ "$FSTYP" != xfs ] && return 0
|
||||
@@ -781,10 +784,11 @@ _check_udf_filesystem()
|
||||
|
||||
_check_test_fs()
|
||||
{
|
||||
TEST_LOG=""
|
||||
TEST_LOG="none"
|
||||
TEST_RT="none"
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
|
||||
TEST_LOG="$TEST_LOGDEV"
|
||||
TEST_RT=""
|
||||
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
|
||||
TEST_RT="$TEST_RTDEV"
|
||||
|
||||
@@ -795,10 +799,11 @@ _check_scratch_fs()
|
||||
{
|
||||
case $FSTYP in
|
||||
xfs)
|
||||
SCRATCH_LOG=""
|
||||
SCRATCH_LOG="none"
|
||||
SCRATCH_RT="none"
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
|
||||
SCRATCH_LOG="$SCRATCH_LOGDEV"
|
||||
SCRATCH_RT=""
|
||||
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
|
||||
SCRATCH_RT="$SCRATCH_RTDEV"
|
||||
|
||||
|
||||
@@ -79,6 +79,8 @@ s/(disconnected dir inode) (\d+)/\1 INO/;
|
||||
# for log
|
||||
s/internal log/<TYPEOF> log/g;
|
||||
s/external log on \S+/<TYPEOF> log/g;
|
||||
# realtime subvol - remove this whole line if it appears
|
||||
s/ - generate realtime summary info and bitmap...\n//g;
|
||||
print;'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user