From: Alison Schofield <[email protected]>

The check for 1GB of available space in a DAX region always returned
true due to being wrapped inside a [[ ... ]] test, even when space
wasn't available. That caused set size to fail.

Update to use bash arithmetic evaluation instead.

This issue likely went unnoticed because users allocated >= 1GB of
efi_fake_mem. This fix is part of the transition to use CXL regions
in this test as efi_fake_mem support is being removed from the kernel.

Signed-off-by: Alison Schofield <[email protected]>
---
 test/daxctl-create.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/daxctl-create.sh b/test/daxctl-create.sh
index c093cb9e306a..d968e7bedd82 100755
--- a/test/daxctl-create.sh
+++ b/test/daxctl-create.sh
@@ -363,7 +363,7 @@ daxctl_test6()
 
        # Use 2M by default or 1G if supported
        align=2097152
-       if [[ $((available >= 1073741824 )) ]]; then
+       if (( available >= 1073741824 )); then
                align=1073741824
                size=$align
        fi
-- 
2.37.3


Reply via email to