On Mon, May 22, 2023 at 10:59 PM Philipp Rudo <prudo(a)redhat.com> wrote:
Hi Pingfan,
personally I would squash this patch with the previous one. In my
opinion functions and test cases for them belong together.
On Thu, 18 May 2023 13:26:41 +0800
Pingfan Liu <piliu(a)redhat.com> wrote:
> 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"
For a complete test you should also add cases where the size is
not in M, but K and G (please also see my comment for patch 1).
As well as one test with ',low'.
OK, I will supplement them.
Thanks,
Pingfan
Thanks
Philipp
> + 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