From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80830 invoked by alias); 20 Oct 2016 13:16:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 80805 invoked by uid 89); 20 Oct 2016 13:16:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Thu, 20 Oct 2016 13:16:00 -0000 From: Joseph Myers To: Yury Norov CC: , , , Subject: Re: [PATCH v2] Linux: consolidate rename() In-Reply-To: <1476924756-31448-1-git-send-email-ynorov@caviumnetworks.com> Message-ID: References: <1476924756-31448-1-git-send-email-ynorov@caviumnetworks.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2016-10/txt/msg00335.txt.bz2 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