OSDN Git Service

selftests: KVM: Fix check for !POLLIN in demand_paging_test
authorOliver Upton <oupton@google.com>
Tue, 21 Sep 2021 17:11:20 +0000 (17:11 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Sep 2021 14:33:08 +0000 (10:33 -0400)
commit90b54129e8df909ccca527b2d69bcb1f0216aa8f
treedb5e92b83387c4f8cf6a4ddd87c9580923eeb78d
parent03a6e84069d1870f5b3d360e64cb330b66f76dee
selftests: KVM: Fix check for !POLLIN in demand_paging_test

The logical not operator applies only to the left hand side of a bitwise
operator. As such, the check for POLLIN not being set in revents wrong.
Fix it by adding parentheses around the bitwise expression.

Fixes: 4f72180eb4da ("KVM: selftests: Add demand paging content to the demand paging test")
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Oliver Upton <oupton@google.com>
Message-Id: <20210921171121.2148982-2-oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/demand_paging_test.c