Re: [kvm-unit-tests PATCH] s390x: Report missing facilities as "skip", not as "expected failure"

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

 



On 14.06.2018 20:34, Thomas Huth wrote:
> Looking at the other architectures, I just recently learnt that it is
> better to mark missing CPU functionality as SKIP instead of reporting
> an expected failure. Thus let's replace the report_xfail() calls in
> the s390x code with report_skip().
> 
> Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>

Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>

> ---
>  s390x/cmm.c    |  5 +++--
>  s390x/gs.c     |  5 +++--
>  s390x/iep.c    |  5 +++--
>  s390x/pfmf.c   |  5 +++--
>  s390x/sthyi.c  |  5 +++--
>  s390x/vector.c | 15 +++++++++------
>  6 files changed, 24 insertions(+), 16 deletions(-)
> 
> diff --git a/s390x/cmm.c b/s390x/cmm.c
> index 9e6a193..42dfda2 100644
> --- a/s390x/cmm.c
> +++ b/s390x/cmm.c
> @@ -57,9 +57,10 @@ int main(void)
>  	bool has_essa = test_availability();
>  
>  	report_prefix_push("cmm");
> -	report_xfail("ESSA available", !has_essa, has_essa);
> -	if (!has_essa)
> +	if (!has_essa) {
> +		report_skip("ESSA is not available");
>  		goto done;
> +	}
>  
>  	test_priv();
>  	test_params();
> diff --git a/s390x/gs.c b/s390x/gs.c
> index 0cba5dd..bddc2b4 100644
> --- a/s390x/gs.c
> +++ b/s390x/gs.c
> @@ -158,9 +158,10 @@ int main(void)
>  	bool has_gs = test_facility(133);
>  
>  	report_prefix_push("gs");
> -	report_xfail("Guarded storage available", !has_gs, has_gs);
> -	if (!has_gs)
> +	if (!has_gs) {
> +		report_skip("Guarded storage is not available");
>  		goto done;
> +	}
>  
>  	test_special();
>  	init();
> diff --git a/s390x/iep.c b/s390x/iep.c
> index e4abc72..8c1ea8f 100644
> --- a/s390x/iep.c
> +++ b/s390x/iep.c
> @@ -48,9 +48,10 @@ int main(void)
>  	bool has_iep = test_facility(130);
>  
>  	report_prefix_push("iep");
> -	report_xfail("DAT IEP available", !has_iep, has_iep);
> -	if (!has_iep)
> +	if (!has_iep) {
> +		report_skip("DAT IEP is not available");
>  		goto done;
> +	}
>  
>  	/* Setup DAT 1:1 mapping and memory management */
>  	setup_vm();
> diff --git a/s390x/pfmf.c b/s390x/pfmf.c
> index 838f7bd..2268fd0 100644
> --- a/s390x/pfmf.c
> +++ b/s390x/pfmf.c
> @@ -125,9 +125,10 @@ int main(void)
>  	bool has_edat = test_facility(8);
>  
>  	report_prefix_push("pfmf");
> -	report_xfail("PFMF available", !has_edat, has_edat);
> -	if (!has_edat)
> +	if (!has_edat) {
> +		report_skip("PFMF is not available");
>  		goto done;
> +	}
>  
>  	test_priv();
>  	/* Force the buffer pages in */
> diff --git a/s390x/sthyi.c b/s390x/sthyi.c
> index 0b1b4ec..16b8c14 100644
> --- a/s390x/sthyi.c
> +++ b/s390x/sthyi.c
> @@ -150,9 +150,10 @@ int main(void)
>  	report_prefix_push("sthyi");
>  
>  	/* Test for availability */
> -	report_xfail("STHYI available", !has_sthyi, has_sthyi);
> -	if (!has_sthyi)
> +	if (!has_sthyi) {
> +		report_skip("STHYI is not available");
>  		goto done;
> +	}
>  
>  	/* Test register/argument checking. */
>  	test_exception_addr();
> diff --git a/s390x/vector.c b/s390x/vector.c
> index 05b3eca..d40f647 100644
> --- a/s390x/vector.c
> +++ b/s390x/vector.c
> @@ -60,9 +60,10 @@ static void test_ext1_nand(void)
>  		__uint128_t a,b,c;
>  	} prm __attribute__((aligned(16)));
>  
> -	report_xfail("Vector extensions 1 available", !has_vext, has_vext);
> -	if (!has_vext)
> +	if (!has_vext) {
> +		report_skip("Vector extensions 1 is not available");
>  		return;
> +	}
>  
>  	memset(&prm, 0xff, sizeof(prm));
>  
> @@ -85,9 +86,10 @@ static void test_bcd_add(void)
>  		__uint128_t a,b,c;
>  	} prm __attribute__((aligned(16)));
>  
> -	report_xfail("Vector BCD extensions available", !has_bcd, has_bcd);
> -	if (!has_bcd)
> +	if (!has_bcd) {
> +		report_skip("Vector BCD extensions is not available");
>  		return;
> +	}
>  
>  	prm.c = 0;
>  	prm.a = prm.b = 0b001000011100;
> @@ -118,9 +120,10 @@ int main(void)
>  	bool has_vregs = test_facility(129);
>  
>  	report_prefix_push("vector");
> -	report_xfail("Basic vector facility available", !has_vregs, has_vregs);
> -	if (!has_vregs)
> +	if (!has_vregs) {
> +		report_skip("Basic vector facility is not available");
>  		goto done;
> +	}
>  
>  	init();
>  	test_add();
> 


Attachment: signature.asc
Description: OpenPGP digital signature


[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