unit tests: adapt check_config to gen-kdump-conf.sh
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@redhat.com> Reviewed-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
parent
787b041aab
commit
0414386cb8
@ -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
|
||||
# shellcheck disable=SC2034
|
||||
# override the KDUMP_CONFIG_FILE variable
|
||||
KDUMP_CONFIG_FILE=./kdump.conf
|
||||
When call parse_config
|
||||
|
Loading…
Reference in New Issue
Block a user