From 994c19ed0bd38e65d94fc474a4378fca96f15603 Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Tue, 19 Dec 2023 03:24:07 -0500 Subject: [PATCH] LU-9457 test: improve sanity 253 Improve sanity test_253: set high watermark to 50M, and fill OST with fallocate. Lustre-change: https://review.whamcloud.com/53548 Lustre-commit: e934646f5ea87cd8a432db0e672c6ea48867ea47 Test-Parameters: trivial Test-Parameters: testlist=sanity env=EXCEPT=77c Test-Parameters: testlist=sanity env=EXCEPT=77c Test-Parameters: testlist=sanity env=EXCEPT=77c Test-Parameters: testlist=sanity env=EXCEPT=77c Test-Parameters: testlist=sanity env=EXCEPT=77c Signed-off-by: Lai Siyao Change-Id: I85139d7fc0697d08c21bdb19432b40c8dab82ee9 Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55276 Tested-by: jenkins Tested-by: Maloo --- lustre/tests/sanity.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index df18e54..b54f58d 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -22435,6 +22435,7 @@ test_253() { [ $PARALLEL == "yes" ] && skip "skip parallel run" remote_mds_nodsh && skip "remote MDS with nodsh" remote_mgs_nodsh && skip "remote MGS with nodsh" + check_set_fallocate_or_skip local ostidx=0 local rc=0 @@ -22459,9 +22460,17 @@ test_253() { dd if=/dev/zero of=$DIR/$tdir/$tfile.0 bs=1M count=10 - local wms=$(ost_watermarks_set_enospc $tfile $ostidx | - grep "watermarks") - stack_trap "ost_watermarks_clear_enospc $tfile $ostidx $wms" EXIT + local wms=$(ost_watermarks_get $ostidx) + + ost_watermarks_set $ostidx 60 50 + stack_trap "ost_watermarks_set $ostidx $wms" + + local free_kb=$($LFS df $MOUNT | awk "/$ost_name/ { print \$4 }") + local size=$((free_kb * 1024)) + + fallocate -l $size $DIR/$tdir/fill_ost$ostidx || + error "fallocate failed" + sleep_maxage local oa_status=$(do_facet $SINGLEMDS $LCTL get_param -n \ osp.$mdtosc_proc1.prealloc_status) @@ -22475,13 +22484,9 @@ test_253() { oflag=append || error "Append failed" rm -f $DIR/$tdir/$tfile.0 - - # For this test, we want to delete the files we created to go out of - # space but leave the watermark, so we remain nearly out of space - ost_watermarks_enospc_delete_files $tfile $ostidx + rm -f $DIR/$tdir/fill_ost$ostidx wait_delete_completed - sleep_maxage for i in $(seq 10 12); do -- 1.8.3.1