From 17c26558d9b45d31755b9ed7f29a7ad291904740 Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Thu, 15 Jun 2023 13:17:21 +0800 Subject: [PATCH] tests: use the default crashkernel value And with commit t5b31b099 ("Simplify the management of the kernel parameter crashkernel"), the default crashkernel value will be used for the kernel. But the test VM has a RAM of 768M thus this is no actual reserved memory for kdump. Even With the old crashkernel=224M, network dumping tests like nfs-kdump will fail out of memory when running against current Fedora Cloud images (>=F37). This patch address the above two issues by 1. increasing the RAM of test VM to 1G 2. installing the kernel-modules which contains the squashfs module in order to use the dracut squash module for kdump initrd. Thanks to the dracut squash module, now even crashkernel=192M (the default crashkernel value for RAM between 1G and 4G) works for network dumping. Another benefit brought by this change is the default crashkernel value can be tested as well. Signed-off-by: Coiby Xu Reviewed-by: Philipp Rudo --- tests/scripts/build-scripts/base-image.sh | 3 +-- tests/scripts/test-lib.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/scripts/build-scripts/base-image.sh b/tests/scripts/build-scripts/base-image.sh index 62624e4..1d64cfb 100755 --- a/tests/scripts/build-scripts/base-image.sh +++ b/tests/scripts/build-scripts/base-image.sh @@ -3,8 +3,7 @@ img_inst_pkg grubby\ dnsmasq\ openssh openssh-server\ - dracut-network dracut-squash squashfs-tools ethtool snappy + dracut-network dracut-squash squashfs-tools ethtool snappy kernel-modules img_run_cmd "grubby --args systemd.journald.forward_to_console=1 systemd.log_target=console --update-kernel ALL" img_run_cmd "grubby --args selinux=0 --update-kernel ALL" -img_run_cmd "grubby --args crashkernel=224M --update-kernel ALL" diff --git a/tests/scripts/test-lib.sh b/tests/scripts/test-lib.sh index 8b24b2a..57b05d3 100644 --- a/tests/scripts/test-lib.sh +++ b/tests/scripts/test-lib.sh @@ -8,7 +8,7 @@ DEFAULT_QEMU_CMD="-nodefaults \ -nographic \ -smp 2 \ --m 768M \ +-m 1G \ -monitor none" _YELLOW='\033[1;33m'