Whamcloud - gitweb
LU-9024 tests: improve conf-sanity test_63 output 80/25880/2
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 8 Mar 2017 04:26:08 +0000 (21:26 -0700)
committerAndreas Dilger <andreas.dilger@intel.com>
Fri, 10 Mar 2017 04:22:15 +0000 (04:22 +0000)
Improve the output of conf-sanity.sh test_63 to fix SLES11
test failures caused by different /proc/slabinfo results.
Replace "ldisk" with "ldiskfs".

Load ldiskfs module on the MDS if test is run with ONLY=63.
Compute number of slab entries per page even if the slab
is using multiple pages to improve object efficiency.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I7424c797a5955c06d2107c2047d3e2b64749fa56
Reviewed-on: https://review.whamcloud.com/25880
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
lustre/tests/conf-sanity.sh

index 7a031a2..5ee57af 100755 (executable)
@@ -4493,27 +4493,27 @@ test_63() {
                return
        fi
 
-       local inode_slab=$(do_facet $SINGLEMDS \
-               "awk '/ldiskfs_inode_cache/ { print \\\$5 }' /proc/slabinfo")
+       do_rpc_nodes $(facet_active_host $SINGLEMDS) load_module ldiskfs
+       local inode_slab=$(do_facet $SINGLEMDS "cat /proc/slabinfo" |
+                          awk '/ldiskfs_inode_cache/ { print $5 / $6 }')
        if [ -z "$inode_slab" ]; then
                skip "ldiskfs module has not been loaded"
                return
        fi
 
-       echo "$inode_slab ldisk inodes per page"
-       if [ "$inode_slab" -ge "3" ] ; then
-               # If kmalloc-128 is also 1 per page - this is a debug kernel
-               # and so this is not an error.
-               local kmalloc128=$(do_facet $SINGLEMDS \
-                       "awk '/^(kmalloc|size)-128 / { print \\\$5 }' /proc/slabinfo")
-               # 32 128-byte chunks in 4k
-               [ "$kmalloc128" -eq "32" ] ||
-                       error "ldisk inode size is too big, $inode_slab objs per page"
-       fi
+       echo "$inode_slab ldiskfs inodes per page"
+       [ "${inode_slab%.*}" -ge "3" ] && return 0
 
-       return
+       # If kmalloc-128 is also 1 per page - this is a debug kernel
+       # and so this is not an error.
+       local kmalloc128=$(do_facet $SINGLEMDS "cat /proc/slabinfo" |
+                          awk '/^(kmalloc|size)-128 / { print $5 / $6 }')
+       # 32 128-byte chunks in 4k
+       [ "${kmalloc128%.*}" -lt "32" ] ||
+               error "ldiskfs inode too big, only $inode_slab objs/page, " \
+                     "kmalloc128 = $kmalloc128 objs/page"
 }
-run_test 63 "Verify each page can at least hold 3 ldisk inodes"
+run_test 63 "Verify each page can at least hold 3 ldiskfs inodes"
 
 test_64() {
        start_mds || error "unable to start MDS"