Whamcloud - gitweb
LU-16042 tests: can not get cache size on Arm64 79/51179/4
authorKevin Zhao <kevin.zhao@linaro.org>
Mon, 25 Jul 2022 07:53:44 +0000 (15:53 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 19 Oct 2023 13:51:24 +0000 (13:51 +0000)
This fix the test fail on Arm64, the cache size can not be
display on /proc/cpuinfo. And even in the VM and somee
older Arm64 CPU, we can not get the cachesize. So it's
better to fallback to a pre-set value here if we don't get
the cache size.

Lustre-change: https://review.whamcloud.com/48030
Lustre-commit: f276f1cb0859e8718448e69bd99ee305f5e62d42

Test-Parameters: trivial
Test-Parameters: clientarch=aarch64 clientdistro=el8.7 \
    testlist=sanity env=ONLY=155

Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
Change-Id: I17ce1d8accc69d1489db2071a2741b3927fff302
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51179
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 93f8c3b..7b4d43e 100755 (executable)
@@ -15602,6 +15602,12 @@ test_155_big_load() {
        free_min_max
        local cache_size=$(do_facet ost$((MAXI+1)) \
                "awk '/cache/ {sum+=\\\$4} END {print sum}' /proc/cpuinfo")
+
+       # LU-16042: can not get the cache size on Arm64 VM here, fallback to a
+       # pre-set value
+       if [ -z "$cache_size" ]; then
+               cache_size=256
+       fi
        local large_file_size=$((cache_size * 2))
 
        echo "OSS cache size: $cache_size KB"