Re: [kvm-unit-tests PATCH 4/9] s390x: topology: Don't use non unique message

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

 



On 10/11/23 10:56, Nina Schoetterl-Glausch wrote:
When we test something, i.e. do a report() we want unique messages,
otherwise, from the test output, it will appear as if the same test was
run multiple times, possible with different PASS/FAIL values.

Convert some reports that don't actually test anything topology specific
into asserts.
Refine the report message for others.

Signed-off-by: Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>

Please change to:
s390x: topology: make report messages unique

Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>

---
  s390x/topology.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/s390x/topology.c b/s390x/topology.c
index 49d6dfeb..5374582f 100644
--- a/s390x/topology.c
+++ b/s390x/topology.c
@@ -114,7 +114,7 @@ static void check_polarization_change(void)
  	report_prefix_push("Polarization change");
/* We expect a clean state through reset */
-	report(diag308_load_reset(1), "load normal reset done");
+	assert(diag308_load_reset(1));
/*
  	 * Set vertical polarization to verify that RESET sets
@@ -123,7 +123,7 @@ static void check_polarization_change(void)
  	cc = ptf(PTF_REQ_VERTICAL, &rc);
  	report(cc == 0, "Set vertical polarization.");
- report(diag308_load_reset(1), "load normal reset done");
+	assert(diag308_load_reset(1));
cc = ptf(PTF_CHECK, &rc);
  	report(cc == 0, "Reset should clear topology report");
@@ -137,25 +137,25 @@ static void check_polarization_change(void)
  	report(cc == 0, "Change to vertical");
cc = ptf(PTF_CHECK, &rc);
-	report(cc == 1, "Should report");
+	report(cc == 1, "Should report change after horizontal -> vertical");
cc = ptf(PTF_REQ_VERTICAL, &rc);
  	report(cc == 2 && rc == PTF_ERR_ALRDY_POLARIZED, "Double change to vertical");
cc = ptf(PTF_CHECK, &rc);
-	report(cc == 0, "Should not report");
+	report(cc == 0, "Should not report change after vertical -> vertical");
cc = ptf(PTF_REQ_HORIZONTAL, &rc);
  	report(cc == 0, "Change to horizontal");
cc = ptf(PTF_CHECK, &rc);
-	report(cc == 1, "Should Report");
+	report(cc == 1, "Should report change after vertical -> horizontal");
cc = ptf(PTF_REQ_HORIZONTAL, &rc);
  	report(cc == 2 && rc == PTF_ERR_ALRDY_POLARIZED, "Double change to horizontal");
cc = ptf(PTF_CHECK, &rc);
-	report(cc == 0, "Should not report");
+	report(cc == 0, "Should not report change after horizontal -> horizontal");
report_prefix_pop();
  }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux