Skip to contentSkip to conversation

kvm-unit-tests: SYNC_REGS unit test.

PATCH New Ken Hofsass 1 participant 1 message Jan 13, 2018 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm-unit-tests: SYNC_REGS unit test.

Gtest-based unit test for the x86 implementation of KVM_CAP_SYNC_REGS functionality. Exercise valid and invalid configuration scenarios. Verifies the behavior as changes are made while feature is enabled and disabled; that values match (and don't match) those returned via KVM_GET_REGS, KVM_GET_SREGS, and KVM_GET_VCPU_EVENTS ioctls, as appropriate.

---
 x86/Makefile.common           |   3 +-
 gtests/tests/sync_regs_test.c | 247 ++++++++++++++++++++++++++++++++++++++++++
 gtests/.gitignore             |   1 +
 3 files changed, 250 insertions(+), 1 deletion(-)
 create mode 100644 gtests/tests/sync_regs_test.c
x86/Makefile.common +2 -1
index 47e7bc9..63e73fa 100644
@@ -66,7 +66,8 @@ GTEST_LIBDIR = gtests/lib
 GTEST_INCDIR = gtests/include
 
 ifdef GTESTS
-tests-gtests = $(GTEST_DIR)/set_sregs_test $(GTEST_DIR)/vmx_tsc_adjust_test
+tests-gtests = $(GTEST_DIR)/set_sregs_test $(GTEST_DIR)/sync_regs_test \
+	      $(GTEST_DIR)/vmx_tsc_adjust_test
 
 OBJDIRS += gtests/lib
 OBJDIRS += gtests/tests
gtests/tests/sync_regs_test.c new file +247 -0

247 lines not on this page · raw message

gtests/.gitignore +1 -0
index 7785445..21796c7 100644
@@ -1,2 +1,3 @@
 tests/set_sregs_test
+tests/sync_regs_test
 tests/vmx_tsc_adjust_test
Signature · 1 line
2.16.0.rc1.238.g530d649a79-goog