Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
spec/kdump-lib_spec.sh | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/spec/kdump-lib_spec.sh b/spec/kdump-lib_spec.sh
index 3d10006..d477b2b 100644
--- a/spec/kdump-lib_spec.sh
+++ b/spec/kdump-lib_spec.sh
@@ -48,6 +48,23 @@ Describe 'kdump-lib'
End
End
+ Describe "_crashkernel_add()"
+ Context "when the input parameter is
'1G-4G:256M,4G-64G:320M,64G-:576M'"
+ delta=100
+ Parameters
+ "1G-4G:256M,4G-64G:320M,64G-:576M"
"1G-4G:356M,4G-64G:420M,64G-:676M"
+ "1G-4G:256M,4G-64G:320M,64G-:576M@4G"
"1G-4G:356M,4G-64G:420M,64G-:676M@4G"
+ "300M,high" "400M,high"
+ "500M@1G" "600M@1G"
+ End
+ It "should add delta to the values after ':'"
+
+ When call _crashkernel_add "$1" "$delta"
+ The output should equal "$2"
+ End
+ End
+ End
+
Describe 'prepare_cmdline()'
get_bootcpu_apicid() {
echo 1
--
2.31.1