Discussion:
fix spurious gnulib test-faccessat failure
Add Reply
Jim Meyering
2017-11-28 15:58:33 UTC
Reply
Permalink
Raw Message
FYI, I've just pushed the following to gnulib.
I noticed this new parallel test failure when coreutils started
using the very latest from gnulib.

test-faccessat.c: correct BASE definition to avoid parallel test failure
* tests/test-faccessat.c (BASE): Define using this file's name, not
that of test-lstat.c. Using the latter caused this test to fail
sometimes when run concurrently with test-lstat.

diff --git a/tests/test-faccessat.c b/tests/test-faccessat.c
index 53855ba91..fe1db4129 100644
--- a/tests/test-faccessat.c
+++ b/tests/test-faccessat.c
@@ -26,7 +26,7 @@ SIGNATURE_CHECK (faccessat, int, (int, const char *, int, int));

#include "macros.h"

-#define BASE "test-lstat.t"
+#define BASE "test-faccessat.t"

int
main (void)
Jim Meyering
2017-11-28 16:05:04 UTC
Reply
Permalink
Raw Message
Post by Jim Meyering
FYI, I've just pushed the following to gnulib.
I noticed this new parallel test failure when coreutils started
using the very latest from gnulib.
test-faccessat.c: correct BASE definition to avoid parallel test failure
* tests/test-faccessat.c (BASE): Define using this file's name, not
that of test-lstat.c. Using the latter caused this test to fail
sometimes when run concurrently with test-lstat.
...

I assured myself that there was no other similar bug by running this
from a gnulib clone:

$ grep -r define.BASE tests |perl -lne '/test-(.+?)\.c.*"test-\1\.t/ or print'
tests/test-canonicalize-lgpl.c:#define BASE "t-can-lgpl.tmp"
tests/test-canonicalize.c:#define BASE "t-can.tmp"
tests/test-fts.c:#define BASE "t-fts.tmp"
tests/test-perror2.c:#define BASE "test-perror2"

Loading...