Skip to content

Commit 9b2d7d8

Browse files
committed
zram01.sh: Fix minimal size for XFS on kernel 5.19
mkfs.xfs for kernel 5.19 bumps minimum filesystems 300 MB. Due this we already updated minimal filesystem size for all_filesystems / $TST_ALL_FILESYSTEMS in 66e05c8. But zram01.sh does not use the API, thus update it now. Also require 1G of RAM for XFS (check originally added in f18c8fd for Btrfs on ppc64le due to larger page size, likely needed for also XFS). Reviewed-by: Cyril Hrubis <[email protected]> Signed-off-by: Petr Vorel <[email protected]>
1 parent bea34c4 commit 9b2d7d8

File tree

1 file changed

+12
-5
lines changed
  • testcases/kernel/device-drivers/zram

1 file changed

+12
-5
lines changed

testcases/kernel/device-drivers/zram/zram01.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ TST_TESTFUNC="do_test"
1111
TST_NEEDS_CMDS="awk bc dd"
1212
TST_SETUP="setup"
1313

14-
check_space_for_btrfs()
14+
check_space_for_fs()
1515
{
16+
local fs="$1"
1617
local ram_size
1718

1819
ram_size=$(awk '/MemTotal:/ {print $2}' /proc/meminfo)
1920
if [ "$ram_size" -lt 1048576 ]; then
20-
tst_res TINFO "not enough space for Btrfs"
21+
tst_res TINFO "not enough space for $fs"
2122
return 1
2223
fi
2324
return 0
@@ -41,9 +42,15 @@ initialize_vars()
4142
for fs in $(tst_supported_fs -s tmpfs); do
4243
size="26214400"
4344
limit="25M"
44-
if [ "$fs" = "btrfs" ]; then
45-
check_space_for_btrfs || continue
46-
size="402653184"
45+
46+
if [ "$fs" = "btrfs" -o "$fs" = "xfs" ]; then
47+
check_space_for_fs "$fs" || continue
48+
49+
if [ "$fs" = "btrfs" ]; then
50+
size="402653184"
51+
elif [ "$fs" = "xfs" ]; then
52+
size=314572800
53+
fi
4754
limit="$((size/1024/1024))M"
4855
fi
4956

0 commit comments

Comments
 (0)