Hi Collin,

> The following check caused the linkat tests to fail on GNU/Hurd:
> 
>    ASSERT (linkat (dfd, BASE "link1", dfd, BASE "sub1/", 0) == -1);
>    ASSERT (errno == EEXIST || errno == ENOTDIR);

Yes, I've seen that too.

> Where "link1" was an existing directory and "sub1" was an existing
> symlink to a directory. Once we allow errno == EINVAL for this case the
> tests pass.
> 
> I've just gone ahead and pushed the attached since I don't think the
> errno is worth correcting in this case.

Err. I disagree with that. When we have a test failure, the first step is
to look at POSIX ([1] in this case). It says "These functions shall fail if:
...[ENOTDIR]" which catches this case. So, it's a bug in Hurd.

Then, there are three possibilities:

  A. Relax the test.
  B. Report a bug and relax the test.
  C. Report a bug and keep the test as is, failing until the bug gets corrected.

Option A has only a benefit for continuous integrations. Other than that,
there is no need to bring test failure counts to 0 when they indicate actual
bugs.

Whereas B and C have a lasting positive effect on the users of that OS (Hurd
in this case).

Since Hurd is in active development, my preference is for C (as already
indicated a couple of days ago [2]).

Bruno

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/linkat.html
[2] https://lists.gnu.org/archive/html/bug-gnulib/2025-01/msg00108.html




Reply via email to