KVM: selftests: Always run vCPU thread with blocked SIG_IPI
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Apr 2021 08:13:03 +0000 (04:13 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 21 Apr 2021 16:20:02 +0000 (12:20 -0400)
commitbf1e15a82e3b74ee86bb119d6038b41e1ed2b319
tree661426657cb6516f02cbbf01f3e8eccffa17ec4f
parent016ff1a442d9a8f36dcb3beca0bcdfc35e281e18
KVM: selftests: Always run vCPU thread with blocked SIG_IPI

The main thread could start to send SIG_IPI at any time, even before signal
blocked on vcpu thread.  Therefore, start the vcpu thread with the signal
blocked.

Without this patch, on very busy cores the dirty_log_test could fail directly
on receiving a SIGUSR1 without a handler (when vcpu runs far slower than main).

Reported-by: Peter Xu <peterx@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/dirty_log_test.c