On 16/11/20 13:19, Andrew Jones wrote:
This series attempts to clean up demand_paging_test, dirty_log_perf_test, and dirty_log_test by factoring out common code, creating some new API along the way. It also splits include/perf_test_util.h into a more conventional header and source pair. I've tested on x86 and AArch64 (one config each), but not s390x. v3: - Rebased remaining four patches from v2 onto kvm/queue - Picked up r-b's from Peter and Ben v2: https://www.spinics.net/lists/kvm/msg228711.html
Unfortunately patch 2 is still broken: $ ./dirty_log_test -M dirty-ring Setting log mode to: 'dirty-ring' Test iterations: 32, interval: 10 (ms) Testing guest mode: PA-bits:ANY, VA-bits:48, 4K pages ==== Test Assertion Failure ==== lib/kvm_util.c:85: ret == 0 pid=2010122 tid=2010122 - Invalid argument 1 0x0000000000402ee7: vm_enable_cap at kvm_util.c:84 2 0x0000000000403004: vm_enable_dirty_ring at kvm_util.c:124 3 0x00000000004021a5: log_mode_create_vm_done at dirty_log_test.c:453 4 (inlined by) run_test at dirty_log_test.c:683 5 0x000000000040b643: for_each_guest_mode at guest_modes.c:37 6 0x00000000004019c2: main at dirty_log_test.c:864 7 0x00007fe3f48207b2: ?? ??:0 8 0x0000000000401aad: _start at ??:? KVM_ENABLE_CAP IOCTL failed, rc: -1 errno: 22 (Also fails without -M). Paolo
Thanks, drew Andrew Jones (4): KVM: selftests: Factor out guest mode code KVM: selftests: dirty_log_test: Remove create_vm KVM: selftests: Use vm_create_with_vcpus in create_vm KVM: selftests: Implement perf_test_util more conventionally tools/testing/selftests/kvm/Makefile | 2 +- .../selftests/kvm/demand_paging_test.c | 118 ++++-------- .../selftests/kvm/dirty_log_perf_test.c | 145 +++++--------- tools/testing/selftests/kvm/dirty_log_test.c | 179 +++++------------- .../selftests/kvm/include/guest_modes.h | 21 ++ .../testing/selftests/kvm/include/kvm_util.h | 9 + .../selftests/kvm/include/perf_test_util.h | 167 ++-------------- tools/testing/selftests/kvm/lib/guest_modes.c | 70 +++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 9 +- .../selftests/kvm/lib/perf_test_util.c | 134 +++++++++++++ 10 files changed, 378 insertions(+), 476 deletions(-) create mode 100644 tools/testing/selftests/kvm/include/guest_modes.h create mode 100644 tools/testing/selftests/kvm/lib/guest_modes.c create mode 100644 tools/testing/selftests/kvm/lib/perf_test_util.c