* [PATCH v1] selftests/bpf: Do not use sign-file as testcase
@ 2023-04-27 14:59 Alexey Gladkov
2023-04-27 18:28 ` Stanislav Fomichev
2023-05-17 9:49 ` [RESEND PATCH " Alexey Gladkov
0 siblings, 2 replies; 7+ messages in thread
From: Alexey Gladkov @ 2023-04-27 14:59 UTC (permalink / raw)
To: LKML, bpf, linux-kselftest
Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann
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(-)
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1] selftests/bpf: Do not use sign-file as testcase
2023-04-27 14:59 [PATCH v1] selftests/bpf: Do not use sign-file as testcase Alexey Gladkov
@ 2023-04-27 18:28 ` Stanislav Fomichev
2023-04-27 20:38 ` Daniel Borkmann
2023-04-28 7:14 ` Roberto Sassu
2023-05-17 9:49 ` [RESEND PATCH " Alexey Gladkov
1 sibling, 2 replies; 7+ messages in thread
From: Stanislav Fomichev @ 2023-04-27 18:28 UTC (permalink / raw)
To: Alexey Gladkov
Cc: LKML, bpf, linux-kselftest, Alexei Starovoitov, Andrii Nakryiko,
Daniel Borkmann
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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] selftests/bpf: Do not use sign-file as testcase
2023-04-27 18:28 ` Stanislav Fomichev
@ 2023-04-27 20:38 ` Daniel Borkmann
2023-04-28 9:47 ` Alexey Gladkov
2023-04-28 7:14 ` Roberto Sassu
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2023-04-27 20:38 UTC (permalink / raw)
To: Stanislav Fomichev, Alexey Gladkov
Cc: LKML, bpf, linux-kselftest, Alexei Starovoitov, Andrii Nakryiko
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
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] selftests/bpf: Do not use sign-file as testcase
2023-04-27 18:28 ` Stanislav Fomichev
2023-04-27 20:38 ` Daniel Borkmann
@ 2023-04-28 7:14 ` Roberto Sassu
1 sibling, 0 replies; 7+ messages in thread
From: Roberto Sassu @ 2023-04-28 7:14 UTC (permalink / raw)
To: Stanislav Fomichev, Alexey Gladkov
Cc: LKML, bpf, linux-kselftest, Alexei Starovoitov, Andrii Nakryiko,
Daniel Borkmann
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
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] selftests/bpf: Do not use sign-file as testcase
2023-04-27 20:38 ` Daniel Borkmann
@ 2023-04-28 9:47 ` Alexey Gladkov
0 siblings, 0 replies; 7+ messages in thread
From: Alexey Gladkov @ 2023-04-28 9:47 UTC (permalink / raw)
To: Daniel Borkmann
Cc: Stanislav Fomichev, LKML, bpf, linux-kselftest,
Alexei Starovoitov, Andrii Nakryiko
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
> >>
>
--
Rgrds, legion
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RESEND PATCH v1] selftests/bpf: Do not use sign-file as testcase
2023-04-27 14:59 [PATCH v1] selftests/bpf: Do not use sign-file as testcase Alexey Gladkov
2023-04-27 18:28 ` Stanislav Fomichev
@ 2023-05-17 9:49 ` Alexey Gladkov
2023-05-17 14:10 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 7+ messages in thread
From: Alexey Gladkov @ 2023-05-17 9:49 UTC (permalink / raw)
To: LKML, Alexei Starovoitov, bpf, linux-kselftest
Cc: Andrii Nakryiko, Daniel Borkmann, Roberto Sassu, Stanislav Fomichev
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")
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Acked-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexey Gladkov <legion@kernel.org>
---
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.8
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH v1] selftests/bpf: Do not use sign-file as testcase
2023-05-17 9:49 ` [RESEND PATCH " Alexey Gladkov
@ 2023-05-17 14:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-17 14:10 UTC (permalink / raw)
To: Alexey Gladkov
Cc: linux-kernel, ast, bpf, linux-kselftest, andrii, daniel,
roberto.sassu, sdf
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Wed, 17 May 2023 11:49:46 +0200 you 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
>
> [...]
Here is the summary with links:
- [RESEND,v1] selftests/bpf: Do not use sign-file as testcase
https://git.kernel.org/bpf/bpf-next/c/f04a32b2c5b5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-17 14:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27 14:59 [PATCH v1] selftests/bpf: Do not use sign-file as testcase Alexey Gladkov
2023-04-27 18:28 ` Stanislav Fomichev
2023-04-27 20:38 ` Daniel Borkmann
2023-04-28 9:47 ` Alexey Gladkov
2023-04-28 7:14 ` Roberto Sassu
2023-05-17 9:49 ` [RESEND PATCH " Alexey Gladkov
2023-05-17 14:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).