From: Paolo Bonzini <pbonzini@redhat.com>
To: Fuad Tabba <tabba@google.com>, kvm@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org, shuah@kernel.org
Subject: Re: [PATCH] KVM: selftests: Fix kvm_check_cap() assertion
Date: Thu, 17 Jun 2021 19:07:03 +0200 [thread overview]
Message-ID: <ea3ed990-5af2-6f1b-1e6f-eb45824b342b@redhat.com> (raw)
In-Reply-To: <20210615150443.1183365-1-tabba@google.com>
On 15/06/21 17:04, Fuad Tabba wrote:
> KVM_CHECK_EXTENSION ioctl can return any negative value on error,
> and not necessarily -1. Change the assertion to reflect that.
>
> Signed-off-by: Fuad Tabba <tabba@google.com>
> ---
> tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
> index 5c70596dd1b9..a2b732cf96ea 100644
> --- a/tools/testing/selftests/kvm/lib/kvm_util.c
> +++ b/tools/testing/selftests/kvm/lib/kvm_util.c
> @@ -82,7 +82,7 @@ int kvm_check_cap(long cap)
>
> kvm_fd = open_kvm_dev_path_or_exit();
> ret = ioctl(kvm_fd, KVM_CHECK_EXTENSION, cap);
> - TEST_ASSERT(ret != -1, "KVM_CHECK_EXTENSION IOCTL failed,\n"
> + TEST_ASSERT(ret >= 0, "KVM_CHECK_EXTENSION IOCTL failed,\n"
> " rc: %i errno: %i", ret, errno);
>
> close(kvm_fd);
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2021-06-17 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 15:04 [PATCH] KVM: selftests: Fix kvm_check_cap() assertion Fuad Tabba
2021-06-17 17:07 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea3ed990-5af2-6f1b-1e6f-eb45824b342b@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=tabba@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox