From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16514 invoked by alias); 14 Dec 2010 09:55:33 -0000 Received: (qmail 16505 invoked by uid 22791); 14 Dec 2010 09:55:32 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Dec 2010 09:55:28 +0000 Received: (qmail 13596 invoked from network); 14 Dec 2010 09:55:25 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Dec 2010 09:55:25 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] Fix fileio.exp failuew when run as root user. Date: Tue, 14 Dec 2010 09:55:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.33-29-realtime; KDE/4.4.5; x86_64; ; ) Cc: Joel Brobecker , Phil Muldoon References: <20101214065744.GN2596@adacore.com> In-Reply-To: <20101214065744.GN2596@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012140955.23411.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-12/txt/msg00222.txt.bz2 On Tuesday 14 December 2010 06:57:44, Joel Brobecker wrote: > > 2010-11-19 Jan Kratochvil > > > > * gdb.base/fileio.c (ROOTSUBDIR): New macro. > > (main): CHDIR into ROOTSUBDIR. CHOWN ROOTSUBDIR and CHDIR into > > ROOTSUBDIR if we are being run as root. > > * gdb.base/fileio.exp: Change the startup and finish cleanup. > > Change the test file reference to be into the `fileio.dir' directory. > > Did anyone comment on that patch? This looks OK to me. > > (why would anyone want to run the testsuite as root, though???) Note that this test is meant to test remote file io capabilities. The fact that it runs on a native gdb is merely a way to give it a bit more exposure against bitrot. We need to make sure to not simply fail the test if the syscalls we're introducing are not supported by remote file io (remote-fileio.c), and they fail on the target (e.g., ENOSYS), and also that the test still compiles on bare metal targets, with e.g., newlib (otherwise, the test becomes useless). (The test was probably running on Windows/mingw as well, but the "geteuid" call introduction is probably making it not compile there anymore.) -- Pedro Alves