bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fchmodat.c & lchmod.c - O_PATH & AT_EMPTY_PATH on older kernels


From: Bruno Haible
Subject: Re: fchmodat.c & lchmod.c - O_PATH & AT_EMPTY_PATH on older kernels
Date: Fri, 17 Jun 2022 13:09:02 +0200

Hi Paul,

On 2022-06-12 you wrote:
> Although I don't have MS-Windows I stared at 
> the code a bit and I think I see what might be the problem. I found some 
> other potential issues too (basically, I didn't switch from 
> fstatat/lstat to readlinkat/readlink often enough so the code is still 
> prone to EOVERFLOW problems). I installed the attached further patch, 
> which I hope fixes things on MS-Windows and fixes the other issues too.

Unfortunately, this patch not only does not fix the failures on native
Windows; it also introduces two other problems.

In detail:

* All tests pass on FreeBSD 13.0, NetBSD 9.0, OpenBSD 7.0, Solaris 10 and 11,
  Cygwin.


* On a Linux system (Ubuntu 20.04), there is a new compilation warning

../../gllib/fchmodat.c: In function ‘rpl_fchmodat’:
../../gllib/fchmodat.c:99:12: warning: unused variable ‘buf’ [-Wunused-variable]
   99 |       char buf[1];
      |            ^~~

IMO this variable 'buf' can be removed.


* On AIX 7.2 there is a new test failure

FAIL: test-lchmod
=================

../../gltests/test-lchmod.c:46: assertion 'lchmod (BASE "file/", 0600) == -1' 
failed
FAIL test-lchmod (exit status: 134)

Probably this is related to the AIX 7.2 bug that we mention in
doc/posix-functions/fchmodat.texi.


* On native Windows there are still the two test failures

FAIL: test-fchmodat
===================

../../gltests/test-fchmodat.c:61: assertion 'errno == ENOTDIR' failed
FAIL test-fchmodat.exe (exit status: 3)

FAIL: test-lchmod
=================

../../gltests/test-lchmod.c:47: assertion 'errno == ENOTDIR' failed
FAIL test-lchmod.exe (exit status: 3)


Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]