Previously, the kernel parameter crashkernel will be set up when
kexec-tools is installed. But now it will happen only when kdump.service
is enabled first. When kexec-tools is installed, the kdump.service will
be enabled according to the systemd policy file and later the kernel
parameter crashkernel will be added only if kdump.service is enabled.
Fedora disables kdump.service in the systemd policy. So enable
kdump.service in the systemd preset policy manually in the test script.
Fixes: 0ffce0ef ("Only try to reset crashkernel when kdump.service is enabled")
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
tests/scripts/build-scripts/test-base-image.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/scripts/build-scripts/test-base-image.sh
b/tests/scripts/build-scripts/test-base-image.sh
index afe1a974..866e5646 100755
--- a/tests/scripts/build-scripts/test-base-image.sh
+++ b/tests/scripts/build-scripts/test-base-image.sh
@@ -16,6 +16,9 @@ img_inst $TESTDIR/scripts/kexec-kdump-test/test.sh
/kexec-kdump-test/test.sh
img_inst $TESTDIR/scripts/kexec-kdump-test/kexec-kdump-test.service
/etc/systemd/system/kexec-kdump-test.service
img_run_cmd "systemctl enable kexec-kdump-test.service"
+# enable kdump.service in the systemd preset policy so the kernel parameter crashkernel
+# will be added automatically when kexec-tools is installed
+img_run_cmd "echo 'enable kdump.service' >
/usr/lib/systemd/system-preset/95-kdump.preset"
img_inst_pkg $TEST_RPMS
# Test script should start kdump manually to save time
img_run_cmd "systemctl disable kdump.service"
--
2.41.0