This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix fileio.exp failuew when run as root user.
Joel Brobecker <brobecker@adacore.com> writes:
>> 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.)
>
> So, as it is, the fix doesn't meet those requirements and shouldn't
> be applied, right? If that's the case, then perhaps the first question
> is to figure out why someone is running the testsuite as root... Is
> that a sysadmin who is building GDB as root?
>
> I had checked that the new functions used are defined by POSIX,
> but confess I never worried about Windows. Sorry.
Jan wrote the patch and it was carried with our Fedora RPM patch set, so
I am going to surmise it is because of distribution build systems
running/testing as root.
I'll ping Jan and ask him to comment.
Cheers,
Phil