From: Guinevere Larsen <blarsen@redhat.com>
To: Lancelot SIX <lsix@lancelotsix.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: XFAIL some gdb.base/fileio.exp
Date: Fri, 11 Aug 2023 16:26:48 +0200 [thread overview]
Message-ID: <eaf7943e-99e8-a890-66e6-133c59a5ed0b@redhat.com> (raw)
In-Reply-To: <20230811131849.4inda7bmhiroknpl@octopus>
On 11/08/2023 15:19, Lancelot SIX wrote:
> Hi Guinevere,
>
> I am not a big fan of the idea of running the testcases as root… but I
> guess this is what you have when running within a container.
yeah, this is focused on VM/containers for testing infrastructure.
>
>> +# Return 1 if the test is being run as root, 0 otherwise
>> +
>> +gdb_caching_proc root_user {} {
>> + # ID outputs to stdout, we have to use exec to capture it here
>> + set user [exec id]
> Shouldn't it be `[remote_exec target]` instead? You are interested in
> who will end up running the test executable, which can be different from
> who runs `runtest` locally. I am not entirely sure if it should be
> `host` or `target`. I would think `target`, but the testcase does use
> `host`, which seems odd to me.
Thank you. I always forget about how the remote stuff works, but I think
you are correct, it does make more sense to use remote_exec, because the
test failures are based on if the underlying program can access it or
not. I'll fix this in v2.
>
> Also, what happens if the underlying filesystem is for example a NFS
> mount? I am not sure being root will change what unlink can do, but I
> have not tested. Maybe it is not worth trying to figure out all setups,
> if it comes up one can always adjust the test.
I think you're right, being root wouldn't let you access those, but I am
not sure many people are testing GDB with an NFS mounted build directory
inside a VM/container. I think setups like that can be dealt with if
they appear.
--
Cheers,
Guinevere Larsen
She/Her/Hers
>
> Best,
> Lancelot.
>
>> +
>> + regexp -all ".*uid=(\[0-9\]+).*" $user user uid
>> +
>> + return [expr $uid == 0]
>> +}
>> +
>> # Always load compatibility stuff.
>> load_lib future.exp
>> --
>> 2.41.0
>>
next prev parent reply other threads:[~2023-08-11 14:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 10:21 Guinevere Larsen
2023-08-11 13:19 ` Lancelot SIX
2023-08-11 14:26 ` Guinevere Larsen [this message]
2023-08-14 10:24 ` [PATCH v2] " Guinevere Larsen
2023-09-14 13:12 ` [PING][PATCH " Guinevere Larsen
2023-09-26 13:21 ` [PATCH " Tom de Vries
2023-10-04 14:02 ` [PATCH v3] " Guinevere Larsen
2023-10-04 15:33 ` Tom de Vries
2023-10-04 15:47 ` Guinevere Larsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eaf7943e-99e8-a890-66e6-133c59a5ed0b@redhat.com \
--to=blarsen@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).