Skip to contentSkip to conversation

s390x: Report missing facilities as "skip", not as "expected failure"

GIT PULL Thomas Huth 1 participant 1 message Jun 26, 2018

lore
Share & tools
lore
#0 lore raw

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().

---
 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(-)
s390x/cmm.c +3 -2
index 9e6a193..42dfda2 100644
@@ -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();
s390x/gs.c +3 -2
index 0cba5dd..bddc2b4 100644
@@ -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();
s390x/iep.c +3 -2
index e4abc72..8c1ea8f 100644
@@ -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();
s390x/pfmf.c +3 -2
index 838f7bd..2268fd0 100644
@@ -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 */
s390x/sthyi.c +3 -2
index 0b1b4ec..16b8c14 100644
@@ -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();
s390x/vector.c +9 -6
index 05b3eca..d40f647 100644
@@ -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();
Signature · 1 line
1.8.3.1