This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] Fix fileio.exp failuew when run as root user.


On Tuesday 14 December 2010 06:57:44, Joel Brobecker wrote:
> > 2010-11-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
> > 
> > 	* 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


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