On Fri, Nov 25, 2022 at 04:40:49PM +0800, Pingfan Liu wrote:
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 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/spec/kdumpctl_general_spec.sh b/spec/kdumpctl_general_spec.sh
index 5a3ce1c..00f76dc 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,11 @@ Describe 'kdumpctl'
The stderr should include 'Invalid kdump config option blabla'
End
+ Parameters:value aarch64 ppc64le s390x x86_64
+
It 'should be happy with the default kdump.conf'
- # shellcheck disable=SC2034
+ ./gen-kdump-conf.sh $1 > kdump.conf
Patched merged after quoting $1 to keep shellcheck happy, thanks!
Reviewed-by: Coiby Xu <coxu(a)redhat.com>
+ # shellcheck disable=SC2034
# override the KDUMP_CONFIG_FILE variable
KDUMP_CONFIG_FILE=./kdump.conf
When call parse_config
--
2.31.1
--
Best regards,
Coiby