* selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input'
@ 2023-07-25 13:05 Naresh Kamboju
2023-07-25 16:48 ` Anjali Kulkarni
0 siblings, 1 reply; 11+ messages in thread
From: Naresh Kamboju @ 2023-07-25 13:05 UTC (permalink / raw)
To: open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage,
Netdev, clang-built-linux
Cc: Anjali Kulkarni, Shuah Khan, Anders Roxell, David S. Miller,
Liam R. Howlett
selftests: connector: proc_filter build failed with clang-16 due to below
warnings / errors on Linux next-20230725.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
clang --target=aarch64-linux-gnu -fintegrated-as
-Werror=unknown-warning-option -Werror=ignored-optimization-argument
-Werror=option-ignored -Werror=unused-command-line-argument
--target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o
/home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter
proc_filter.c:42:12: error: invalid application of 'sizeof' to an
incomplete type 'struct proc_input'
char buff[NL_MESSAGE_SIZE];
^~~~~~~~~~~~~~~
proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^ ~~~~~~~~~~~~~~~~~~~
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^
proc_filter.c:48:20: error: invalid application of 'sizeof' to an
incomplete type 'struct proc_input'
hdr->nlmsg_len = NL_MESSAGE_SIZE;
^~~~~~~~~~~~~~~
proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^ ~~~~~~~~~~~~~~~~~~~
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
char buff[NL_MESSAGE_SIZE];
^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^
proc_filter.c:64:14: error: invalid application of 'sizeof' to an
incomplete type 'struct proc_input'
msg->len = sizeof(struct proc_input);
^ ~~~~~~~~~~~~~~~~~~~
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
char buff[NL_MESSAGE_SIZE];
^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^
proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input'
((struct proc_input *)msg->data)->mcast_op =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
char buff[NL_MESSAGE_SIZE];
^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^
proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input'
((struct proc_input *)pinp)->mcast_op;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
char buff[NL_MESSAGE_SIZE];
^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^
proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input'
((struct proc_input *)msg->data)->event_type =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
char buff[NL_MESSAGE_SIZE];
^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^
proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input'
((struct proc_input *)pinp)->event_type;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
proc_filter.c:42:12: note: forward declaration of 'struct proc_input'
char buff[NL_MESSAGE_SIZE];
^
proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE'
sizeof(struct proc_input))
^
proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input'
struct proc_input input;
^
proc_filter.c:245:9: note: forward declaration of 'struct proc_input'
struct proc_input input;
^
proc_filter.c:264:22: error: use of undeclared identifier
'PROC_EVENT_NONZERO_EXIT'
input.event_type = PROC_EVENT_NONZERO_EXIT;
^
9 errors generated.
make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector'
Links:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/
steps to reproduce:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/tuxmake_reproducer.sh
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-25 13:05 selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' Naresh Kamboju @ 2023-07-25 16:48 ` Anjali Kulkarni 2023-07-27 17:34 ` Anjali Kulkarni 0 siblings, 1 reply; 11+ messages in thread From: Anjali Kulkarni @ 2023-07-25 16:48 UTC (permalink / raw) To: Naresh Kamboju Cc: open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett > On Jul 25, 2023, at 6:05 AM, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: > > selftests: connector: proc_filter build failed with clang-16 due to below > warnings / errors on Linux next-20230725. > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > clang --target=aarch64-linux-gnu -fintegrated-as > -Werror=unknown-warning-option -Werror=ignored-optimization-argument > -Werror=option-ignored -Werror=unused-command-line-argument > --target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o > /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter > proc_filter.c:42:12: error: invalid application of 'sizeof' to an > incomplete type 'struct proc_input' > char buff[NL_MESSAGE_SIZE]; > ^~~~~~~~~~~~~~~ > proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ ~~~~~~~~~~~~~~~~~~~ > proc_filter.c:42:12: note: forward declaration of 'struct proc_input' > proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ > proc_filter.c:48:20: error: invalid application of 'sizeof' to an > incomplete type 'struct proc_input' > hdr->nlmsg_len = NL_MESSAGE_SIZE; > ^~~~~~~~~~~~~~~ > proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ ~~~~~~~~~~~~~~~~~~~ > proc_filter.c:42:12: note: forward declaration of 'struct proc_input' > char buff[NL_MESSAGE_SIZE]; > ^ > proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ > proc_filter.c:64:14: error: invalid application of 'sizeof' to an > incomplete type 'struct proc_input' > msg->len = sizeof(struct proc_input); > ^ ~~~~~~~~~~~~~~~~~~~ > proc_filter.c:42:12: note: forward declaration of 'struct proc_input' > char buff[NL_MESSAGE_SIZE]; > ^ > proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ > proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input' > ((struct proc_input *)msg->data)->mcast_op = > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ > proc_filter.c:42:12: note: forward declaration of 'struct proc_input' > char buff[NL_MESSAGE_SIZE]; > ^ > proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ > proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input' > ((struct proc_input *)pinp)->mcast_op; > ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ > proc_filter.c:42:12: note: forward declaration of 'struct proc_input' > char buff[NL_MESSAGE_SIZE]; > ^ > proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ > proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input' > ((struct proc_input *)msg->data)->event_type = > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ > proc_filter.c:42:12: note: forward declaration of 'struct proc_input' > char buff[NL_MESSAGE_SIZE]; > ^ > proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ > proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input' > ((struct proc_input *)pinp)->event_type; > ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ > proc_filter.c:42:12: note: forward declaration of 'struct proc_input' > char buff[NL_MESSAGE_SIZE]; > ^ > proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' > sizeof(struct proc_input)) > ^ > proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input' > struct proc_input input; > ^ > proc_filter.c:245:9: note: forward declaration of 'struct proc_input' > struct proc_input input; > ^ > proc_filter.c:264:22: error: use of undeclared identifier > 'PROC_EVENT_NONZERO_EXIT' > input.event_type = PROC_EVENT_NONZERO_EXIT; > ^ > 9 errors generated. > make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector’ > > These are expected since you need to have the changes in kernel that were committed with this patch to be installed on the kernel on which this is being compiled/run on. That is what the test is for, and the check to make it run on previous kernels as well was made a runtime check. Do you expect this to compile on a kernel without the corresponding kernel changes that were committed with this patch? Anjali > > Links: > - https://urldefense.com/v3/__https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/__;!!ACWV5N9M2RV99hQ!KGpNLNgF9TB1Di6vnsIBKgjQbqYyghUqeNr4q4xMl0uGesYONZ7h5Gl26vUL62nVt-9YTJmiyE6cwUM7sAjAWYIVKZNKvMYc$ > > steps to reproduce: > - https://urldefense.com/v3/__https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/tuxmake_reproducer.sh__;!!ACWV5N9M2RV99hQ!KGpNLNgF9TB1Di6vnsIBKgjQbqYyghUqeNr4q4xMl0uGesYONZ7h5Gl26vUL62nVt-9YTJmiyE6cwUM7sAjAWYIVKSfQKbzK$ > -- > Linaro LKFT > https://urldefense.com/v3/__https://lkft.linaro.org__;!!ACWV5N9M2RV99hQ!KGpNLNgF9TB1Di6vnsIBKgjQbqYyghUqeNr4q4xMl0uGesYONZ7h5Gl26vUL62nVt-9YTJmiyE6cwUM7sAjAWYIVKYlwlLOK$ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-25 16:48 ` Anjali Kulkarni @ 2023-07-27 17:34 ` Anjali Kulkarni 2023-07-28 0:43 ` Shuah Khan 0 siblings, 1 reply; 11+ messages in thread From: Anjali Kulkarni @ 2023-07-27 17:34 UTC (permalink / raw) To: Naresh Kamboju Cc: open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett > On Jul 25, 2023, at 9:48 AM, Anjali Kulkarni <Anjali.K.Kulkarni@oracle.com> wrote: > > > >> On Jul 25, 2023, at 6:05 AM, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: >> >> selftests: connector: proc_filter build failed with clang-16 due to below >> warnings / errors on Linux next-20230725. >> >> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >> >> clang --target=aarch64-linux-gnu -fintegrated-as >> -Werror=unknown-warning-option -Werror=ignored-optimization-argument >> -Werror=option-ignored -Werror=unused-command-line-argument >> --target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o >> /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter >> proc_filter.c:42:12: error: invalid application of 'sizeof' to an >> incomplete type 'struct proc_input' >> char buff[NL_MESSAGE_SIZE]; >> ^~~~~~~~~~~~~~~ >> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ ~~~~~~~~~~~~~~~~~~~ >> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ >> proc_filter.c:48:20: error: invalid application of 'sizeof' to an >> incomplete type 'struct proc_input' >> hdr->nlmsg_len = NL_MESSAGE_SIZE; >> ^~~~~~~~~~~~~~~ >> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ ~~~~~~~~~~~~~~~~~~~ >> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >> char buff[NL_MESSAGE_SIZE]; >> ^ >> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ >> proc_filter.c:64:14: error: invalid application of 'sizeof' to an >> incomplete type 'struct proc_input' >> msg->len = sizeof(struct proc_input); >> ^ ~~~~~~~~~~~~~~~~~~~ >> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >> char buff[NL_MESSAGE_SIZE]; >> ^ >> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ >> proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input' >> ((struct proc_input *)msg->data)->mcast_op = >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >> char buff[NL_MESSAGE_SIZE]; >> ^ >> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ >> proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input' >> ((struct proc_input *)pinp)->mcast_op; >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >> char buff[NL_MESSAGE_SIZE]; >> ^ >> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ >> proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input' >> ((struct proc_input *)msg->data)->event_type = >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >> char buff[NL_MESSAGE_SIZE]; >> ^ >> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ >> proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input' >> ((struct proc_input *)pinp)->event_type; >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >> char buff[NL_MESSAGE_SIZE]; >> ^ >> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >> sizeof(struct proc_input)) >> ^ >> proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input' >> struct proc_input input; >> ^ >> proc_filter.c:245:9: note: forward declaration of 'struct proc_input' >> struct proc_input input; >> ^ >> proc_filter.c:264:22: error: use of undeclared identifier >> 'PROC_EVENT_NONZERO_EXIT' >> input.event_type = PROC_EVENT_NONZERO_EXIT; >> ^ >> 9 errors generated. >> make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector’ >> >> > These are expected since you need to have the changes in kernel that were committed with this patch to be installed on the kernel on which this is being compiled/run on. That is what the test is for, and the check to make it run on previous kernels as well was made a runtime check. Do you expect this to compile on a kernel without the corresponding kernel changes that were committed with this patch? > > Anjali Gentle ping - could you answer above questions? > >> >> Links: >> - https://urldefense.com/v3/__https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/__;!!ACWV5N9M2RV99hQ!KGpNLNgF9TB1Di6vnsIBKgjQbqYyghUqeNr4q4xMl0uGesYONZ7h5Gl26vUL62nVt-9YTJmiyE6cwUM7sAjAWYIVKZNKvMYc$ >> >> steps to reproduce: >> - https://urldefense.com/v3/__https://storage.tuxsuite.com/public/linaro/lkft/builds/2T3676HpK243gMBLYJCp4OXDmWl/tuxmake_reproducer.sh__;!!ACWV5N9M2RV99hQ!KGpNLNgF9TB1Di6vnsIBKgjQbqYyghUqeNr4q4xMl0uGesYONZ7h5Gl26vUL62nVt-9YTJmiyE6cwUM7sAjAWYIVKSfQKbzK$ >> -- >> Linaro LKFT >> https://urldefense.com/v3/__https://lkft.linaro.org__;!!ACWV5N9M2RV99hQ!KGpNLNgF9TB1Di6vnsIBKgjQbqYyghUqeNr4q4xMl0uGesYONZ7h5Gl26vUL62nVt-9YTJmiyE6cwUM7sAjAWYIVKYlwlLOK$ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-27 17:34 ` Anjali Kulkarni @ 2023-07-28 0:43 ` Shuah Khan 2023-07-28 1:38 ` Anjali Kulkarni 0 siblings, 1 reply; 11+ messages in thread From: Shuah Khan @ 2023-07-28 0:43 UTC (permalink / raw) To: Anjali Kulkarni, Naresh Kamboju Cc: open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett, Shuah Khan On 7/27/23 11:34, Anjali Kulkarni wrote: > > >> On Jul 25, 2023, at 9:48 AM, Anjali Kulkarni <Anjali.K.Kulkarni@oracle.com> wrote: >> >> >> >>> On Jul 25, 2023, at 6:05 AM, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: >>> >>> selftests: connector: proc_filter build failed with clang-16 due to below >>> warnings / errors on Linux next-20230725. >>> >>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >>> >>> clang --target=aarch64-linux-gnu -fintegrated-as >>> -Werror=unknown-warning-option -Werror=ignored-optimization-argument >>> -Werror=option-ignored -Werror=unused-command-line-argument >>> --target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o >>> /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter >>> proc_filter.c:42:12: error: invalid application of 'sizeof' to an >>> incomplete type 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^~~~~~~~~~~~~~~ >>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ ~~~~~~~~~~~~~~~~~~~ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:48:20: error: invalid application of 'sizeof' to an >>> incomplete type 'struct proc_input' >>> hdr->nlmsg_len = NL_MESSAGE_SIZE; >>> ^~~~~~~~~~~~~~~ >>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ ~~~~~~~~~~~~~~~~~~~ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:64:14: error: invalid application of 'sizeof' to an >>> incomplete type 'struct proc_input' >>> msg->len = sizeof(struct proc_input); >>> ^ ~~~~~~~~~~~~~~~~~~~ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)msg->data)->mcast_op = >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)pinp)->mcast_op; >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)msg->data)->event_type = >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input' >>> ((struct proc_input *)pinp)->event_type; >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>> char buff[NL_MESSAGE_SIZE]; >>> ^ >>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>> sizeof(struct proc_input)) >>> ^ >>> proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input' >>> struct proc_input input; >>> ^ >>> proc_filter.c:245:9: note: forward declaration of 'struct proc_input' >>> struct proc_input input; >>> ^ >>> proc_filter.c:264:22: error: use of undeclared identifier >>> 'PROC_EVENT_NONZERO_EXIT' >>> input.event_type = PROC_EVENT_NONZERO_EXIT; >>> ^ >>> 9 errors generated. >>> make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector’ >>> >>> >> These are expected since you need to have the changes in kernel that were committed with this patch to be installed on the kernel on which this is being compiled/run on. That is what the test is for, and the check to make it run on previous kernels as well was made a runtime check. Do you expect this to compile on a kernel without the corresponding kernel changes that were committed with this patch? >> >> Anjali > > Gentle ping - could you answer above questions? >> I am seeing the same on linux-next next-20230727 PROC_EVENT_NONZERO_EXIT is defined and NL_MESSAGE_SIZE Anjali, What are the dependent commits and should they be in next? Shouldn't this test patch go with the kernel patches it depends on? Can you do some testing on next and let me know why this test is failing to build? It is failing for me for sure. There could be problem in the test Makefile that it isn't including the right headers. thanks, -- Shuah thanks, -- Shuah ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-28 0:43 ` Shuah Khan @ 2023-07-28 1:38 ` Anjali Kulkarni 2023-07-28 2:43 ` Jakub Kicinski 2023-07-28 17:33 ` Shuah Khan 0 siblings, 2 replies; 11+ messages in thread From: Anjali Kulkarni @ 2023-07-28 1:38 UTC (permalink / raw) To: Shuah Khan Cc: Naresh Kamboju, open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett, Jakub Kicinski > On Jul 27, 2023, at 5:43 PM, Shuah Khan <skhan@linuxfoundation.org> wrote: > > On 7/27/23 11:34, Anjali Kulkarni wrote: >>> On Jul 25, 2023, at 9:48 AM, Anjali Kulkarni <Anjali.K.Kulkarni@oracle.com> wrote: >>> >>> >>> >>>> On Jul 25, 2023, at 6:05 AM, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: >>>> >>>> selftests: connector: proc_filter build failed with clang-16 due to below >>>> warnings / errors on Linux next-20230725. >>>> >>>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >>>> >>>> clang --target=aarch64-linux-gnu -fintegrated-as >>>> -Werror=unknown-warning-option -Werror=ignored-optimization-argument >>>> -Werror=option-ignored -Werror=unused-command-line-argument >>>> --target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o >>>> /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter >>>> proc_filter.c:42:12: error: invalid application of 'sizeof' to an >>>> incomplete type 'struct proc_input' >>>> char buff[NL_MESSAGE_SIZE]; >>>> ^~~~~~~~~~~~~~~ >>>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ >>>> proc_filter.c:48:20: error: invalid application of 'sizeof' to an >>>> incomplete type 'struct proc_input' >>>> hdr->nlmsg_len = NL_MESSAGE_SIZE; >>>> ^~~~~~~~~~~~~~~ >>>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>> char buff[NL_MESSAGE_SIZE]; >>>> ^ >>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ >>>> proc_filter.c:64:14: error: invalid application of 'sizeof' to an >>>> incomplete type 'struct proc_input' >>>> msg->len = sizeof(struct proc_input); >>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>> char buff[NL_MESSAGE_SIZE]; >>>> ^ >>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ >>>> proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input' >>>> ((struct proc_input *)msg->data)->mcast_op = >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>> char buff[NL_MESSAGE_SIZE]; >>>> ^ >>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ >>>> proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input' >>>> ((struct proc_input *)pinp)->mcast_op; >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>> char buff[NL_MESSAGE_SIZE]; >>>> ^ >>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ >>>> proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input' >>>> ((struct proc_input *)msg->data)->event_type = >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>> char buff[NL_MESSAGE_SIZE]; >>>> ^ >>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ >>>> proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input' >>>> ((struct proc_input *)pinp)->event_type; >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>> char buff[NL_MESSAGE_SIZE]; >>>> ^ >>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>> sizeof(struct proc_input)) >>>> ^ >>>> proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input' >>>> struct proc_input input; >>>> ^ >>>> proc_filter.c:245:9: note: forward declaration of 'struct proc_input' >>>> struct proc_input input; >>>> ^ >>>> proc_filter.c:264:22: error: use of undeclared identifier >>>> 'PROC_EVENT_NONZERO_EXIT' >>>> input.event_type = PROC_EVENT_NONZERO_EXIT; >>>> ^ >>>> 9 errors generated. >>>> make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector’ >>>> >>>> >>> These are expected since you need to have the changes in kernel that were committed with this patch to be installed on the kernel on which this is being compiled/run on. That is what the test is for, and the check to make it run on previous kernels as well was made a runtime check. Do you expect this to compile on a kernel without the corresponding kernel changes that were committed with this patch? >>> >>> Anjali >> Gentle ping - could you answer above questions? >>> > > I am seeing the same on linux-next next-20230727 > > PROC_EVENT_NONZERO_EXIT is defined and NL_MESSAGE_SIZE > > Anjali, > > What are the dependent commits and should they be in next? > Shouldn't this test patch go with the kernel patches it depends > on? Can you do some testing on next and let me know why this > test is failing to build? All the commits went in together - however, the kernel changes that went in this patch need to be *installed on kernel on which this is being built*. Did you do that and then try? Jakub, Do I need to revert the -f runtime filter option back to compile time and commit with that disabled so the selftest compiles on a kernel on which the new options are not defined? Anjali > > It is failing for me for sure. > > There could be problem in the test Makefile that it isn't including > the right headers. > > thanks, > -- Shuah > > thanks, > -- Shuah ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-28 1:38 ` Anjali Kulkarni @ 2023-07-28 2:43 ` Jakub Kicinski 2023-07-28 16:46 ` Anjali Kulkarni 2023-07-28 17:33 ` Shuah Khan 1 sibling, 1 reply; 11+ messages in thread From: Jakub Kicinski @ 2023-07-28 2:43 UTC (permalink / raw) To: Anjali Kulkarni Cc: Shuah Khan, Naresh Kamboju, open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett On Fri, 28 Jul 2023 01:38:40 +0000 Anjali Kulkarni wrote: > Jakub, > Do I need to revert the -f runtime filter option back to compile time > and commit with that disabled so the selftest compiles on a kernel on > which the new options are not defined? I'm not 100% sure myself on what's the expectations for building selftests against uAPI headers is.. I _think_ that you're supposed to add an -I$something to the CFLAGS in your Makefile. KHDR_INCLUDES maybe? So that the uAPI headers from the build get used (rendered by make headers). Take a look at Documentation/dev-tools/kselftest.rst, I hope the answer is somewhere there. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-28 2:43 ` Jakub Kicinski @ 2023-07-28 16:46 ` Anjali Kulkarni 2023-07-28 17:34 ` Shuah Khan 0 siblings, 1 reply; 11+ messages in thread From: Anjali Kulkarni @ 2023-07-28 16:46 UTC (permalink / raw) To: Jakub Kicinski Cc: Shuah Khan, Naresh Kamboju, open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett > On Jul 27, 2023, at 7:43 PM, Jakub Kicinski <kuba@kernel.org> wrote: > > On Fri, 28 Jul 2023 01:38:40 +0000 Anjali Kulkarni wrote: >> Jakub, >> Do I need to revert the -f runtime filter option back to compile time >> and commit with that disabled so the selftest compiles on a kernel on >> which the new options are not defined? > > I'm not 100% sure myself on what's the expectations for building > selftests against uAPI headers is.. > > I _think_ that you're supposed to add an -I$something to > the CFLAGS in your Makefile. KHDR_INCLUDES maybe? So that the uAPI > headers from the build get used (rendered by make headers). > > Take a look at Documentation/dev-tools/kselftest.rst, I hope > the answer is somewhere there. Ok thanks, I will look into your suggestions. Anjali ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-28 16:46 ` Anjali Kulkarni @ 2023-07-28 17:34 ` Shuah Khan 2023-07-28 18:08 ` Anjali Kulkarni 0 siblings, 1 reply; 11+ messages in thread From: Shuah Khan @ 2023-07-28 17:34 UTC (permalink / raw) To: Anjali Kulkarni, Jakub Kicinski Cc: Naresh Kamboju, open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett, Shuah Khan On 7/28/23 10:46, Anjali Kulkarni wrote: > > >> On Jul 27, 2023, at 7:43 PM, Jakub Kicinski <kuba@kernel.org> wrote: >> >> On Fri, 28 Jul 2023 01:38:40 +0000 Anjali Kulkarni wrote: >>> Jakub, >>> Do I need to revert the -f runtime filter option back to compile time >>> and commit with that disabled so the selftest compiles on a kernel on >>> which the new options are not defined? >> >> I'm not 100% sure myself on what's the expectations for building >> selftests against uAPI headers is.. >> >> I _think_ that you're supposed to add an -I$something to >> the CFLAGS in your Makefile. KHDR_INCLUDES maybe? So that the uAPI >> headers from the build get used (rendered by make headers). >> >> Take a look at Documentation/dev-tools/kselftest.rst, I hope >> the answer is somewhere there. > Ok thanks, I will look into your suggestions. > Anjali > I sent a 3 patch series with the fix to this problem and a couple of others I found during testing. thanks, -- Shuah ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-28 17:34 ` Shuah Khan @ 2023-07-28 18:08 ` Anjali Kulkarni 0 siblings, 0 replies; 11+ messages in thread From: Anjali Kulkarni @ 2023-07-28 18:08 UTC (permalink / raw) To: Shuah Khan Cc: Jakub Kicinski, Naresh Kamboju, open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett > On Jul 28, 2023, at 10:34 AM, Shuah Khan <skhan@linuxfoundation.org> wrote: > > On 7/28/23 10:46, Anjali Kulkarni wrote: >>> On Jul 27, 2023, at 7:43 PM, Jakub Kicinski <kuba@kernel.org> wrote: >>> >>> On Fri, 28 Jul 2023 01:38:40 +0000 Anjali Kulkarni wrote: >>>> Jakub, >>>> Do I need to revert the -f runtime filter option back to compile time >>>> and commit with that disabled so the selftest compiles on a kernel on >>>> which the new options are not defined? >>> >>> I'm not 100% sure myself on what's the expectations for building >>> selftests against uAPI headers is.. >>> >>> I _think_ that you're supposed to add an -I$something to >>> the CFLAGS in your Makefile. KHDR_INCLUDES maybe? So that the uAPI >>> headers from the build get used (rendered by make headers). >>> >>> Take a look at Documentation/dev-tools/kselftest.rst, I hope >>> the answer is somewhere there. >> Ok thanks, I will look into your suggestions. >> Anjali > > I sent a 3 patch series with the fix to this problem and a couple of > others I found during testing. > I was just about to send the fix, but thanks. Anjali > thanks, > -- Shuah ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-28 1:38 ` Anjali Kulkarni 2023-07-28 2:43 ` Jakub Kicinski @ 2023-07-28 17:33 ` Shuah Khan 2023-07-28 18:13 ` Anjali Kulkarni 1 sibling, 1 reply; 11+ messages in thread From: Shuah Khan @ 2023-07-28 17:33 UTC (permalink / raw) To: Anjali Kulkarni, Jakub Kicinski Cc: Naresh Kamboju, open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett, Shuah Khan On 7/27/23 19:38, Anjali Kulkarni wrote: > > >> On Jul 27, 2023, at 5:43 PM, Shuah Khan <skhan@linuxfoundation.org> wrote: >> >> On 7/27/23 11:34, Anjali Kulkarni wrote: >>>> On Jul 25, 2023, at 9:48 AM, Anjali Kulkarni <Anjali.K.Kulkarni@oracle.com> wrote: >>>> >>>> >>>> >>>>> On Jul 25, 2023, at 6:05 AM, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: >>>>> >>>>> selftests: connector: proc_filter build failed with clang-16 due to below >>>>> warnings / errors on Linux next-20230725. >>>>> >>>>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >>>>> >>>>> clang --target=aarch64-linux-gnu -fintegrated-as >>>>> -Werror=unknown-warning-option -Werror=ignored-optimization-argument >>>>> -Werror=option-ignored -Werror=unused-command-line-argument >>>>> --target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o >>>>> /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter >>>>> proc_filter.c:42:12: error: invalid application of 'sizeof' to an >>>>> incomplete type 'struct proc_input' >>>>> char buff[NL_MESSAGE_SIZE]; >>>>> ^~~~~~~~~~~~~~~ >>>>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ >>>>> proc_filter.c:48:20: error: invalid application of 'sizeof' to an >>>>> incomplete type 'struct proc_input' >>>>> hdr->nlmsg_len = NL_MESSAGE_SIZE; >>>>> ^~~~~~~~~~~~~~~ >>>>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>> char buff[NL_MESSAGE_SIZE]; >>>>> ^ >>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ >>>>> proc_filter.c:64:14: error: invalid application of 'sizeof' to an >>>>> incomplete type 'struct proc_input' >>>>> msg->len = sizeof(struct proc_input); >>>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>> char buff[NL_MESSAGE_SIZE]; >>>>> ^ >>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ >>>>> proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input' >>>>> ((struct proc_input *)msg->data)->mcast_op = >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>> char buff[NL_MESSAGE_SIZE]; >>>>> ^ >>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ >>>>> proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input' >>>>> ((struct proc_input *)pinp)->mcast_op; >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>> char buff[NL_MESSAGE_SIZE]; >>>>> ^ >>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ >>>>> proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input' >>>>> ((struct proc_input *)msg->data)->event_type = >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>> char buff[NL_MESSAGE_SIZE]; >>>>> ^ >>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ >>>>> proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input' >>>>> ((struct proc_input *)pinp)->event_type; >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>> char buff[NL_MESSAGE_SIZE]; >>>>> ^ >>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>> sizeof(struct proc_input)) >>>>> ^ >>>>> proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input' >>>>> struct proc_input input; >>>>> ^ >>>>> proc_filter.c:245:9: note: forward declaration of 'struct proc_input' >>>>> struct proc_input input; >>>>> ^ >>>>> proc_filter.c:264:22: error: use of undeclared identifier >>>>> 'PROC_EVENT_NONZERO_EXIT' >>>>> input.event_type = PROC_EVENT_NONZERO_EXIT; >>>>> ^ >>>>> 9 errors generated. >>>>> make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector’ >>>>> >>>>> >>>> These are expected since you need to have the changes in kernel that were committed with this patch to be installed on the kernel on which this is being compiled/run on. That is what the test is for, and the check to make it run on previous kernels as well was made a runtime check. Do you expect this to compile on a kernel without the corresponding kernel changes that were committed with this patch? >>>> >>>> Anjali >>> Gentle ping - could you answer above questions? >>>> >> >> I am seeing the same on linux-next next-20230727 >> >> PROC_EVENT_NONZERO_EXIT is defined and NL_MESSAGE_SIZE >> >> Anjali, >> >> What are the dependent commits and should they be in next? >> Shouldn't this test patch go with the kernel patches it depends >> on? Can you do some testing on next and let me know why this >> test is failing to build? > > All the commits went in together - however, the kernel changes that went in this patch need to be *installed on kernel on which this is being built*. Did you do that and then try? > Building kernel and running "make headers" before building the test is what is needed. That is what Naresh and I did. How are you building this test? I sent a 3 patch series with the fix to this problem and a couple of others I found during testing. Also please check the error messages - some of them are cryptic and could use clarity. Another thing is argument check - arg == 2 - does this test require arguments? Note that without arguments the test runs - of that is default it is fine. This test could use an usage information. Please fix the above. thanks, -- Shuah ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' 2023-07-28 17:33 ` Shuah Khan @ 2023-07-28 18:13 ` Anjali Kulkarni 0 siblings, 0 replies; 11+ messages in thread From: Anjali Kulkarni @ 2023-07-28 18:13 UTC (permalink / raw) To: Shuah Khan Cc: Jakub Kicinski, Naresh Kamboju, open list:KERNEL SELFTEST FRAMEWORK, open list, lkft-triage@lists.linaro.org, Netdev, clang-built-linux, Shuah Khan, Anders Roxell, David S. Miller, Liam Howlett > On Jul 28, 2023, at 10:33 AM, Shuah Khan <skhan@linuxfoundation.org> wrote: > > On 7/27/23 19:38, Anjali Kulkarni wrote: >>> On Jul 27, 2023, at 5:43 PM, Shuah Khan <skhan@linuxfoundation.org> wrote: >>> >>> On 7/27/23 11:34, Anjali Kulkarni wrote: >>>>> On Jul 25, 2023, at 9:48 AM, Anjali Kulkarni <Anjali.K.Kulkarni@oracle.com> wrote: >>>>> >>>>> >>>>> >>>>>> On Jul 25, 2023, at 6:05 AM, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: >>>>>> >>>>>> selftests: connector: proc_filter build failed with clang-16 due to below >>>>>> warnings / errors on Linux next-20230725. >>>>>> >>>>>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >>>>>> >>>>>> clang --target=aarch64-linux-gnu -fintegrated-as >>>>>> -Werror=unknown-warning-option -Werror=ignored-optimization-argument >>>>>> -Werror=option-ignored -Werror=unused-command-line-argument >>>>>> --target=aarch64-linux-gnu -fintegrated-as -Wall proc_filter.c -o >>>>>> /home/tuxbuild/.cache/tuxmake/builds/1/build/kselftest/connector/proc_filter >>>>>> proc_filter.c:42:12: error: invalid application of 'sizeof' to an >>>>>> incomplete type 'struct proc_input' >>>>>> char buff[NL_MESSAGE_SIZE]; >>>>>> ^~~~~~~~~~~~~~~ >>>>>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ >>>>>> proc_filter.c:48:20: error: invalid application of 'sizeof' to an >>>>>> incomplete type 'struct proc_input' >>>>>> hdr->nlmsg_len = NL_MESSAGE_SIZE; >>>>>> ^~~~~~~~~~~~~~~ >>>>>> proc_filter.c:22:5: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>>> char buff[NL_MESSAGE_SIZE]; >>>>>> ^ >>>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ >>>>>> proc_filter.c:64:14: error: invalid application of 'sizeof' to an >>>>>> incomplete type 'struct proc_input' >>>>>> msg->len = sizeof(struct proc_input); >>>>>> ^ ~~~~~~~~~~~~~~~~~~~ >>>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>>> char buff[NL_MESSAGE_SIZE]; >>>>>> ^ >>>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ >>>>>> proc_filter.c:65:35: error: incomplete definition of type 'struct proc_input' >>>>>> ((struct proc_input *)msg->data)->mcast_op = >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>>> char buff[NL_MESSAGE_SIZE]; >>>>>> ^ >>>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ >>>>>> proc_filter.c:66:31: error: incomplete definition of type 'struct proc_input' >>>>>> ((struct proc_input *)pinp)->mcast_op; >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>>> char buff[NL_MESSAGE_SIZE]; >>>>>> ^ >>>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ >>>>>> proc_filter.c:67:35: error: incomplete definition of type 'struct proc_input' >>>>>> ((struct proc_input *)msg->data)->event_type = >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>>> char buff[NL_MESSAGE_SIZE]; >>>>>> ^ >>>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ >>>>>> proc_filter.c:68:31: error: incomplete definition of type 'struct proc_input' >>>>>> ((struct proc_input *)pinp)->event_type; >>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >>>>>> proc_filter.c:42:12: note: forward declaration of 'struct proc_input' >>>>>> char buff[NL_MESSAGE_SIZE]; >>>>>> ^ >>>>>> proc_filter.c:22:19: note: expanded from macro 'NL_MESSAGE_SIZE' >>>>>> sizeof(struct proc_input)) >>>>>> ^ >>>>>> proc_filter.c:245:20: error: variable has incomplete type 'struct proc_input' >>>>>> struct proc_input input; >>>>>> ^ >>>>>> proc_filter.c:245:9: note: forward declaration of 'struct proc_input' >>>>>> struct proc_input input; >>>>>> ^ >>>>>> proc_filter.c:264:22: error: use of undeclared identifier >>>>>> 'PROC_EVENT_NONZERO_EXIT' >>>>>> input.event_type = PROC_EVENT_NONZERO_EXIT; >>>>>> ^ >>>>>> 9 errors generated. >>>>>> make[4]: Leaving directory '/builds/linux/tools/testing/selftests/connector’ >>>>>> >>>>>> >>>>> These are expected since you need to have the changes in kernel that were committed with this patch to be installed on the kernel on which this is being compiled/run on. That is what the test is for, and the check to make it run on previous kernels as well was made a runtime check. Do you expect this to compile on a kernel without the corresponding kernel changes that were committed with this patch? >>>>> >>>>> Anjali >>>> Gentle ping - could you answer above questions? >>>>> >>> >>> I am seeing the same on linux-next next-20230727 >>> >>> PROC_EVENT_NONZERO_EXIT is defined and NL_MESSAGE_SIZE >>> >>> Anjali, >>> >>> What are the dependent commits and should they be in next? >>> Shouldn't this test patch go with the kernel patches it depends >>> on? Can you do some testing on next and let me know why this >>> test is failing to build? >> All the commits went in together - however, the kernel changes that went in this patch need to be *installed on kernel on which this is being built*. Did you do that and then try? > > Building kernel and running "make headers" before building the test > is what is needed. That is what Naresh and I did. > > How are you building this test? > > I sent a 3 patch series with the fix to this problem and a couple of > others I found during testing. > > Also please check the error messages - some of them are cryptic and > could use clarity. > > Another thing is argument check - arg == 2 - does this test require > arguments? Note that without arguments the test runs - of that is > default it is fine. This test could use an usage information. Please > fix the above. Yes, the test can run without any arguments. I will add usage information. Anjali > > thanks, > -- Shuah ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-07-28 18:13 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-07-25 13:05 selftests: connector: proc_filter.c:48:20: error: invalid application of 'sizeof' to an incomplete type 'struct proc_input' Naresh Kamboju 2023-07-25 16:48 ` Anjali Kulkarni 2023-07-27 17:34 ` Anjali Kulkarni 2023-07-28 0:43 ` Shuah Khan 2023-07-28 1:38 ` Anjali Kulkarni 2023-07-28 2:43 ` Jakub Kicinski 2023-07-28 16:46 ` Anjali Kulkarni 2023-07-28 17:34 ` Shuah Khan 2023-07-28 18:08 ` Anjali Kulkarni 2023-07-28 17:33 ` Shuah Khan 2023-07-28 18:13 ` Anjali Kulkarni
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).