From: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
kvm@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-s390@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>,
Sven Schnelle <svens@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH v4 5/9] KVM: s390: selftest: memop: Move testlist into main
Date: Mon, 19 Dec 2022 17:13:20 +0100 [thread overview]
Message-ID: <fbe79380237a2d6f4aca0c6b6909afd20b35a058.camel@linux.ibm.com> (raw)
In-Reply-To: <20221213165405.2953539-6-scgl@linux.ibm.com>
On Tue, 2022-12-13 at 17:54 +0100, Janis Schoetterl-Glausch wrote:
> This allows checking if the necessary requirements for a test case are
> met via an arbitrary expression. In particular, it is easy to check if
> certain bits are set in the memop extension capability.
>
> Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
> tools/testing/selftests/kvm/s390x/memop.c | 132 +++++++++++-----------
> 1 file changed, 66 insertions(+), 66 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/selftests/kvm/s390x/memop.c
> index 286185a59238..10f34c629cac 100644
> --- a/tools/testing/selftests/kvm/s390x/memop.c
> +++ b/tools/testing/selftests/kvm/s390x/memop.c
> @@ -690,87 +690,87 @@ static void test_errors(void)
> kvm_vm_free(t.kvm_vm);
> }
>
[...]
>
> int main(int argc, char *argv[])
> {
> int extension_cap, idx;
>
> + setbuf(stdout, NULL); /* Tell stdout not to buffer its content */
> TEST_REQUIRE(kvm_has_cap(KVM_CAP_S390_MEM_OP));
> + extension_cap = kvm_check_cap(KVM_CAP_S390_MEM_OP_EXTENSION);
>
[...]
>
> ksft_print_header();
> -
> ksft_set_plan(ARRAY_SIZE(testlist));
>
> - extension_cap = kvm_check_cap(KVM_CAP_S390_MEM_OP_EXTENSION);
> for (idx = 0; idx < ARRAY_SIZE(testlist); idx++) {
> - if (extension_cap >= testlist[idx].extension) {
> + if (testlist[idx].requirements_met) {
> testlist[idx].test();
> ksft_test_result_pass("%s\n", testlist[idx].name);
> } else {
> - ksft_test_result_skip("%s - extension level %d not supported\n",
> - testlist[idx].name,
> - testlist[idx].extension);
> + ksft_test_result_skip("%s - requirements not met (kernel has extension cap %#x\n)",
oops, should be )\n ofc ^
> + testlist[idx].name, extension_cap);
> }
> }
>
next prev parent reply other threads:[~2022-12-19 16:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 16:53 [PATCH v4 0/9] KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg Janis Schoetterl-Glausch
2022-12-13 16:53 ` [PATCH v4 1/9] " Janis Schoetterl-Glausch
2022-12-14 9:19 ` Thomas Huth
2022-12-14 13:12 ` Janis Schoetterl-Glausch
[not found] ` <202212141025.6iR1ex8g-lkp@intel.com>
2022-12-19 21:24 ` Janis Schoetterl-Glausch
2023-01-04 17:27 ` Heiko Carstens
2022-12-13 16:53 ` [PATCH v4 2/9] Documentation: KVM: s390: Describe KVM_S390_MEMOP_F_CMPXCHG Janis Schoetterl-Glausch
2022-12-13 17:32 ` Claudio Imbrenda
2022-12-13 16:53 ` [PATCH v4 3/9] KVM: s390: selftest: memop: Pass mop_desc via pointer Janis Schoetterl-Glausch
2022-12-13 16:54 ` [PATCH v4 4/9] KVM: s390: selftest: memop: Replace macros by functions Janis Schoetterl-Glausch
2022-12-14 9:23 ` Thomas Huth
2022-12-13 16:54 ` [PATCH v4 5/9] KVM: s390: selftest: memop: Move testlist into main Janis Schoetterl-Glausch
2022-12-19 16:13 ` Janis Schoetterl-Glausch [this message]
2022-12-13 16:54 ` [PATCH v4 6/9] KVM: s390: selftest: memop: Add cmpxchg tests Janis Schoetterl-Glausch
2022-12-13 16:54 ` [PATCH v4 7/9] KVM: s390: selftest: memop: Add bad address test Janis Schoetterl-Glausch
2022-12-13 16:54 ` [PATCH v4 8/9] KVM: s390: selftest: memop: Fix typo Janis Schoetterl-Glausch
2022-12-13 16:54 ` [PATCH v4 9/9] KVM: s390: selftest: memop: Fix wrong address being used in test Janis Schoetterl-Glausch
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=fbe79380237a2d6f4aca0c6b6909afd20b35a058.camel@linux.ibm.com \
--to=scgl@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@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=shuah@kernel.org \
--cc=svens@linux.ibm.com \
--cc=thuth@redhat.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