From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4853 invoked by alias); 8 Dec 2007 18:58:47 -0000 Received: (qmail 4844 invoked by uid 22791); 8 Dec 2007 18:58:46 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Dec 2007 18:58:41 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.0) with ESMTP id lB8Iw63E020694; Sat, 8 Dec 2007 19:58:06 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id lB8Iw5pn014666; Sat, 8 Dec 2007 19:58:05 +0100 (CET) Date: Sat, 08 Dec 2007 19:13:00 -0000 Message-Id: <200712081858.lB8Iw5pn014666@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: jan.kratochvil@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <20071208181422.GA10275@host0.dyn.jankratochvil.net> (message from Jan Kratochvil on Sat, 8 Dec 2007 19:14:22 +0100) Subject: Re: [patch] fileio.exp FAILs if run as root References: <20071208181422.GA10275@host0.dyn.jankratochvil.net> 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: 2007-12/txt/msg00137.txt.bz2 > Date: Sat, 8 Dec 2007 19:14:22 +0100 > From: Jan Kratochvil > > Hi, > > if you run gdb.base/fileio.exp as UID 0 it will print: > FAIL: gdb.base/fileio.exp: Open for write but no write permission returns EACCES > FAIL: gdb.base/fileio.exp: Unlinking a file in a directory w/o write access returns EACCES People running the testsuite as root deserve what they get. I don't think we should complicate our code to make that possible, especially if it involves calling setuid() which is notoriously unportable. > 2007-12-08 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.