From f3b3c76ff59af1c9340e62a71d66609af6b3ae62 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Fri, 23 Jun 2023 13:49:26 +0900 Subject: [PATCH] lkl: increase the memory size for KASAN test Our kasan tests need more memory otherwise the kernel reports OOM (out-of-memory) error during the test. This commit increase the size of memory for the test. Reported-by: Eugene Rodionov Reported-by: Octavian Purdila Signed-off-by: Hajime Tazaki --- tools/lkl/tests/boot.c | 2 +- tools/lkl/tests/disk-vfio-pci.c | 2 +- tools/lkl/tests/disk.c | 2 +- tools/lkl/tests/net-test.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/lkl/tests/boot.c b/tools/lkl/tests/boot.c index b69c4d6e1a5f0a..d8601306ac342e 100644 --- a/tools/lkl/tests/boot.c +++ b/tools/lkl/tests/boot.c @@ -528,7 +528,7 @@ static int lkl_test_kasan(void) #define KASAN_CMD_LINE #endif -#define CMD_LINE "mem=16M loglevel=8 " KASAN_CMD_LINE +#define CMD_LINE "mem=32M loglevel=8 " KASAN_CMD_LINE static int lkl_test_start_kernel(void) { diff --git a/tools/lkl/tests/disk-vfio-pci.c b/tools/lkl/tests/disk-vfio-pci.c index 7fd95a4543b242..1b342e1ebb4ddb 100644 --- a/tools/lkl/tests/disk-vfio-pci.c +++ b/tools/lkl/tests/disk-vfio-pci.c @@ -105,7 +105,7 @@ int main(int argc, const char **argv) return -1; snprintf(bootparams, sizeof(bootparams), - "mem=16M loglevel=8 lkl_pci=vfio%s", cla.pciname); + "mem=32M loglevel=8 lkl_pci=vfio%s", cla.pciname); lkl_host_ops.print = lkl_test_log; diff --git a/tools/lkl/tests/disk.c b/tools/lkl/tests/disk.c index daec52051c9720..ed99d698da05ac 100644 --- a/tools/lkl/tests/disk.c +++ b/tools/lkl/tests/disk.c @@ -158,7 +158,7 @@ static int lkl_test_readdir(void) LKL_TEST_CALL(closedir, lkl_closedir, 0, dir); LKL_TEST_CALL(chdir_mnt_point, lkl_sys_chdir, 0, mnt_point); -LKL_TEST_CALL(start_kernel, lkl_start_kernel, 0, "mem=16M loglevel=8"); +LKL_TEST_CALL(start_kernel, lkl_start_kernel, 0, "mem=32M loglevel=8"); LKL_TEST_CALL(stop_kernel, lkl_sys_halt, 0); struct lkl_test tests[] = { diff --git a/tools/lkl/tests/net-test.c b/tools/lkl/tests/net-test.c index 9c28408d842460..2bb14d33771bcf 100644 --- a/tools/lkl/tests/net-test.c +++ b/tools/lkl/tests/net-test.c @@ -246,7 +246,7 @@ static int lkl_test_nd_remove(void) } LKL_TEST_CALL(start_kernel, lkl_start_kernel, 0, - "mem=16M loglevel=8 %s", cla.dhcp ? "ip=dhcp" : ""); + "mem=32M loglevel=8 %s", cla.dhcp ? "ip=dhcp" : ""); LKL_TEST_CALL(stop_kernel, lkl_sys_halt, 0); static int nd_ifindex;