Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1528646iog; Tue, 14 Jun 2022 07:51:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1veTPnUmb3lFzDQQx/m0QLoXg0eIHwVZXmwGvPIYkrQ75Q7gfTQCYKQYTdzw8GOHH6HFe7j X-Received: by 2002:a17:906:851a:b0:709:d4ce:21ea with SMTP id i26-20020a170906851a00b00709d4ce21eamr4757087ejx.289.1655218264195; Tue, 14 Jun 2022 07:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655218264; cv=none; d=google.com; s=arc-20160816; b=wJuk8zJF6F6qazsS2c8OYDKCGxPjY4ZMey2QVebzk3lXndxXIURj22e/AucsLsdsDM 6NyGO8vw3TfnY7a9BewgOrgm1KXDW8oG6UvSvnTX5ZYyvewuZG27zPa5hibuKHX1qpze FQFN+WetZ7Um7j7wOSCy0ikHIiH2j54q6FtM/WTKOzIISwpW7K3WmR/CB922QM4Y0TQG 23D2A4rRkWIpSirjUxzt0vjlu6EelPWmTVD0YI5DijBZGuIJ3CVD0mKuEtSFn9wjlyHY 7GUFwHRsDCtioSi4wF4Ce4dbKX9ZMb5SAg90kh883M8qvpQA6uf2LlvwbG8Y0VmKubav 0QSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=c/W8jZgUnGZP6Qe9nuklShonDb+6U/u9I9QZozewk0A=; b=V3KxNjKGb1Q1iY3zc0RDuV2UYJh3D0+d90tpLGtnoM9XPptVz2lAMGs+DLCSvRt2/8 R2YNqpX48KKWcv87fKFXDZfxPeqHpwTqI23tU9oulivufBgPF8qB81c6f7lBC5eiNzWS 0RKiAMlX/EXuFyu41qWR0l7moWFumhWxLirofL1wUVtOhVN7YKy26BYCmFKbnlcWFEd6 ReB9G+OTc+OFvgWt/UD5nINF8bK6NzejG+P+qFKaKt5hYYt2gzQqQADSYyfjPX2GmLqX UHXi8W8E4iV0/ElbcNJ6VJ56YqT5f+fgviKJlDvG62WJmGCfh/kIsdmY9R0Jwzs6Xw5c MACQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gfXM9rzG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l19-20020a170906795300b0070337fc0e1asi12451763ejo.27.2022.06.14.07.50.38; Tue, 14 Jun 2022 07:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gfXM9rzG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245462AbiFNOYp (ORCPT + 99 others); Tue, 14 Jun 2022 10:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343525AbiFNOYn (ORCPT ); Tue, 14 Jun 2022 10:24:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B15AA2BB21 for ; Tue, 14 Jun 2022 07:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655216680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c/W8jZgUnGZP6Qe9nuklShonDb+6U/u9I9QZozewk0A=; b=gfXM9rzGWyPv7NpVIPsGIvGoDzThINLzEKPqbmVrYYbQFnE/DtzrBv96jzbslfaingvewC TNW2J/58HZGG8hceTKdIPZwLfCvpeODmcTzyJWXxOPoE+JD47yh1oabQc6zkc9L5T3dCmw 5n2gmZBf52xbggu1GN4I7DsxHpc95VI= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-230-z5vT9Y9LMn6AOrh3-CEMEw-1; Tue, 14 Jun 2022 10:24:39 -0400 X-MC-Unique: z5vT9Y9LMn6AOrh3-CEMEw-1 Received: by mail-wr1-f72.google.com with SMTP id v4-20020adfebc4000000b002102c69be5eso1343956wrn.13 for ; Tue, 14 Jun 2022 07:24:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=c/W8jZgUnGZP6Qe9nuklShonDb+6U/u9I9QZozewk0A=; b=NVAe2MnPjtGf96eF9muXEQTPem9etbwNtU90XMu1aVRdtODIG7s2JnoNx3tuUHX0wg teCHeB00f67/8/o7knU1JFYWe8lEjF+2Q8yzQz/ZEa3WUxsI+CDPV/Aql3a4IoJrUkxm EtFNVXkETaV6GjLslnth8qGmR3W+C3kZ2L6neFrdLrHbF95qlhk7LZkSpvw4fDGZwjuy MjxifrMEQnqrRcYhKQ26AhuzUgNzWzUu5D1eJOO84N3zWwErQ/zj+JPAgKSfrKjhC0YX FScPxskta1w0eN+SPqP77V6hfrF3h5cvV5A7+H/YCoVW4HtrWm+3TBYHtTeJXvqVVfPW UOew== X-Gm-Message-State: AJIora9aIHZxaLaDCcxxn4vdLHV7+VogoC7wquyiC6Ux4syaMNLLNX38 gU0wquCxZbUgtFW+hm9+bkLkW5unRQw4glOuNWPzKwajLxAQrDDj5uWytvzRvwy0HxkItMYOgTX l+5r0K56HCXBYgUPLQ6WB+Liv X-Received: by 2002:adf:a55a:0:b0:219:e574:2ae9 with SMTP id j26-20020adfa55a000000b00219e5742ae9mr5364265wrb.158.1655216678287; Tue, 14 Jun 2022 07:24:38 -0700 (PDT) X-Received: by 2002:adf:a55a:0:b0:219:e574:2ae9 with SMTP id j26-20020adfa55a000000b00219e5742ae9mr5364228wrb.158.1655216677887; Tue, 14 Jun 2022 07:24:37 -0700 (PDT) Received: from [192.168.0.3] (ip-109-42-114-75.web.vodafone.de. [109.42.114.75]) by smtp.gmail.com with ESMTPSA id h206-20020a1c21d7000000b0039746638d6esm13583229wmh.33.2022.06.14.07.24.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jun 2022 07:24:37 -0700 (PDT) Message-ID: <36d83871-343d-e8a0-1aed-05bf386f9b1b@redhat.com> Date: Tue, 14 Jun 2022 16:24:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v4 1/4] KVM: s390: selftests: Use TAP interface in the memop test Content-Language: en-US To: Janis Schoetterl-Glausch , kvm@vger.kernel.org, Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Paolo Bonzini Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, David Hildenbrand , Shuah Khan , linux-s390@vger.kernel.org References: <20220531101554.36844-1-thuth@redhat.com> <20220531101554.36844-2-thuth@redhat.com> <07576ae9-9798-316f-d33e-10c91faeebfb@linux.ibm.com> From: Thomas Huth In-Reply-To: <07576ae9-9798-316f-d33e-10c91faeebfb@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> Signed-off-by: Thomas Huth >> --- >> 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