From: Thomas Huth <thuth@redhat.com>
To: Janis Schoetterl-Glausch <scgl@linux.ibm.com>,
kvm@vger.kernel.org,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
David Hildenbrand <david@redhat.com>,
Shuah Khan <shuah@kernel.org>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH v4 1/4] KVM: s390: selftests: Use TAP interface in the memop test
Date: Tue, 14 Jun 2022 16:24:35 +0200 [thread overview]
Message-ID: <36d83871-343d-e8a0-1aed-05bf386f9b1b@redhat.com> (raw)
In-Reply-To: <07576ae9-9798-316f-d33e-10c91faeebfb@linux.ibm.com>
On 14/06/2022 12.38, Janis Schoetterl-Glausch wrote:
> On 5/31/22 12:15, Thomas Huth wrote:
>> The memop test currently does not have any output (unless one of the
>> TEST_ASSERT statement fails), so it's hard to say for a user whether
>> a certain new sub-test has been included in the binary or not. Let's
>> make this a little bit more user-friendly and include some TAP output
>> via the kselftests.h interface.
>>
>> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> tools/testing/selftests/kvm/s390x/memop.c | 95 ++++++++++++++++++-----
>> 1 file changed, 77 insertions(+), 18 deletions(-)
>>
>> diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/selftests/kvm/s390x/memop.c
>> index 49f26f544127..e704c6fa5758 100644
>> --- a/tools/testing/selftests/kvm/s390x/memop.c
>> +++ b/tools/testing/selftests/kvm/s390x/memop.c
>> @@ -14,6 +14,7 @@
>>
>
> [...]
>
>> int main(int argc, char *argv[])
>> {
>> - int memop_cap, extension_cap;
>> + int memop_cap, extension_cap, idx;
>>
>> setbuf(stdout, NULL); /* Tell stdout not to buffer its content */
>>
>> + ksft_print_header();
>> +
>> memop_cap = kvm_check_cap(KVM_CAP_S390_MEM_OP);
>> extension_cap = kvm_check_cap(KVM_CAP_S390_MEM_OP_EXTENSION);
>> if (!memop_cap) {
>> - print_skip("CAP_S390_MEM_OP not supported");
>> - exit(KSFT_SKIP);
>> + ksft_exit_skip("CAP_S390_MEM_OP not supported.\n");
>> }
>>
>> - test_copy();
>> - if (extension_cap > 0) {
>> - test_copy_key();
>> - test_copy_key_storage_prot_override();
>> - test_copy_key_fetch_prot();
>> - test_copy_key_fetch_prot_override();
>> - test_errors_key();
>> - test_termination();
>> - test_errors_key_storage_prot_override();
>> - test_errors_key_fetch_prot_override_not_enabled();
>> - test_errors_key_fetch_prot_override_enabled();
>> - } else {
>> - print_skip("storage key memop extension not supported");
>> + ksft_set_plan(ARRAY_SIZE(testlist));
>> +
>> + for (idx = 0; idx < ARRAY_SIZE(testlist); idx++) {
>> + if (testlist[idx].extension >= extension_cap) {
>
> This is reversed, should be
>
> if (testlist[idx].extension <= extension_cap) {
> or
> if (extension_cap >= testlist[idx].extension) {
Drat! The patch is already in Paolo's queue ... could you please send a
patch to fix this, so that Paolo can either squash it (not sure whether
that's still feasible) or queue it, too?
> I'd prefer the latter.
Me too.
Thanks,
Thomas
next prev parent reply other threads:[~2022-06-14 14:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 10:15 [PATCH v4 0/4] KVM: s390: selftests: Provide TAP output in tests Thomas Huth
2022-05-31 10:15 ` [PATCH v4 1/4] KVM: s390: selftests: Use TAP interface in the memop test Thomas Huth
2022-06-14 10:38 ` Janis Schoetterl-Glausch
2022-06-14 14:24 ` Thomas Huth [this message]
2022-06-14 16:26 ` [PATCH] KVM: s390: selftests: Fix memop extension capability check Janis Schoetterl-Glausch
2022-06-14 16:31 ` Thomas Huth
2022-06-14 17:09 ` Paolo Bonzini
2022-05-31 10:15 ` [PATCH v4 2/4] KVM: s390: selftests: Use TAP interface in the sync_regs test Thomas Huth
2022-05-31 10:15 ` [PATCH v4 3/4] KVM: s390: selftests: Use TAP interface in the tprot test Thomas Huth
2022-05-31 10:15 ` [PATCH v4 4/4] KVM: s390: selftests: Use TAP interface in the reset test Thomas Huth
2022-05-31 11:29 ` [PATCH v4 0/4] KVM: s390: selftests: Provide TAP output in tests Christian Borntraeger
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=36d83871-343d-e8a0-1aed-05bf386f9b1b@redhat.com \
--to=thuth@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=scgl@linux.ibm.com \
--cc=shuah@kernel.org \
/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