Whamcloud - gitweb
EX-8349 lipe: Fix problem with fallocate in test_306
authorVitaliy Kuznetsov <vkuznetsov@ddn.com>
Sat, 7 Oct 2023 21:30:00 +0000 (23:30 +0200)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 14 Oct 2023 10:51:20 +0000 (10:51 +0000)
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 <vkuznetsov@ddn.com>
Change-Id: I7d7e0c9b0e6517853bb3b77e8f938bbd877b3003
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52590
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity-lipe-scan3.sh

index 031710f..aa4e6dd 100644 (file)
@@ -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"