This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Linux: consolidate rename()


On Thu, 20 Oct 2016, Yury Norov wrote:

> Tested on arm64/lp64 which supports renameat and renameat2,
> and aarch64/ilp32 which supports renameat2 only.

There's clearly something very wrong with your test environment that you 
need to resolve before submitting any more glibc patches at all.  If you'd 
tested this patch you should have seen linknamespace tests failing because 
rename is in standards that do not include renameat, and the localplt test 
failing because you're calling an exported function that isn't using the 
libc_hidden_proto/libc_hidden_def machinery (even non-exported functions 
have to use that machinery when called within the same library, but 
failure to do so is less visible from test results).

Just leave rename.c in sysdeps/unix/sysv/linux/generic and add a case for 
it to use the renameat2 syscall and you avoid all these issues; on 
platforms with the rename syscall, there is no benefit from going via 
other syscalls, and calling renameat from rename rather than using 
syscalls introduces unnecessary complications.  (But you must still test 
by running the full glibc testsuite and actually investigating any 
failures seen.)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]