Re: [kvm-unit-tests PATCH 1/2] s390x: diag10: Fence tcg and pv environments

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

 



On 5/28/25 11:55 AM, Thomas Huth wrote:
On 28/05/2025 11.13, Janosch Frank wrote:
Diag10 isn't supported under either of these environments so let's
make sure that the test bails out accordingly.

Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
---
   s390x/diag10.c      | 15 +++++++++++++++
   s390x/unittests.cfg |  1 +
   2 files changed, 16 insertions(+)

diff --git a/s390x/diag10.c b/s390x/diag10.c
index 579a7a5d..00725f58 100644
--- a/s390x/diag10.c
+++ b/s390x/diag10.c
@@ -9,6 +9,8 @@
    */
#include <libcflat.h>
+#include <uv.h>
+#include <hardware.h>
   #include <asm/asm-offsets.h>
   #include <asm/interrupt.h>
   #include <asm/page.h>
@@ -95,8 +97,21 @@ static void test_priv(void)
   int main(void)
   {
   	report_prefix_push("diag10");
+
+	if (host_is_tcg()) {
+		report_skip("Test unsupported under TCG");
+		goto out;
+	}
+	if (uv_os_is_guest()) {
+		report_skip("Test unsupported under PV");
+		goto out;
+	}
+
   	test_prefix();
   	test_params();
   	test_priv();

Would it make sense to run test_priv() at least for TCG/PV, too?

Could do but I think such tests should go into a general diag test.

The KVM code tests priv before checking the subcode and going into the specific handler. So if the priv test on diag44 succeeds, then it should succeed on any other diag even if it's not implemented.

Under PV we'd be testing HW and/or FW instead of QEMU/KVM.




[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