kvm: selftests: ucall improvements
authorAndrew Jones <drjones@redhat.com>
Mon, 27 May 2019 12:30:06 +0000 (14:30 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Jun 2019 17:29:10 +0000 (19:29 +0200)
commit2c7c5d3d392d4a9e19e16f2bde76d70e0af741ed
treee2d1029a6f6cf7b9a796eea4673baf58e8119b51
parent511a8556e3342af6a46eb9477936b29aa983f154
kvm: selftests: ucall improvements

Make sure we complete the I/O after determining we have a ucall,
which is I/O. Also allow the *uc parameter to optionally be NULL.
It's quite possible that a test case will only care about the
return value, like for example when looping on a check for
UCALL_DONE.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/dirty_log_test.c
tools/testing/selftests/kvm/lib/ucall.c