From: Andreas Dilger Date: Tue, 21 Sep 2021 22:58:30 +0000 (+0000) Subject: LU-15022 revert: "LU-14997 tests: Register stack_trap for sanity/104c" X-Git-Tag: 2.14.55~31 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=df2c0c19b1b8075a21b583b06aaf11f215f59c22 LU-15022 revert: "LU-14997 tests: Register stack_trap for sanity/104c" This reverts commit 59b32113313c3566e5f3797bca404a5b19d5e305 since it caused constant test failures for ZFS backends. Change-Id: I195cc483166294dbf97be50a9b747c8a2b534799 Test-Parameters: trivial fstype=zfs testlist=sanity env=ONLY=104,ONLY_REPEAT=20 Reviewed-on: https://review.whamcloud.com/45008 Tested-by: jenkins Tested-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 112b8bb..3a9f141 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -11304,17 +11304,6 @@ test_104b() { } run_test 104b "$RUNAS lfs check servers test ====================" -cleanup_104c() { - local facets=$1 - local param=$2 - local saved_blocks=$3 - - for facet in ${facets//,/ }; do - osd=$(do_facet $facet $LCTL get_param -n $param.mntdev) - do_facet $facet zfs set recordsize=$saved_blocks $osd - done -} - # # Verify $1 is within range of $2. # Success when $1 is within range. That is, when $1 is >= 2% of $2 and @@ -11322,8 +11311,8 @@ cleanup_104c() { # value_in_range() { # Strip all units (M, G, T) - actual=$(echo ${1/[a-zA-Z]*/}) - expect=$(echo ${2/[a-zA-Z]*/}) + actual=$(echo $1 | tr -d A-Z) + expect=$(echo $2 | tr -d A-Z) expect_lo=$(($expect * 98 / 100)) # 2% below expect_hi=$(($expect * 102 / 100)) # 2% above @@ -11372,11 +11361,6 @@ test_104c() { do_facet $facet zfs set recordsize=32768 $mdt done - # Restore OST recordize back to original - stack_trap "cleanup_104c $ofacets $ost_param $saved_ost_blocks" - # Restore MDT recordize back to original - stack_trap "cleanup_104c $mfacets $mdt_param $saved_mdt_blocks" - # Give new values chance to reflect change sleep 2 @@ -11404,6 +11388,18 @@ test_104c() { value_in_range ${df_after[3]%.*} ${df[3]%.*} || error "df avail: ${df_after[3]%.*} != ${df[3]%.*}" + # Restore MDT recordize back to original + for facet in ${mfacets//,/ }; do + mdt=$(do_facet $facet lctl get_param -n $mdt_param.mntdev) + do_facet $facet zfs set recordsize=$saved_mdt_blocks $mdt + done + + # Restore OST recordize back to original + for facet in ${ofacets//,/ }; do + ost=$(do_facet $facet lctl get_param -n $ost_param.mntdev) + do_facet $facet zfs set recordsize=$saved_ost_blocks $ost + done + return 0 } run_test 104c "Verify df vs lfs_df stays same after recordsize change"