diff mbox series

[kvm-unit-tests,GIT,PULL,13/22] s390x: uv-host: Fence against being run as a PV guest

Message ID 20221025114345.28003-14-imbrenda@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: tests and fixes for PV, timing | expand

Commit Message

Claudio Imbrenda Oct. 25, 2022, 11:43 a.m. UTC
From: Janosch Frank <frankja@linux.ibm.com>

This test checks the UV host API so we should skip it if we're a PV
guest.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Message-Id: <20221017093925.2038-8-frankja@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 s390x/uv-host.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/s390x/uv-host.c b/s390x/uv-host.c
index 76d3e373..a33389b9 100644
--- a/s390x/uv-host.c
+++ b/s390x/uv-host.c
@@ -703,6 +703,10 @@  int main(void)
 		report_skip("Ultravisor call facility is not available");
 		goto done;
 	}
+	if (!uv_os_is_host()) {
+		report_skip("This test needs to be run in a UV host environment");
+		goto done;
+	}
 
 	test_i3();
 	test_priv();