From f824ccc8f1db3246dd1d64ba9ae4e52e765f0fa8 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Mon, 7 Oct 2024 07:48:28 -0400 Subject: [PATCH] LU-18337 tests: Fix racer division by 0 error message 'file' under file_create.sh is set as /mnt/lustre/racer/M/N Currently M/N is used directly as mathematical operation to determine whether "--block" (default) is to be passed as option to 'migrate'. This was causing the divide by zero error when N is 0. This patch changes 'file' to use only the last part (ie N) instead of M/N when doing the mod by 8 operation. Test-Parameters: trivial Signed-off-by: Arshad Hussain Change-Id: I590250afb69607d906cf3f8422ca4bc97600eabb Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56598 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Deiter Reviewed-by: Oleg Drokin --- lustre/tests/racer/file_create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/tests/racer/file_create.sh b/lustre/tests/racer/file_create.sh index 9a8d857..cf89ee9 100755 --- a/lustre/tests/racer/file_create.sh +++ b/lustre/tests/racer/file_create.sh @@ -57,7 +57,7 @@ while /bin/true; do opt=${opt/create/extend} else opt=${opt/setstripe/migrate} - (( file % 8 == 0 )) && opt+=" --block" + (( ${file/*\//} % 8 == 0 )) && opt+=" --block" fi fi $LFS $opt $DIR/$file 2> /dev/null || true -- 1.8.3.1