Re: [PATCH] tests: switch nap() to use file creation to gauge delay
On Sun, 2024-07-21 at 02:49 +0200, Bruno Haible wrote: > Hi Jeff, > > You wrote on 2024-06-28: > > There are some proposed changes [1] to track finer-grained timestamps in > > the Linux kernel that will break the assumptions that nap() uses to > > gauge the delay. In particular, writing to a file will almost always > > show a change in the timestamp now, so usually this method will settle > > on a delay of 1ns. > > ... > > test-stat-time still fails without this change. > > The paperwork being complete now, I wanted to verify that the patch > indeed fixes the problem. But I can't reproduce the problem in the first > place. > > Here's what I did: > - Install Fedora Rawhide (Linux > 6.11.0-0.rc0.20240719git720261cfc732.7.fc41.x86_64). > - Create a testdir > $ ./gnulib-tool --create-testdir --dir=../testdir1 --single-configure > chown fchownat fdutimensat futimens lchown stat-time utime utimens utimensat > - Build it, both on an ext4 file system and a btrfs file system. > => No test failure is seen. > > What am I missing? What do I need to change in my setup, in order to > reproduce the problem? > > Bruno > > > Unfortunately, these patches aren't in rawhide kernels yet. Christian will pull these into his tree once the dust settles from the merge window. Once that happens, it should go into rawhide soon after. If you want to test before that, the patches are in the "mgtime" branch of my public tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/ ...but you'll have to build your own kernel for that. -- Jeff Layton
Re: [PATCH] tests: switch nap() to use file creation to gauge delay
Hi Jeff, Thanks for the info. > Unfortunately, these patches aren't in rawhide kernels yet. Christian > will pull these into his tree once the dust settles from the merge > window. Once that happens, it should go into rawhide soon after. Can you please ping me when this happens or is about to happen? So that I can test with a Fedora rawhide. Thanks! > If you want to test before that, the patches are in the "mgtime" branch > of my public tree: > > https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/ > > ...but you'll have to build your own kernel for that. Good to know, but I'll abstain from that, since I haven't successfully built a working custom kernel in a long time. Bruno
Re: [PATCH] tests: switch nap() to use file creation to gauge delay
On Mon, 2024-07-22 at 13:19 +0200, Bruno Haible wrote: > Hi Jeff, > > Thanks for the info. > > > Unfortunately, these patches aren't in rawhide kernels yet. Christian > > will pull these into his tree once the dust settles from the merge > > window. Once that happens, it should go into rawhide soon after. > > Can you please ping me when this happens or is about to happen? So that > I can test with a Fedora rawhide. Thanks! > Absolutely! I figure it'll be another week or two. > > If you want to test before that, the patches are in the "mgtime" branch > > of my public tree: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/ > > > > ...but you'll have to build your own kernel for that. > > Good to know, but I'll abstain from that, since I haven't successfully > built a working custom kernel in a long time. > > Bruno > > > -- Jeff Layton
gnulib-tool: Omit the logs of skipped tests from test-suite.log
When looking at the test-suite.log of a directory with gnulib tests (whether from a testdir or included in a GNU package), the skipped tests in this log files are more annoying than useful. This patch omits the logs of the skipped tests, assuming Automake ≥ 1.17 is in use. It has no effect with Automake < 1.17. It makes use of a new feature in Automake 1.17 [1]. [1] https://lists.gnu.org/archive/html/bug-automake/2024-06/msg3.html 2024-07-22 Bruno Haible gnulib-tool: Omit the logs of skipped tests from test-suite.log. * gnulib-tool.sh (func_emit_tests_Makefile_am): Emit an assignment to IGNORE_SKIPPED_LOGS. * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Likewise. diff --git a/gnulib-tool.sh b/gnulib-tool.sh index 12f0b82461..0efc25f0dc 100755 --- a/gnulib-tool.sh +++ b/gnulib-tool.sh @@ -4438,6 +4438,8 @@ func_emit_tests_Makefile_am () # EXEEXT is defined by AC_PROG_CC through autoconf. # srcdir is defined by autoconf and automake. echo "TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='\$(srcdir)'" + # Omit logs of skipped tests from test-suite.log, if Automake ≥ 1.17 is used. + echo "IGNORE_SKIPPED_LOGS = 1" echo cat "$tmp"/main_snippets "$tmp"/longrunning_snippets \ | sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g' diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index cb6106e941..7eb8b27d46 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -1216,7 +1216,9 @@ def tests_Makefile_am(self, destfile: str, modules: list[GLModule], moduletable: # Many test scripts use ${EXEEXT} or ${srcdir}. # EXEEXT is defined by AC_PROG_CC through autoconf. # srcdir is defined by autoconf and automake. -emit += "TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'\n\n" +emit += "TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'\n" +# Omit logs of skipped tests from test-suite.log, if Automake ≥ 1.17 is used. +emit += 'IGNORE_SKIPPED_LOGS = 1\n\n' all_snippets = main_snippets + longrun_snippets all_snippets = all_snippets.replace('$(top_srcdir)/build-aux/', '$(top_srcdir)/%s/' % auxdir)
Re: [PATCH] tests: switch nap() to use file creation to gauge delay
On Mon, 2024-07-22 at 13:19 +0200, Bruno Haible wrote: > Hi Jeff, > > Thanks for the info. > > > Unfortunately, these patches aren't in rawhide kernels yet. Christian > > will pull these into his tree once the dust settles from the merge > > window. Once that happens, it should go into rawhide soon after. > > Can you please ping me when this happens or is about to happen? So that > I can test with a Fedora rawhide. Thanks! > Doh! My earlier mail said that this would be in rawhide in a couple of weeks, but that's not correct. This is v6.12 material (most likely), so it probably won't show up in rawhide until that merge window opens (in around 8-10 weeks). I'll still let you know when it does, but it's going to be a while. > > If you want to test before that, the patches are in the "mgtime" branch > > of my public tree: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/ > > > > ...but you'll have to build your own kernel for that. > > Good to know, but I'll abstain from that, since I haven't successfully > built a working custom kernel in a long time. > > Bruno > > > -- Jeff Layton
sys_socket tests: Improve tests for macro definitions.
Adding a few tests based on longstanding POSIX specification (i.e. not added in 2024). * AF_UNSPEC should be 0. * All supported AF_* constants must have distinct values. * SHUT_RD, SHUT_RDWR, SHUT_WR must have distinct values. Gnulib doesn't guarantee this but it would be good to know if a platform doesn't satisfy these rules. Collin >From 4f7969ccb3036e9bef5bfc2fbfef3263d5255376 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 22 Jul 2024 20:54:17 -0700 Subject: [PATCH] sys_socket tests: Improve tests for macro definitions. * modules/sys_socket-tests (Depends-on): Add assert-h. * tests/test-sys_socket.c (a): Remove variable. (main): Test that each supported address family is defined to a distinct value. Test that each constant passed as the second argument of 'shutdown' is defined to a distinct value. --- ChangeLog| 9 + modules/sys_socket-tests | 1 + tests/test-sys_socket.c | 35 +++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 335a29b0c0..cf20d60b76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-07-22 Collin Funk + + sys_socket tests: Improve tests for macro definitions. + * modules/sys_socket-tests (Depends-on): Add assert-h. + * tests/test-sys_socket.c (a): Remove variable. + (main): Test that each supported address family is defined to a distinct + value. Test that each constant passed as the second argument of + 'shutdown' is defined to a distinct value. + 2024-07-22 Bruno Haible gnulib-tool: Omit the logs of skipped tests from test-suite.log. diff --git a/modules/sys_socket-tests b/modules/sys_socket-tests index da67baf99a..b0bb4356ca 100644 --- a/modules/sys_socket-tests +++ b/modules/sys_socket-tests @@ -2,6 +2,7 @@ Files: tests/test-sys_socket.c Depends-on: +assert-h sys_socket-c++-tests configure.ac: diff --git a/tests/test-sys_socket.c b/tests/test-sys_socket.c index 4e0f9ad46e..6fbfb98a70 100644 --- a/tests/test-sys_socket.c +++ b/tests/test-sys_socket.c @@ -20,10 +20,8 @@ #include -#if HAVE_SHUTDOWN -/* Check some integer constant expressions. */ -int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; -#endif +/* POSIX mandates that AF_UNSPEC shall be 0. */ +static_assert (AF_UNSPEC == 0); /* Check that the 'socklen_t' type is defined. */ socklen_t t1; @@ -59,6 +57,35 @@ main (void) break; } + /* Check that each supported address family has a distinct value. */ + switch (0) +{ +case AF_UNSPEC: +#if HAVE_IPV4 +case AF_INET: +#endif +#if HAVE_IPV6 +case AF_INET6: +#endif +#if HAVE_UNIXSOCKET +case AF_UNIX: +#endif +default: + break; +} + + /* Check that the shutdown type macros are defined to distinct values. */ +#if HAVE_SHUTDOWN + switch (0) +{ +case SHUT_RD: +case SHUT_WR: +case SHUT_RDWR: +default: + break; +} +#endif + x.ss_family = 42; i = 42; msg.msg_iov = &io; -- 2.45.2
Re: Fwd: make: *** [Makefile.devel:149: lib/aliases.h] Error 1
This has nothing to do with gnulib. Wrong mailing list. Bruno