]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
XFSQA 122 on machines with xfs_lazy_sb.patch have failed due to the addition of __be3...
authorDavid Disseldorp <ddiss@sgi.com>
Mon, 5 Feb 2007 02:52:17 +0000 (02:52 +0000)
committerDavid Disseldorp <ddiss@sgi.com>
Mon, 5 Feb 2007 02:52:17 +0000 (02:52 +0000)
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

122
122.out

diff --git a/122 b/122
index 26d9d496dd238db93e0b35843bb74f2fc65beb9f..a6787bb189e5401486a4b3d8e74471a22014e5f8 100755 (executable)
--- 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 ) = <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
diff --git a/122.out b/122.out
index ccc9956dcf80959cc4f2f6080a0a5dda5af98a26..5131f8a0d12dfc2b76f721b2cb633d883498c784 100644 (file)
--- 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 ) = <SIZE>
 sizeof( xfs_agfl_t ) = 4
 sizeof( xfs_agi_t ) = 296
 sizeof( xfs_alloc_rec_incore_t ) = 8