public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH next 0/3] Connector/proc_filter test fixes
@ 2023-07-28 17:29 Shuah Khan
  2023-07-28 17:29 ` [PATCH next 1/3] selftests:connector: Fix Makefile to include KHDR_INCLUDES Shuah Khan
  2023-07-31 21:50 ` [PATCH next 0/3] Connector/proc_filter test fixes patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Shuah Khan @ 2023-07-28 17:29 UTC (permalink / raw)
  To: shuah, Liam.Howlett, anjali.k.kulkarni, naresh.kamboju, kuba
  Cc: Shuah Khan, davem, lkft-triage, netdev, llvm, linux-kselftest,
	linux-kernel

This 3 patch series consists of fixes to proc_filter test
found during linun-next testing.

The first patch fixes the LKFT reported compile error, second
one adds .gitignore and the third fixes error paths to skip
instead of fail (root check, and argument checks)

Shuah Khan (3):
  selftests:connector: Fix Makefile to include KHDR_INCLUDES
  selftests:connector: Add .gitignore and poupulate it with test
  selftests:connector: Add root check and fix arg error paths to skip

 tools/testing/selftests/connector/.gitignore    | 1 +
 tools/testing/selftests/connector/Makefile      | 2 +-
 tools/testing/selftests/connector/proc_filter.c | 9 +++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/connector/.gitignore

-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH next 1/3] selftests:connector: Fix Makefile to include KHDR_INCLUDES
  2023-07-28 17:29 [PATCH next 0/3] Connector/proc_filter test fixes Shuah Khan
@ 2023-07-28 17:29 ` Shuah Khan
  2023-07-31 21:55   ` Anjali Kulkarni
  2023-07-31 21:50 ` [PATCH next 0/3] Connector/proc_filter test fixes patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Shuah Khan @ 2023-07-28 17:29 UTC (permalink / raw)
  To: shuah, Liam.Howlett, anjali.k.kulkarni, naresh.kamboju, kuba
  Cc: Shuah Khan, davem, lkft-triage, netdev, llvm, linux-kselftest,
	linux-kernel

The test compile fails with following errors. Fix the Makefile
CFLAGS to include KHDR_INCLUDES to pull in uapi defines.

gcc -Wall     proc_filter.c  -o ../tools/testing/selftests/connector/proc_filter
proc_filter.c: In function ‘send_message’:
proc_filter.c:22:33: error: invalid application of ‘sizeof’ to incomplete type ‘struct proc_input’
   22 |                          sizeof(struct proc_input))
      |                                 ^~~~~~
proc_filter.c:42:19: note: in expansion of macro ‘NL_MESSAGE_SIZE’
   42 |         char buff[NL_MESSAGE_SIZE];
      |                   ^~~~~~~~~~~~~~~
proc_filter.c:22:33: error: invalid application of ‘sizeof’ to incomplete type ‘struct proc_input’
   22 |                          sizeof(struct proc_input))
      |                                 ^~~~~~
proc_filter.c:48:34: note: in expansion of macro ‘NL_MESSAGE_SIZE’
   48 |                 hdr->nlmsg_len = NL_MESSAGE_SIZE;
      |                                  ^~~~~~~~~~~~~~~
`

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Link: https://lore.kernel.org/all/CA+G9fYt=6ysz636XcQ=-KJp7vJcMZ=NjbQBrn77v7vnTcfP2cA@mail.gmail.com/
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
---
 tools/testing/selftests/connector/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/connector/Makefile b/tools/testing/selftests/connector/Makefile
