mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Make sure the repair tests dirty the filesystem before corrupting it.
Merge of master-melb:xfs-cmds:28770a by kenmcd. Make sure the repair tests dirty the filesystem before corrupting it.
This commit is contained in:
@@ -262,6 +262,10 @@ Wrote X.XXKb (value 0xffffffff)
|
||||
Phase 1 - find and verify superblock...
|
||||
Phase 2 - zero log...
|
||||
- scan filesystem freespace and inode maps...
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
- found root inode chunk
|
||||
Phase 3 - for each AG...
|
||||
- scan and clear agi unlinked lists...
|
||||
|
||||
@@ -270,6 +270,10 @@ Phase 1 - find and verify superblock...
|
||||
Phase 2 - using <TYPEOF> log
|
||||
- zero log...
|
||||
- scan filesystem freespace and inode maps...
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
- found root inode chunk
|
||||
Phase 3 - for each AG...
|
||||
- scan and clear agi unlinked lists...
|
||||
|
||||
@@ -270,6 +270,10 @@ Phase 1 - find and verify superblock...
|
||||
Phase 2 - using <TYPEOF> log
|
||||
- zero log...
|
||||
- scan filesystem freespace and inode maps...
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
bad agbno AGBNO in agfl, agno 0
|
||||
- found root inode chunk
|
||||
Phase 3 - for each AG...
|
||||
- scan and clear agi unlinked lists...
|
||||
|
||||
@@ -72,8 +72,18 @@ _check_repair()
|
||||
{
|
||||
value=$1
|
||||
structure="$2"
|
||||
|
||||
#ensure the filesystem has been dirtied since last repair
|
||||
_scratch_mount
|
||||
POSIXLY_CORRECT=yes \
|
||||
dd if=/bin/sh of=$SCRATCH_MNT/sh 2>&1 |_filter_dd
|
||||
sync
|
||||
rm -f $SCRATCH_MNT/sh
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
_zero_position $value "$structure"
|
||||
_scratch_xfs_repair 2>&1 | _filter_repair
|
||||
|
||||
# some basic sanity checks...
|
||||
_check_scratch_fs
|
||||
_scratch_mount #mount
|
||||
|
||||
Reference in New Issue
Block a user