mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: fix $XFS_DB_PROG usage
xfs_db requires us to pass in the log device, if any; this can be accomplished via _scratch_xfs_db_options (if we're operating on the scratch device, anyway). However, many of the tests/xfs/ scripts pass only $SCRATCH_DEV directly, so they'll fail if we test with an external log. Fix that by adding a new _scratch_xfs_db helper. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
fff869cb9c
commit
c08ebd092d
+8
-8
@@ -44,11 +44,11 @@ _do_bit_test()
|
||||
bits="$2"
|
||||
|
||||
echo "testing $field with $bits bits"
|
||||
$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write $field 0" $SCRATCH_DEV
|
||||
_scratch_xfs_db -x -c "inode $FILE_INO" -c "write $field 0"
|
||||
num=1
|
||||
for n in `seq 0 1 $bits`; do
|
||||
$XFS_DB_PROG -x -c "inode $FILE_INO" \
|
||||
-c "write $field $num" $SCRATCH_DEV
|
||||
_scratch_xfs_db -x -c "inode $FILE_INO" \
|
||||
-c "write $field $num"
|
||||
let num=$num*2
|
||||
done
|
||||
echo
|
||||
@@ -89,10 +89,10 @@ _do_bit_test "u.bmx[0].startoff" $BMBT_STARTOFF_BITLEN
|
||||
_do_bit_test "u.bmx[0].startblock" $BMBT_STARTBLOCK_BITLEN
|
||||
_do_bit_test "u.bmx[0].blockcount" $BMBT_BLOCKCOUNT_BITLEN
|
||||
# test setting the 32 bit generation number
|
||||
$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write core.gen 0x5a" $SCRATCH_DEV
|
||||
$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write core.gen 0xa5" $SCRATCH_DEV
|
||||
$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write core.gen 0" $SCRATCH_DEV
|
||||
$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write core.gen #5a5a" $SCRATCH_DEV
|
||||
$XFS_DB_PROG -x -c "inode $FILE_INO" -c "write core.gen #a5a5" $SCRATCH_DEV
|
||||
_scratch_xfs_db -x -c "inode $FILE_INO" -c "write core.gen 0x5a"
|
||||
_scratch_xfs_db -x -c "inode $FILE_INO" -c "write core.gen 0xa5"
|
||||
_scratch_xfs_db -x -c "inode $FILE_INO" -c "write core.gen 0"
|
||||
_scratch_xfs_db -x -c "inode $FILE_INO" -c "write core.gen #5a5a"
|
||||
_scratch_xfs_db -x -c "inode $FILE_INO" -c "write core.gen #a5a5"
|
||||
status=0
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user