On Fri, Nov 25, 2022 at 5:40 PM Coiby Xu <coxu(a)redhat.com> wrote:
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!
Thanks for fixing this issue.
I ran the test on F37, but did not see such an issue, so send out the patch
The result looks like:
[root@ibm-p9wr-02 kexec-tools]# shellspec spec/kdumpctl_general_spec.sh
Running: /bin/sh [bash 5.2.9(1)-release]
.................................
Finished in 1.00 seconds (user 1.05 seconds, sys 0.06 seconds)
33 examples, 0 failures
Thanks,
Pingfan
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