public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [testsuite] Remove BASEDIR
@ 2016-02-04 15:57 sergiodj+buildbot
  2016-02-04 15:57 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: sergiodj+buildbot @ 2016-02-04 15:57 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 31d913c7e4e84edf88b4324c3a9a8fb31c8206ec ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 31d913c7e4e84edf88b4324c3a9a8fb31c8206ec

[testsuite] Remove BASEDIR

BASEDIR was added by https://sourceware.org/ml/gdb-patches/2013-10/msg00587.html
in order to handle the different directory layout in serial testing
and parallel testing.  BASEDIR is "gdb.base" in serial testing and is
"outputs/gdb.base/TESTNAME" in parallel testing.  However, it doesn't
work if the GDBserver is in remote target, like this,

$ make check RUNTESTFLAGS='--target_board=remote-gdbserver-on-localhost foll-vfork.exp foll-exec.exp'
FAIL: gdb.base/foll-exec.exp: continue to first exec catchpoint (the program exited)
FAIL: gdb.base/foll-vfork.exp: exec: vfork and exec child follow, to main bp: continue to bp (the program exited)
FAIL: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: finish (the program exited)
FAIL: gdb.base/foll-vfork.exp: exec: vfork relations in info inferiors: continue to bp (the program exited)

these tests fail because the executable can't be found.  With target
board native-gdbserver, the program is spawned this way,

 spawn ../gdbserver/gdbserver --once :2347 /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.base/foll-vfork

so BASEDIR is correct.  However, with target board
remote-gdbserver-on-localhost, the program is spawned

  spawn /usr/bin/ssh -l yao localhost /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/../gdbserver/gdbserver --once :2346 /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.base/foll-vfork

so BASEDIR (either "gdb.base" or "outputs/gdb.base/TESTNAME") makes no
sense.

I had a fix that pass absolute directory to BASEDIR, but it assumes
that directory structure is the same on build and target, and it
doesn't work in remote host case.  The current fix in this patch is
to get the directory from argv[0].  In any case, the program to be
exec'ed is at the same directory with the main program.

Note that these tests do "next N" to let program stop at the desired
line, but it is fragile, because GDB for different targets may skip
function prologue slightly differently, so I replace some of them by
"tbreak on LINE NUMBER and continue".

gdb/testsuite:

2016-02-04  Yao Qi  <yao.qi@linaro.org>

	* gdb.base/foll-exec-mode.c: Include limits.h.
	(main): Add parameters argc and argv.  Get directory from
	argv[0].
	* gdb.base/foll-exec-mode.exp: Don't pass -DBASEDIR in
	compilation.
	* gdb.base/foll-exec.c: Include limits.h.
	(main): Add parameters argc and argv.
	Get directory from argv[0].
	* gdb.base/foll-exec.exp: Don't pass -DBASEDIR in compilation.
	Adjust tests on the number of lines as source code changed.
	* gdb.base/foll-vfork-exit.c: Include limits.h.
	(main): Add one line of statement before vfork.
	* gdb.base/foll-vfork.c: Include limits.h and string.h.
	(main): Add parameters argc and argv.  Get directory from
	argv[0].
	* gdb.base/foll-vfork.exp: Don't pass -DBASEDIR in compilation.
	(setup_gdb): Set tbreak to skip some source lines.
	* gdb.multi/bkpt-multi-exec.c: Include limits.h.
	(main): Add parameters argc and argv.  Get directory from
	argv[0].
	* gdb.multi/bkpt-multi-exec.exp: Don't pass -DBASEDIR in
	compilation.
	* gdb.multi/multi-arch-exec.c: Include limits.h and string.h.
	(main): Add parameters argc and argv.  Get directory from
	argv[0].
	* gdb.multi/multi-arch-exec.exp: Don't pass -DBASEDIR in
	compilation.


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-02-04 18:11 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-04 15:57 [binutils-gdb] [testsuite] Remove BASEDIR sergiodj+buildbot
2016-02-04 15:57 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
2016-02-04 15:58 ` Failures on Fedora-i686, " sergiodj+buildbot
2016-02-04 15:59 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2016-02-04 15:59 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2016-02-04 16:01 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2016-02-04 16:03 ` Failures on Fedora-x86_64-cxx-build-m64, " sergiodj+buildbot
2016-02-04 16:11 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-02-04 16:12 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-04 16:14 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2016-02-04 16:17 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2016-02-04 16:17 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2016-02-04 16:23 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2016-02-04 16:36 ` Failures on Debian-i686, " sergiodj+buildbot
2016-02-04 16:46 ` Failures on Debian-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-04 16:57 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2016-02-04 17:04 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-04 17:07 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
2016-02-04 17:22 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2016-02-04 17:24 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2016-02-04 17:30 ` Failures on Debian-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-02-04 17:43 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-04 17:56 ` Failures on Fedora-ppc64le-cc-with-index, " sergiodj+buildbot
2016-02-04 18:11 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot

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).