aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/common-utils.cc
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-11-15 15:24:54 +0100
committerTom de Vries <tdevries@suse.de>2022-11-15 15:24:54 +0100
commit2a1742f31c21c852ebc105adc0dfb6b57570f552 (patch)
tree36102245771c9559b107e5f9ec92571abc1e3e2b /gdbsupport/common-utils.cc
parent9af7a370030a3729da4efbf26b0c746420408b3d (diff)
downloadbinutils-2a1742f31c21c852ebc105adc0dfb6b57570f552.zip
binutils-2a1742f31c21c852ebc105adc0dfb6b57570f552.tar.gz
binutils-2a1742f31c21c852ebc105adc0dfb6b57570f552.tar.bz2
[gdb/testsuite] Add REMOTE_TARGET_USERNAME in remote-gdbserver-on-localhost.exp
As reported here ( https://sourceware.org/pipermail/gdb-patches/2022-October/193147.html ) a number of test-cases fails with a remote target setup, for instance test-case gdb.base/print-file-var.exp. So, why don't we see these fails with our remote target boards in gdb/testsuite/boards, say remote-gdbserver-on-localhost.exp? The problem is that the target board uses the same machine and user for both (by-definition-local) build and remote target, and when using absolute pathnames to refer to files on build, we can access those files on target, which in a real remote target setup wouldn't be the case: we'd have to download them to target first, and then the filename would also be different. For aforementioned test-case, this happens when the name of a shared library is passed as absolute file name to gcc: ... gcc ... -DSHLIB_NAME="$outputs/gdb.base/print-file-var/\ print-file-var-lib2-hidden0-dlopen1-version_id_main0_c.so" ... Make these problems visible with remote-gdbserver-on-localhost.exp by adding an option to specify a test account (still on the same machine) using REMOTE_TARGET_USERNAME. We make sure by restricting file permissions, that the test account cannot see the build files on the $USER account, and that the $USER account cannot see the target files on the test account. And so we can reproduce the reported fails: ... $ cd build/gdb $ tc="gdb.base/print-file-var.exp" $ tb="--target_board remote-gdbserver-on-localhost" $ tbu="REMOTE_TARGET_USERNAME=remote-target" $ make check RUNTESTFLAGS="$tb $tbu $tc" ... FAIL: gdb.base/print-file-var.exp: lang=c: hidden=0: dlopen=1: \ version_id_main=0: continue to STOP marker ... Tested on x86_64-linux. Reported-by: Ivan Tetyushkin <ivan.tetyushkin@syntacore.com>
Diffstat (limited to 'gdbsupport/common-utils.cc')
0 files changed, 0 insertions, 0 deletions