public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <aburgess@redhat.com>,
	Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 0/7] introduce get_runtime_path
Date: Sat, 5 Nov 2022 15:39:10 +0100	[thread overview]
Message-ID: <981b7f0c-690a-5cbc-738e-fd98b5f9b4f2@suse.de> (raw)
In-Reply-To: <87czabc7f7.fsf@redhat.com>

On 10/29/22 11:20, Andrew Burgess via Gdb-patches wrote:
> Ivan Tetyushkin <ivan.tetyushkin@syntacore.com> writes:
> 
>> Hi. I tried to run a testsuite using a remote host test setup on QEMU
>> (RISC-V) with Linux.
> 
> Thanks for looking at these problems.  I suspect the setup you are using
> is not one that is used very often.
> 
> Could you give more details about your setup so that others might be
> able to reproduce the issues you are seeing, and validate your fixes?
> 

Hi,

I found a fairly easy way to reproduce this (after reading the response 
to Andrews question and realizing that given the use of --target_board 
rather than --host_board, from the point of view of dejagnu, this is not 
a remote host, but a remote target setup).

Add a local test account remote-target, and put a remote-target entry in 
the .ssh/config:
...
Host remote-target
      HostName  127.0.0.1
      User remote-target
      IdentityFile <some rsa file>
      IdentitiesOnly yes
      PreferredAuthentications publickey
...
such that we can access it without password:
...
$ ssh remote-target
Last login: Sat Nov  5 15:12:34 2022 from 127.0.0.1
Have a lot of fun...
remote-target@127.0.0.1:~>
...
and likewise for remote-target@remote-target.

Edit remote-gdbserver-on-localhost.exp to use the remote-target account:
...
  set_board_info rcp_prog "/usr/bin/scp"
  set_board_info rsh_prog "/usr/bin/ssh"
  set_board_info protocol standard
-set_board_info username $env(USER)
-set_board_info hostname localhost
+set_board_info username remote-target
+set_board_info hostname remote-target

  proc ${board}_spawn { board cmd } {
      global board_info
...

Run test-case gdb.base/print-file-var.exp with target board 
remote-gdbserver-on-localhost.exp, and watch it pass.

Now make sure the remote-target account cannot access files from the 
$USER account (well, as far as the testsuite output dir is concerned):
...
$ chmod go-rx build/gdb/testsuite/outputs/
...
mimicking an actual remote target machine not being able to access the 
files on the build/host machine.

Run the test again, and watch it fail.

Now apply the patch series, and watch it pass again.

Thanks,
- Tom

      parent reply	other threads:[~2022-11-05 14:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 16:29 Ivan Tetyushkin
2022-10-25 16:29 ` [PATCH 1/7] [gdb/testsuite] Adding function to find runtime path to support remote execution for testsuite Ivan Tetyushkin
2022-10-25 16:29 ` [PATCH 2/7] [gdb/testsuite] fix test gdb.base/print-file-var.exp for remote execution Ivan Tetyushkin
2022-11-06 10:54   ` Tom de Vries
2022-11-07 13:32     ` Andrew Burgess
2022-11-07 13:49       ` Ivan Tetyushkin
2022-11-07 16:44         ` Tom de Vries
2022-11-15 14:39           ` Tom de Vries
2022-11-07 16:18       ` Tom de Vries
2022-11-07 13:55     ` Simon Marchi
2022-11-07 16:15       ` Tom de Vries
2022-10-25 16:29 ` [PATCH 3/7] [gdb/testsuite] fix test gdb.base/jit-reader-exec.exp " Ivan Tetyushkin
2022-10-25 16:29 ` [PATCH 4/7] [gdb/testsuite] fix test gdb.base/solib-vanish.exp " Ivan Tetyushkin
2022-10-25 16:29 ` [PATCH 5/7] [gdb/testsuite] fix test gdb.base/infcall-exec.exp " Ivan Tetyushkin
2022-10-25 16:29 ` [PATCH 6/7] [gdb/testsuite] fix test gdb.base/info-shared.exp " Ivan Tetyushkin
2022-10-25 16:29 ` [PATCH 7/7] [gdb/testsuite] fix test gdb.base/jit-elf-so.exp " Ivan Tetyushkin
2022-10-29  9:20 ` [PATCH 0/7] introduce get_runtime_path Andrew Burgess
2022-11-01  9:19   ` Ivan Tetyushkin
2022-11-05 14:39   ` Tom de Vries [this message]

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=981b7f0c-690a-5cbc-738e-fd98b5f9b4f2@suse.de \
    --to=tdevries@suse.de \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ivan.tetyushkin@syntacore.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).