mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
XFSQA 122 on machines with xfs_lazy_sb.patch have failed due to the addition of __be32 agf_btreeblks to xfs_agf_t.
This change causes 122 detect whether the patch is installed by greping for lazy count in mkfs output, the xfs_agf_t size is then filtered based on the patch status. The original intention was to check /lib/modules/$(uname -r)/source/fs/xfs/xfs_ag.h for btreeblks and filter on this, however the kernel source is not a prereq for XFSQA. Merge of master-melb:xfs-cmds:28014a by kenmcd. pipe get_structs.c output through _type_size_filter to filter out known changes to xfs type sizes
This commit is contained in:
@@ -28,6 +28,21 @@ _supported_fs xfs
|
||||
_supported_os Linux
|
||||
_require_command /usr/bin/indent
|
||||
|
||||
# filter out known changes to xfs type sizes
|
||||
_type_size_filter()
|
||||
{
|
||||
# lazy SB adds __be32 agf_btreeblks - pv960372
|
||||
if [ "$($MKFS_XFS_PROG 2>&1 | grep -c lazy-count )" == "0" ]; then
|
||||
perl -ne '
|
||||
s/sizeof\( xfs_agf_t \) = 60/sizeof( xfs_agf_t ) = <SIZE>/;
|
||||
print;'
|
||||
else
|
||||
perl -ne '
|
||||
s/sizeof\( xfs_agf_t \) = 64/sizeof( xfs_agf_t ) = <SIZE>/;
|
||||
print;'
|
||||
fi
|
||||
}
|
||||
|
||||
cprog=$tmp.get_structs.c
|
||||
oprog=$tmp.get_structs
|
||||
|
||||
@@ -144,6 +159,6 @@ echo 'return 0; }' >>$cprog
|
||||
|
||||
# create and run program
|
||||
cc -o $oprog $cprog
|
||||
eval $oprog | LC_COLLATE=POSIX sort
|
||||
eval $oprog | LC_COLLATE=POSIX sort | _type_size_filter
|
||||
|
||||
status=0
|
||||
|
||||
@@ -44,7 +44,7 @@ offsetof(xfs_sb_t, sb_uquotino ) = 160
|
||||
offsetof(xfs_sb_t, sb_uuid ) = 32
|
||||
offsetof(xfs_sb_t, sb_versionnum ) = 100
|
||||
offsetof(xfs_sb_t, sb_width ) = 188
|
||||
sizeof( xfs_agf_t ) = 60
|
||||
sizeof( xfs_agf_t ) = <SIZE>
|
||||
sizeof( xfs_agfl_t ) = 4
|
||||
sizeof( xfs_agi_t ) = 296
|
||||
sizeof( xfs_alloc_rec_incore_t ) = 8
|
||||
|
||||
Reference in New Issue
Block a user