Re: [kvm-unit-tests PATCH 2/6] s390x: uv-host: Add uninitialized UV tests

Nico Boehr
2022-05-16T08:37:57Z

On Fri, 2022-05-13 at 09:50 +0000, Janosch Frank wrote:
> Let's also test for rc 0x3
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
if you fix the nit below.

> ---
>  s390x/uv-host.c | 78
> +++++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 76 insertions(+), 2 deletions(-)
>
> diff --git a/s390x/uv-host.c b/s390x/uv-host.c
> index 0f0b18a1..f846fc42 100644
> --- a/s390x/uv-host.c
> +++ b/s390x/uv-host.c
> @@ -83,6 +83,24 @@ static void test_priv(void)
>         report_prefix_pop();
>  }
>
> +static void test_uv_uninitialized(void)
> +{
> +       struct uv_cb_header uvcb = {};
> +       int i;
> +
> +       report_prefix_push("uninitialized");
> +
> +       /* i = 1 to skip over initialize */

Just say

if (cmds[i].cmd == UVC_CMD_INIT_UV)
continue;

inside the loop.