Message ID | 88e3ab23029d726a2703adcf6af8356f7a2d3483.1682607419.git.legion@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp348386vqo; Thu, 27 Apr 2023 08:24:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ABMS/rNSlAThl9RKT+Y/P1WqN03VkHWsoLWLeeyxzt8GLIwyYQ9XBhWyuOKq0Sz7DHTnW X-Received: by 2002:a05:6a00:1515:b0:63d:6744:8cae with SMTP id q21-20020a056a00151500b0063d67448caemr3020634pfu.2.1682609096869; Thu, 27 Apr 2023 08:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682609096; cv=none; d=google.com; s=arc-20160816; b=r+Y/k2WWg2N+6UeX6kSQs/mA9NywPuVrkXEAEUuE1HsAYTcMC7e74VkcmlTamNm6cX to0cN9sAApq/+va/fey3MOPyE66Se06XxQlwLmduxZFY7xiBsE1PzrO00LgT45q+qE2B wJfNlqGVOjElknJxn0U53ujElLJiFHd2fmmgAqtjyDx/yidgZwjRBKnBoGYc5T+27U61 ySzWKUTzyTtkxjSUhsqNRfEH7f9CkY06ESR7+XrENN39IFjgJjKnavqvqJGlCTAiiuii htkbBKd2ndIcF1MDOVAiNXsvfWo1SenkLxsV6z9m03mzRoMfsz+EJxzUOZ2ZHhOHRgpe /rZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8nzuBLMSncEl3kqsjdOiw/LDSt21yF12jWxQMTOSpAA=; b=mH4XVND3mlSf1g5lHPzUjYrlW/BKaCuUmBCX25mc4GPPaIOsZ9/Rr8tce+sa9sX5X6 WOZknbghWNk5At/orO1QVB5ejkxswr7OZTq78+wH9RyjAA4TGkk2M4Sl5hKWdPm232Fa HgdKLfKdgxeJHDo6WyU9QPcW4QNOqNKO3ide9BvzL9GWDrW/GzWBuYpf1QtKpiI7DTp8 UNYV9ZLh9oop5sMAuSlKGzfKNw7dhZAsbrZiiJVEoqYaWo2aW0NJ2qj03NSU1Y4LufYP k+2C7aJkA1Ljvv4UbOAPl6UOCvEwT4m9KEW3Wt2eUMTyLz4mG2ONWXQudMqLtZXZZtsk bqpw== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020aa793d2000000b0063d33fc3e08si19371889pff.79.2023.04.27.08.24.44; Thu, 27 Apr 2023 08:24:56 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243942AbjD0PES (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Thu, 27 Apr 2023 11:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243891AbjD0PEQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Apr 2023 11:04:16 -0400 Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [205.139.111.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24CB3421B for <linux-kernel@vger.kernel.org>; Thu, 27 Apr 2023 08:04:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-85-k9GULLW-M6itUZoLE_EtiQ-1; Thu, 27 Apr 2023 11:02:21 -0400 X-MC-Unique: k9GULLW-M6itUZoLE_EtiQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F0DB88B7A0; Thu, 27 Apr 2023 15:01:49 +0000 (UTC) Received: from comp-core-i7-2640m-0182e6.redhat.com (unknown [10.45.226.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id 106381121315; Thu, 27 Apr 2023 15:01:47 +0000 (UTC) From: Alexey Gladkov <legion@kernel.org> To: LKML <linux-kernel@vger.kernel.org>, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Alexei Starovoitov <ast@kernel.org>, Andrii Nakryiko <andrii@kernel.org>, Daniel Borkmann <daniel@iogearbox.net> Subject: [PATCH v1] selftests/bpf: Do not use sign-file as testcase Date: Thu, 27 Apr 2023 16:59:48 +0200 Message-Id: <88e3ab23029d726a2703adcf6af8356f7a2d3483.1682607419.git.legion@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764343516634317297?= X-GMAIL-MSGID: =?utf-8?q?1764343516634317297?= |
Series |
[v1] selftests/bpf: Do not use sign-file as testcase
|
|
Commit Message
Alexey Gladkov
April 27, 2023, 2:59 p.m. UTC
The sign-file utility (from scripts/) is used in prog_tests/verify_pkcs7_sig.c,
but the utility should not be called as a test. Executing this utility
produces the following error:
selftests: /linux/tools/testing/selftests/bpf: urandom_read
ok 16 selftests: /linux/tools/testing/selftests/bpf: urandom_read
selftests: /linux/tools/testing/selftests/bpf: sign-file
not ok 17 selftests: /linux/tools/testing/selftests/bpf: sign-file # exit=2
Fixes: fc97590668ae ("selftests/bpf: Add test for bpf_verify_pkcs7_signature() kfunc")
Signed-off-by: Alexey Gladkov <legion@kernel.org>
---
tools/testing/selftests/bpf/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 04/27, Alexey Gladkov wrote: > The sign-file utility (from scripts/) is used in prog_tests/verify_pkcs7_sig.c, > but the utility should not be called as a test. Executing this utility > produces the following error: > > selftests: /linux/tools/testing/selftests/bpf: urandom_read > ok 16 selftests: /linux/tools/testing/selftests/bpf: urandom_read > > selftests: /linux/tools/testing/selftests/bpf: sign-file > not ok 17 selftests: /linux/tools/testing/selftests/bpf: sign-file # exit=2 > > Fixes: fc97590668ae ("selftests/bpf: Add test for bpf_verify_pkcs7_signature() kfunc") > Signed-off-by: Alexey Gladkov <legion@kernel.org> Acked-by: Stanislav Fomichev <sdf@google.com> > --- > tools/testing/selftests/bpf/Makefile | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > index b677dcd0b77a..fd214d1526d4 100644 > --- a/tools/testing/selftests/bpf/Makefile > +++ b/tools/testing/selftests/bpf/Makefile > @@ -88,8 +88,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ > xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \ > xdp_features > > -TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file > -TEST_GEN_FILES += liburandom_read.so > +TEST_GEN_FILES += liburandom_read.so urandom_read sign-file > > # Emit succinct information message describing current building step > # $1 - generic step name (e.g., CC, LINK, etc); > -- > 2.33.7 >
On 4/27/23 8:28 PM, Stanislav Fomichev wrote: > On 04/27, Alexey Gladkov wrote: >> The sign-file utility (from scripts/) is used in prog_tests/verify_pkcs7_sig.c, >> but the utility should not be called as a test. Executing this utility >> produces the following error: >> >> selftests: /linux/tools/testing/selftests/bpf: urandom_read >> ok 16 selftests: /linux/tools/testing/selftests/bpf: urandom_read >> >> selftests: /linux/tools/testing/selftests/bpf: sign-file >> not ok 17 selftests: /linux/tools/testing/selftests/bpf: sign-file # exit=2 >> >> Fixes: fc97590668ae ("selftests/bpf: Add test for bpf_verify_pkcs7_signature() kfunc") >> Signed-off-by: Alexey Gladkov <legion@kernel.org> > > Acked-by: Stanislav Fomichev <sdf@google.com> > >> tools/testing/selftests/bpf/Makefile | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile >> index b677dcd0b77a..fd214d1526d4 100644 >> --- a/tools/testing/selftests/bpf/Makefile >> +++ b/tools/testing/selftests/bpf/Makefile >> @@ -88,8 +88,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ >> xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \ >> xdp_features >> >> -TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file >> -TEST_GEN_FILES += liburandom_read.so >> +TEST_GEN_FILES += liburandom_read.so urandom_read sign-file Given you move over both of them, the commit msg should be adapted accordingly since it mainly talks about sign-file, less so about urandom_read. Also now that you remove the TEST_CUSTOM_PROGS, we should probably also remove the other two instances: tools/testing/selftests/bpf/Makefile:91:TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file tools/testing/selftests/bpf/Makefile:156: $(TEST_CUSTOM_PROGS)): %: $(OUTPUT)/% ; tools/testing/selftests/bpf/Makefile:674:EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(SCRATCH_DIR) $(HOST_SCRATCH_DIR) \ >> # Emit succinct information message describing current building step >> # $1 - generic step name (e.g., CC, LINK, etc); >> -- >> 2.33.7 >>
On Thu, 2023-04-27 at 11:28 -0700, Stanislav Fomichev wrote: > On 04/27, Alexey Gladkov wrote: > > The sign-file utility (from scripts/) is used in prog_tests/verify_pkcs7_sig.c, > > but the utility should not be called as a test. Executing this utility > > produces the following error: > > > > selftests: /linux/tools/testing/selftests/bpf: urandom_read > > ok 16 selftests: /linux/tools/testing/selftests/bpf: urandom_read > > > > selftests: /linux/tools/testing/selftests/bpf: sign-file > > not ok 17 selftests: /linux/tools/testing/selftests/bpf: sign-file # exit=2 > > > > Fixes: fc97590668ae ("selftests/bpf: Add test for bpf_verify_pkcs7_signature() kfunc") > > Signed-off-by: Alexey Gladkov <legion@kernel.org> > > Acked-by: Stanislav Fomichev <sdf@google.com> Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com> Thanks Roberto > > --- > > tools/testing/selftests/bpf/Makefile | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > > index b677dcd0b77a..fd214d1526d4 100644 > > --- a/tools/testing/selftests/bpf/Makefile > > +++ b/tools/testing/selftests/bpf/Makefile > > @@ -88,8 +88,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ > > xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \ > > xdp_features > > > > -TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file > > -TEST_GEN_FILES += liburandom_read.so > > +TEST_GEN_FILES += liburandom_read.so urandom_read sign-file > > > > # Emit succinct information message describing current building step > > # $1 - generic step name (e.g., CC, LINK, etc); > > -- > > 2.33.7 > >
On Thu, Apr 27, 2023 at 10:38:50PM +0200, Daniel Borkmann wrote: > On 4/27/23 8:28 PM, Stanislav Fomichev wrote: > > On 04/27, Alexey Gladkov wrote: > >> The sign-file utility (from scripts/) is used in prog_tests/verify_pkcs7_sig.c, > >> but the utility should not be called as a test. Executing this utility > >> produces the following error: > >> > >> selftests: /linux/tools/testing/selftests/bpf: urandom_read > >> ok 16 selftests: /linux/tools/testing/selftests/bpf: urandom_read > >> > >> selftests: /linux/tools/testing/selftests/bpf: sign-file > >> not ok 17 selftests: /linux/tools/testing/selftests/bpf: sign-file # exit=2 > >> > >> Fixes: fc97590668ae ("selftests/bpf: Add test for bpf_verify_pkcs7_signature() kfunc") > >> Signed-off-by: Alexey Gladkov <legion@kernel.org> > > > > Acked-by: Stanislav Fomichev <sdf@google.com> > > > >> tools/testing/selftests/bpf/Makefile | 3 +-- > >> 1 file changed, 1 insertion(+), 2 deletions(-) > >> > >> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > >> index b677dcd0b77a..fd214d1526d4 100644 > >> --- a/tools/testing/selftests/bpf/Makefile > >> +++ b/tools/testing/selftests/bpf/Makefile > >> @@ -88,8 +88,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ > >> xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \ > >> xdp_features > >> > >> -TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file > >> -TEST_GEN_FILES += liburandom_read.so > >> +TEST_GEN_FILES += liburandom_read.so urandom_read sign-file > > Given you move over both of them, the commit msg should be adapted accordingly > since it mainly talks about sign-file, less so about urandom_read. I mentioned urandom_read only in the example of output because this utility is less critical. Although it is mistakenly used as a test, it does not lead to an error. First I found sign-file and only then I noticed that urandom_read is not a test either. > Also now that you remove the TEST_CUSTOM_PROGS, we should probably also remove > the other two instances: > > tools/testing/selftests/bpf/Makefile:91:TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file My patch just changed it. > tools/testing/selftests/bpf/Makefile:156: $(TEST_CUSTOM_PROGS)): %: $(OUTPUT)/% ; > tools/testing/selftests/bpf/Makefile:674:EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(SCRATCH_DIR) $(HOST_SCRATCH_DIR) \ I thought about it. According to the documentation TEST_CUSTOM_PROGS should be used by tests that require custom build rule and common prevent build rule use. These rules provide a custom build of utilities. Therefore, I left it unchanged in case such tests actually appear. > >> # Emit succinct information message describing current building step > >> # $1 - generic step name (e.g., CC, LINK, etc); > >> -- > >> 2.33.7 > >> >
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index b677dcd0b77a..fd214d1526d4 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -88,8 +88,7 @@ TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata \ xdp_features -TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file -TEST_GEN_FILES += liburandom_read.so +TEST_GEN_FILES += liburandom_read.so urandom_read sign-file # Emit succinct information message describing current building step # $1 - generic step name (e.g., CC, LINK, etc);