On Mon, 1 Aug 2022 at 11:41, Thomas Huth <th...@redhat.com> wrote: > > On 20/07/2022 13.19, Dr. David Alan Gilbert (git) wrote: > > From: Hyman Huang(黄勇) <huang...@chinatelecom.cn> > > > > Add dirty page rate limit test if kernel support dirty ring, > > > > The following qmp commands are covered by this test case: > > "calc-dirty-rate", "query-dirty-rate", "set-vcpu-dirty-limit", > > "cancel-vcpu-dirty-limit" and "query-vcpu-dirty-limit".
> This assert triggers on my x86 laptop when I run "make check" there. More > precisely, it triggers when qemu-system-aarch64 is getting tested: > > $ QTEST_QEMU_BINARY=./qemu-system-aarch64 tests/qtest/migration-test > /aarch64/migration/bad_dest: OK > /aarch64/migration/fd_proto: OK > /aarch64/migration/validate_uuid: OK > /aarch64/migration/validate_uuid_error: OK > /aarch64/migration/validate_uuid_src_not_set: OK > /aarch64/migration/validate_uuid_dst_not_set: OK > /aarch64/migration/auto_converge: OK > /aarch64/migration/dirty_ring: OK > /aarch64/migration/vcpu_dirty_limit: migration-test: > ../../devel/qemu/tests/qtest/migration-test.c:2304: dirtylimit_start_vm: > Assertion `(strcmp(arch, "x86_64") == 0)' failed. > Aborted (core dumped) > > > static bool kvm_dirty_ring_supported(void) > > { > > #if defined(__linux__) && defined(HOST_X86_64) > > @@ -2204,6 +2458,8 @@ int main(int argc, char **argv) > > if (kvm_dirty_ring_supported()) { > > qtest_add_func("/migration/dirty_ring", > > test_precopy_unix_dirty_ring); > > + qtest_add_func("/migration/vcpu_dirty_limit", > > + test_vcpu_dirty_limit); > > } > > kvm_dirty_ring_supported() returns "true" if the KVM of the *host* is x86 > and has the dirty ring support, but it does *not* check the target > architecture that is currently tested, so you also get here "true" for > qemu-system-aarch64 being tested on a x86 host... Thus I guess > kvm_dirty_ring_supported() needs also a check for the right target > architecture? Presumably it should be checking qtest_has_accel("kvm") -- even if you're on an x86 host and with an x86 guest, if you're using TCG you're not going to get KVM dirty ring support... thanks -- PMM