Re: [kvm-unit-tests PATCH 2/2] s390x: diag10: Check page clear

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed May 28, 2025 at 11:13 AM CEST, Janosch Frank wrote:
> We should get a new page after we discarded the page.
> So let's check for that.
>
> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> ---
>  s390x/diag10.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/s390x/diag10.c b/s390x/diag10.c
> index 00725f58..b68481ad 100644
> --- a/s390x/diag10.c
> +++ b/s390x/diag10.c
> @@ -94,6 +94,16 @@ static void test_priv(void)
>  	report_prefix_pop();
>  }
>  
> +static void test_content(void)
> +{
> +	report_prefix_push("content");
> +	memset((void *)page0, 0x42, PAGE_SIZE);
> +	memset((void *)page1, 0, PAGE_SIZE);
> +	diag10(page0, page0);
> +	report(!memcmp((void *)page0, (void *)page1, PAGE_SIZE), "Page cleared");
> +	report_prefix_pop();
> +}

Would be nice to test that we don't clear too much, but this is clearly better
than what we had before so:

Reviewed-by: Nico Boehr <nrb@xxxxxxxxxxxxx>





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux