From 0552639ff07fff39c9a0ff49efec056331d9a029 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Thu, 19 Jan 2023 08:11:43 +0530 Subject: [PATCH] LU-16492 tests: sanity/398b variable used without assignment This patch initilizes 'before' variable with UNIX timestamp. Variable 'before' was used without assigning any value. Test-Parameters: trivial testlist=sanity env=ONLY=398b Fixes: b4880f37582a ("LU-15483 tests: Improve test 398b") Signed-off-by: Arshad Hussain Change-Id: Iba9e361735272d9c640a115f520ee7c60ac41239 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49687 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 439d2db..9f7134e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -25076,26 +25076,29 @@ test_398a() { # LU-4198 run_test 398a "direct IO should cancel lock otherwise lockless" test_398b() { # LU-4198 + local before=$(date +%s) + local njobs=4 + local size=48 + which fio || skip_env "no fio installed" $LFS setstripe -c -1 -S 1M $DIR/$tfile - - local size=48 dd if=/dev/zero of=$DIR/$tfile bs=1M count=$size - local njobs=4 # Single page, multiple pages, stripe size, 4*stripe size for bsize in $(( $PAGE_SIZE )) $(( 4*$PAGE_SIZE )) 1048576 4194304; do echo "mix direct rw ${bsize} by fio with $njobs jobs..." fio --name=rand-rw --rw=randrw --bs=$bsize --direct=1 \ --numjobs=$njobs --fallocate=none \ - --iodepth=16 --allow_file_create=0 --size=$((size/njobs))M \ + --iodepth=16 --allow_file_create=0 \ + --size=$((size/njobs))M \ --filename=$DIR/$tfile & bg_pid=$! echo "mix buffer rw ${bsize} by fio with $njobs jobs..." fio --name=rand-rw --rw=randrw --bs=$bsize \ --numjobs=$njobs --fallocate=none \ - --iodepth=16 --allow_file_create=0 --size=$((size/njobs))M \ + --iodepth=16 --allow_file_create=0 \ + --size=$((size/njobs))M \ --filename=$DIR/$tfile || true wait $bg_pid done -- 1.8.3.1