* Linux 5.6-rc1 kselftest build failures @ 2020-02-12 0:35 shuah 2020-02-12 8:14 ` Aleksa Sarai 2020-02-12 14:09 ` Dmitry Safonov 0 siblings, 2 replies; 6+ messages in thread From: shuah @ 2020-02-12 0:35 UTC (permalink / raw) To: linux-kselftest, Linux Kernel Mailing List, Dmitry Safonov, Aleksa Sarai Cc: shuah The following tests fail to build on x86_64 openat2: tools/testing/selftests/openat2' gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c helpers.c -o tools/testing/selftests/openat2/openat2_test In file included from /usr/include/fcntl.h:301, from helpers.c:9: In function ‘openat’, inlined from ‘touchat’ at helpers.c:49:11: /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to ‘__openat_missing_mode’ declared with attribute error: openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments 126 | __openat_missing_mode (); | ^~~~~~~~~~~~~~~~~~~~~~~~ timerns: tools/testing/selftests/timens' gcc -Wall -Werror -pthread -lrt -ldl timens.c -o tools/testing/selftests/timens/timens /usr/bin/ld: /tmp/ccGy5CST.o: in function `check_config_posix_timers': timens.c:(.text+0x65a): undefined reference to `timer_create' collect2: error: ld returned 1 exit status thanks, -- Shuah ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.6-rc1 kselftest build failures 2020-02-12 0:35 Linux 5.6-rc1 kselftest build failures shuah @ 2020-02-12 8:14 ` Aleksa Sarai 2020-02-12 17:38 ` shuah 2020-02-12 14:09 ` Dmitry Safonov 1 sibling, 1 reply; 6+ messages in thread From: Aleksa Sarai @ 2020-02-12 8:14 UTC (permalink / raw) To: shuah; +Cc: linux-kselftest, Linux Kernel Mailing List, Dmitry Safonov [-- Attachment #1: Type: text/plain, Size: 2333 bytes --] On 2020-02-11, shuah <shuah@kernel.org> wrote: > openat2: > > tools/testing/selftests/openat2' > gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c > helpers.c -o tools/testing/selftests/openat2/openat2_test > In file included from /usr/include/fcntl.h:301, > from helpers.c:9: > In function ‘openat’, > inlined from ‘touchat’ at helpers.c:49:11: > /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to > ‘__openat_missing_mode’ declared with attribute error: openat with O_CREAT > or O_TMPFILE in third argument needs 4 arguments > 126 | __openat_missing_mode (); > | ^~~~~~~~~~~~~~~~~~~~~~~~ Yeah, that's a brain-o -- it looks like you have a newer glibc than me which gives you a warning when you don't set the mode. The fix should be just the following: --8<----------------------------------------------------------------------- Subject: [PATCH] selftests: openat2: fix build error on newer glibc It appears that newer glibcs check that openat(O_CREAT) was provided a fourth argument (rather than passing garbage), resulting in the following build error: In file included from /usr/include/fcntl.h:301, from helpers.c:9: In function ‘openat’, inlined from ‘touchat’ at helpers.c:49:11: /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to ‘__openat_missing_mode’ declared with attribute error: openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments 126 | __openat_missing_mode (); | ^~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Shuah Khan <shuah@kernel.org> Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> --- tools/testing/selftests/openat2/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/openat2/helpers.c b/tools/testing/selftests/openat2/helpers.c index e9a6557ab16f..5074681ffdc9 100644 --- a/tools/testing/selftests/openat2/helpers.c +++ b/tools/testing/selftests/openat2/helpers.c @@ -46,7 +46,7 @@ int sys_renameat2(int olddirfd, const char *oldpath, int touchat(int dfd, const char *path) { - int fd = openat(dfd, path, O_CREAT); + int fd = openat(dfd, path, O_CREAT, 0700); if (fd >= 0) close(fd); return fd; -- 2.25.0 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Linux 5.6-rc1 kselftest build failures 2020-02-12 8:14 ` Aleksa Sarai @ 2020-02-12 17:38 ` shuah 2020-02-13 7:27 ` Aleksa Sarai 0 siblings, 1 reply; 6+ messages in thread From: shuah @ 2020-02-12 17:38 UTC (permalink / raw) To: Aleksa Sarai Cc: linux-kselftest, Linux Kernel Mailing List, Dmitry Safonov, shuah On 2/12/20 1:14 AM, Aleksa Sarai wrote: > On 2020-02-11, shuah <shuah@kernel.org> wrote: >> openat2: >> >> tools/testing/selftests/openat2' >> gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c >> helpers.c -o tools/testing/selftests/openat2/openat2_test >> In file included from /usr/include/fcntl.h:301, >> from helpers.c:9: >> In function ‘openat’, >> inlined from ‘touchat’ at helpers.c:49:11: >> /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to >> ‘__openat_missing_mode’ declared with attribute error: openat with O_CREAT >> or O_TMPFILE in third argument needs 4 arguments >> 126 | __openat_missing_mode (); >> | ^~~~~~~~~~~~~~~~~~~~~~~~ > > Yeah, that's a brain-o -- it looks like you have a newer glibc than > me which gives you a warning when you don't set the mode. The fix should > be just the following: > Nice. Do you mind sending a proper patch, I can pull in. thanks, -- Shuah ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.6-rc1 kselftest build failures 2020-02-12 17:38 ` shuah @ 2020-02-13 7:27 ` Aleksa Sarai 0 siblings, 0 replies; 6+ messages in thread From: Aleksa Sarai @ 2020-02-13 7:27 UTC (permalink / raw) To: shuah; +Cc: linux-kselftest, Linux Kernel Mailing List, Dmitry Safonov [-- Attachment #1: Type: text/plain, Size: 1307 bytes --] On 2020-02-12, shuah <shuah@kernel.org> wrote: > On 2/12/20 1:14 AM, Aleksa Sarai wrote: > > On 2020-02-11, shuah <shuah@kernel.org> wrote: > > > openat2: > > > > > > tools/testing/selftests/openat2' > > > gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c > > > helpers.c -o tools/testing/selftests/openat2/openat2_test > > > In file included from /usr/include/fcntl.h:301, > > > from helpers.c:9: > > > In function ‘openat’, > > > inlined from ‘touchat’ at helpers.c:49:11: > > > /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to > > > ‘__openat_missing_mode’ declared with attribute error: openat with O_CREAT > > > or O_TMPFILE in third argument needs 4 arguments > > > 126 | __openat_missing_mode (); > > > | ^~~~~~~~~~~~~~~~~~~~~~~~ > > > > Yeah, that's a brain-o -- it looks like you have a newer glibc than > > me which gives you a warning when you don't set the mode. The fix should > > be just the following: > > > > Nice. Do you mind sending a proper patch, I can pull in. Done[1]. [1]: https://lore.kernel.org/linux-kselftest/20200213072656.15611-1-cyphar@cyphar.com/ -- Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH <https://www.cyphar.com/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.6-rc1 kselftest build failures 2020-02-12 0:35 Linux 5.6-rc1 kselftest build failures shuah 2020-02-12 8:14 ` Aleksa Sarai @ 2020-02-12 14:09 ` Dmitry Safonov 2020-02-12 18:16 ` shuah 1 sibling, 1 reply; 6+ messages in thread From: Dmitry Safonov @ 2020-02-12 14:09 UTC (permalink / raw) To: shuah, linux-kselftest, Linux Kernel Mailing List Cc: Aleksa Sarai, Andrei Vagin Hi Shuah, On 2/12/20 12:35 AM, shuah wrote: > The following tests fail to build on x86_64 [..] > timerns: > > tools/testing/selftests/timens' > gcc -Wall -Werror -pthread -lrt -ldl timens.c -o > tools/testing/selftests/timens/timens > /usr/bin/ld: /tmp/ccGy5CST.o: in function `check_config_posix_timers': > timens.c:(.text+0x65a): undefined reference to `timer_create' > collect2: error: ld returned 1 exit status I've just send a patch to fix it: https://lkml.kernel.org/r/20200212140040.126747-1-dima@arista.com Could you try it? Also, it seems that the same thing affects futex/rtc/tcp_mmap/tcp_inq tests? While looking into this, I see there are new auto-generated lkmdtm && pidfd tests, is it worth to add them to .gitignore? Thanks, Dmitry ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.6-rc1 kselftest build failures 2020-02-12 14:09 ` Dmitry Safonov @ 2020-02-12 18:16 ` shuah 0 siblings, 0 replies; 6+ messages in thread From: shuah @ 2020-02-12 18:16 UTC (permalink / raw) To: Dmitry Safonov, linux-kselftest, Linux Kernel Mailing List Cc: Aleksa Sarai, Andrei Vagin, shuah On 2/12/20 7:09 AM, Dmitry Safonov wrote: > Hi Shuah, > > On 2/12/20 12:35 AM, shuah wrote: >> The following tests fail to build on x86_64 > [..] >> timerns: >> >> tools/testing/selftests/timens' >> gcc -Wall -Werror -pthread -lrt -ldl timens.c -o >> tools/testing/selftests/timens/timens >> /usr/bin/ld: /tmp/ccGy5CST.o: in function `check_config_posix_timers': >> timens.c:(.text+0x65a): undefined reference to `timer_create' >> collect2: error: ld returned 1 exit status > > I've just send a patch to fix it: > https://lkml.kernel.org/r/20200212140040.126747-1-dima@arista.com > > Could you try it? Yup. Works, responsed to the patch thread. > > Also, it seems that the same thing affects futex/rtc/tcp_mmap/tcp_inq tests? > > While looking into this, I see there are new auto-generated lkmdtm && > pidfd tests, is it worth to add them to .gitignore? > Thanks for finding. Yes please send a patch for this. thanks, -- Shuah ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-02-13 7:28 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-12 0:35 Linux 5.6-rc1 kselftest build failures shuah 2020-02-12 8:14 ` Aleksa Sarai 2020-02-12 17:38 ` shuah 2020-02-13 7:27 ` Aleksa Sarai 2020-02-12 14:09 ` Dmitry Safonov 2020-02-12 18:16 ` shuah
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).