[kvm-unit-tests PATCH 6/8] x86/syscall: skip TF-test if running neither on KVM nor AMD

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

 



From: Nadav Amit <nadav.amit@xxxxxxxxx>

The syscall TF-test runs syscall on 32-bit mode, which is unsupported by
Intel. As a result, if the test is executed on non-KVM environment and
the system does not have AMD CPU, the test crashes. Skip the test in
such case.

Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx>
---
 x86/syscall.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/x86/syscall.c b/x86/syscall.c
index 8cef860..a8045cb 100644
--- a/x86/syscall.c
+++ b/x86/syscall.c
@@ -4,6 +4,7 @@
 #include "processor.h"
 #include "msr.h"
 #include "desc.h"
+#include "fwcfg.h"
 
 static void test_syscall_lazy_load(void)
 {
@@ -101,7 +102,11 @@ static void test_syscall_tf(void)
 int main(int ac, char **av)
 {
     test_syscall_lazy_load();
-    test_syscall_tf();
+
+    if (!no_test_device || !is_intel())
+        test_syscall_tf();
+    else
+        report_skip("syscall TF handling");
 
     return report_summary();
 }
-- 
2.25.1




[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