From: David Disseldorp Date: Mon, 5 Feb 2007 02:52:17 +0000 (+0000) Subject: XFSQA 122 on machines with xfs_lazy_sb.patch have failed due to the addition of __be3... X-Git-Tag: v1.1.0~521 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dfd5bd939e92da72bb6f2adecb65a5f6de5d8b83;p=xfstests-dev.git 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 --- diff --git a/122 b/122 index 26d9d496..a6787bb1 100755 --- a/122 +++ b/122 @@ -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 ) = /; + print;' + else + perl -ne ' +s/sizeof\( xfs_agf_t \) = 64/sizeof( xfs_agf_t ) = /; + 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 diff --git a/122.out b/122.out index ccc9956d..5131f8a0 100644 --- a/122.out +++ b/122.out @@ -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 ) = sizeof( xfs_agfl_t ) = 4 sizeof( xfs_agi_t ) = 296 sizeof( xfs_alloc_rec_incore_t ) = 8