index 21c9f3a973a0..92188b9bac5c 100644
--- a/tools/testing/selftests/connector/Makefile
+++ b/tools/testing/selftests/connector/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
-CFLAGS += -Wall
+CFLAGS += -Wall $(KHDR_INCLUDES)
 
 TEST_GEN_PROGS = proc_filter
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH next 0/3] Connector/proc_filter test fixes
  2023-07-28 17:29 [PATCH next 0/3] Connector/proc_filter test fixes Shuah Khan
  2023-07-28 17:29 ` [PATCH next 1/3] selftests:connector: Fix Makefile to include KHDR_INCLUDES Shuah Khan
@ 2023-07-31 21:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-31 21:50 UTC (permalink / raw)
  To: Shuah Khan
  Cc: shuah, Liam.Howlett, anjali.k.kulkarni, naresh.kamboju, kuba,
	davem, lkft-triage, netdev, llvm, linux-kselftest, linux-kernel

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 28 Jul 2023 11:29:25 -0600 you wrote:
> This 3 patch series consists of fixes to proc_filter test
> found during linun-next testing.
> 
> The first patch fixes the LKFT reported compile error, second
> one adds .gitignore and the third fixes error paths to skip
> instead of fail (root check, and argument checks)
> 
> [...]

Here is the summary with links:
  - [next,1/3] selftests:connector: Fix Makefile to include KHDR_INCLUDES
    https://git.kernel.org/netdev/net-next/c/165f6890586e
  - [next,2/3] selftests:connector: Add .gitignore and poupulate it with test
    https://git.kernel.org/netdev/net-next/c/f4dcfa6fa1a8

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] 4+ messages in thread

* Re: [PATCH next 1/3] selftests:connector: Fix Makefile to include KHDR_INCLUDES
  2023-07-28 17:29 ` [PATCH next 1/3] selftests:connector: Fix Makefile to include KHDR_INCLUDES Shuah Khan
@ 2023-07-31 21:55   ` Anjali Kulkarni
  0 siblings, 0 replies; 4+ messages in thread
From: Anjali Kulkarni @ 2023-07-31 21:55 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Shuah Khan, Liam Howlett, naresh.kamboju@linaro.org,
	kuba@kernel.org, davem@davemloft.net,
	lkft-triage@lists.linaro.org, netdev@vger.kernel.org,
	llvm@lists.linux.dev, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org



> On Jul 28, 2023, at 10:29 AM, Shuah Khan <skhan@linuxfoundation.org> wrote:
> 
> The test compile fails with following errors. Fix the Makefile
> CFLAGS to include KHDR_INCLUDES to pull in uapi defines.
> 
> gcc -Wall     proc_filter.c  -o ../tools/testing/selftests/connector/proc_filter
> proc_filter.c: In function ‘send_message’:
> proc_filter.c:22:33: error: invalid application of ‘sizeof’ to incomplete type ‘struct proc_input’
>   22 |                          sizeof(struct proc_input))
>      |                                 ^~~~~~
> proc_filter.c:42:19: note: in expansion of macro ‘NL_MESSAGE_SIZE’
>   42 |         char buff[NL_MESSAGE_SIZE];
>      |                   ^~~~~~~~~~~~~~~
> proc_filter.c:22:33: error: invalid application of ‘sizeof’ to incomplete type ‘struct proc_input’
>   22 |                          sizeof(struct proc_input))
>      |                                 ^~~~~~
> proc_filter.c:48:34: note: in expansion of macro ‘NL_MESSAGE_SIZE’
>   48 |                 hdr->nlmsg_len = NL_MESSAGE_SIZE;
>      |                                  ^~~~~~~~~~~~~~~
> `
> 
> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> Link: https://urldefense.com/v3/__https://lore.kernel.org/all/CA*G9fYt=6ysz636XcQ=-KJp7vJcMZ=NjbQBrn77v7vnTcfP2cA@mail.gmail.com/__;Kw!!ACWV5N9M2RV99hQ!LJI4riV83FdITmzoXmCfxlHKGSeevxg-wn6_ISa7txpETYWPxbtVkAtxSg6IZGi3k5oh2BKMyrbn9464kchHYnuqPEaU$ 
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

Reviewed-by: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>

> ---
> tools/testing/selftests/connector/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/connector/Makefile b/tools/testing/selftests/connector/Makefile
> index 21c9f3a973a0..92188b9bac5c 100644
> --- a/tools/testing/selftests/connector/Makefile
> +++ b/tools/testing/selftests/connector/Makefile
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0
> -CFLAGS += -Wall
> +CFLAGS += -Wall $(KHDR_INCLUDES)
> 
> TEST_GEN_PROGS = proc_filter
> 
> -- 
> 2.39.2
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-31 21:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 17:29 [PATCH next 0/3] Connector/proc_filter test fixes Shuah Khan
2023-07-28 17:29 ` [PATCH next 1/3] selftests:connector: Fix Makefile to include KHDR_INCLUDES Shuah Khan
2023-07-31 21:55   ` Anjali Kulkarni
2023-07-31 21:50 ` [PATCH next 0/3] Connector/proc_filter test fixes 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