From 2d7c3dd2be6b36f580daf55cfd488d68b22d8c3f Mon Sep 17 00:00:00 2001 From: Vitaliy Kuznetsov Date: Sat, 7 Oct 2023 23:30:00 +0200 Subject: [PATCH] EX-8349 lipe: Fix problem with fallocate in test_306 This patch removes the check every time a file is created, and adds a general check for the presence of created files. Test-Parameters: trivial testlist=sanity-lipe-scan3 Signed-off-by: Vitaliy Kuznetsov Change-Id: I7d7e0c9b0e6517853bb3b77e8f938bbd877b3003 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52590 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/tests/sanity-lipe-scan3.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/tests/sanity-lipe-scan3.sh b/lustre/tests/sanity-lipe-scan3.sh index 031710f..aa4e6dd 100644 --- a/lustre/tests/sanity-lipe-scan3.sh +++ b/lustre/tests/sanity-lipe-scan3.sh @@ -1083,7 +1083,6 @@ create_files() { # Create many small files of different sizes for ((i = 0; i < $num_files; i++)); do fallocate -l $((RANDOM % 125 + 1))Kb $file"_"$i - [[ $? -ne 0 ]] && error "fallocate ended with an error" done sync } @@ -1109,6 +1108,8 @@ test_306() { count_files_ls=$(ls -1 "$MOUNT" | grep -vE '^total' | wc -l) total_size_ls=$(ls -l "$MOUNT" | grep '^total' | awk '{print $2}') + (( count_files_ls > 2 )) || error "fallocate ended with an error" + out=$(lipe_scan3_facet "$facet" --collect-fsize-stats="$report_path") [[ $? -ne 0 ]] && error "lipe_scan3 collect-fsize-stats failed" -- 1.8.3.1