Now, kdump.conf is generated by gen-kdump-conf.sh, hence adapting
check_config to run that script firstly then check the generated file.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
spec/kdumpctl_general_spec.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/spec/kdumpctl_general_spec.sh b/spec/kdumpctl_general_spec.sh
index 5a3ce1c..44294a5 100644
--- a/spec/kdumpctl_general_spec.sh
+++ b/spec/kdumpctl_general_spec.sh
@@ -178,6 +178,7 @@ Describe 'kdumpctl'
bad_kdump_conf=$(mktemp -t bad_kdump_conf.XXXXXXXXXX)
cleanup() {
rm -f "$bad_kdump_conf"
+ rm -f kdump.conf
}
AfterAll 'cleanup'
@@ -189,8 +190,16 @@ Describe 'kdumpctl'
The stderr should include 'Invalid kdump config option blabla'
End
+ Parameters
+ aarch64
+ ppc64le
+ s390x
+ x86_64
+ End
+
It 'should be happy with the default kdump.conf'
# shellcheck disable=SC2034
+ ./gen-kdump-conf.sh x86_64 > kdump.conf
# override the KDUMP_CONFIG_FILE variable
KDUMP_CONFIG_FILE=./kdump.conf
When call parse_config
--
2.31.1