public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: [PATCH v2 16/17] fix some fission tests
Date: Fri, 18 Oct 2013 21:44:00 -0000	[thread overview]
Message-ID: <1382129374-18344-17-git-send-email-tromey@redhat.com> (raw)
In-Reply-To: <1382129374-18344-1-git-send-email-tromey@redhat.com>

A couple of Fission tests rely on the current directory layout.  This
assumption is not valid in parallel mode.

This patch fixes the problem by removing the relative directory from
the .S files and instead having the tests set debug-file-directory
before opening the main file.

	* gdb.dwarf2/fission-base.S: Remove "gdb.dwarf/".
	* gdb.dwarf2/fission-base.exp: Set debug-file-directory
	before loading binfile.
	* gdb.dwarf2/fission-loclists.S: Remove "gdb.dwarf/".
	* gdb.dwarf2/fission-loclists.exp: Set debug-file-directory
	before loading binfile.
---
 gdb/testsuite/gdb.dwarf2/fission-base.S       | 4 ++--
 gdb/testsuite/gdb.dwarf2/fission-base.exp     | 9 ++++++++-
 gdb/testsuite/gdb.dwarf2/fission-loclists.S   | 2 +-
 gdb/testsuite/gdb.dwarf2/fission-loclists.exp | 9 ++++++++-
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.S b/gdb/testsuite/gdb.dwarf2/fission-base.S
index ccd6b23..e670423 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.S
@@ -85,7 +85,7 @@ main:
 	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
 	.ascii "GNU C 4.6.x-fission\0"	# DW_AT_producer
 	.byte	0x1	# DW_AT_language
-	.ascii "gdb.dwarf2/fission-base.c\0"	# DW_AT_name
+	.ascii "fission-base.c\0"	# DW_AT_name
 	.ascii "/tmp/src/gdb/testsuite\0"	# DW_AT_comp_dir
 	.byte	1	# DW_AT_GNU_dwo_id
 	.byte	2
@@ -143,7 +143,7 @@ main:
 	.8byte	.Letext0-.Ltext0	# DW_AT_high_pc
 	.4byte	.Ldebug_line0	# DW_AT_stmt_list
 	.ascii "/tmp/src/gdb/testsuite\0"	# DW_AT_comp_dir
-	.ascii "gdb.dwarf2/fission-base.dwo\0"	# DW_AT_GNU_dwo_name
+	.ascii "fission-base.dwo\0"	# DW_AT_GNU_dwo_name
 	.4byte	.Ldebug_pubnames0	# DW_AT_GNU_pubnames
 	.4byte	.Ldebug_pubtypes0	# DW_AT_GNU_pubtypes
 	.4byte	.Ldebug_addr0_begin	# DW_AT_GNU_addr_base
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index bb4eb77..81ca585 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -37,7 +37,14 @@ if [build_executable_from_fission_assembler \
     return -1
 }
 
-clean_restart ${binfile}
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we can find the .dwo file, regardless of whether we're
+# running in parallel mode.
+gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
+    "set debug-file-directory"
+gdb_load $binfile
 
 if ![runto_main] {
     return -1
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.S b/gdb/testsuite/gdb.dwarf2/fission-loclists.S
index 876c610..ee34a29 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.S
@@ -240,7 +240,7 @@ main:
 	.byte	0x5
 	.4byte	.Ldebug_ranges0	# DW_AT_GNU_ranges_base
 	.ascii "/tmp/src/gdb/testsuite\0"	# DW_AT_comp_dir
-	.ascii "gdb.dwarf2/fission-loclists.dwo\0"	# DW_AT_GNU_dwo_name
+	.ascii "fission-loclists.dwo\0"	# DW_AT_GNU_dwo_name
 	.4byte	.Ldebug_pubnames0	# DW_AT_GNU_pubnames
 	.4byte	.Ldebug_pubtypes0	# DW_AT_GNU_pubtypes
 	.4byte	.Ldebug_addr0	# DW_AT_GNU_addr_base
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index 29ccd1b..dccd6c2 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -37,7 +37,14 @@ if [build_executable_from_fission_assembler \
     return -1
 }
 
-clean_restart ${binfile}
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we can find the .dwo file, regardless of whether we're
+# running in parallel mode.
+gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
+    "set debug-file-directory"
+gdb_load $binfile
 
 if ![runto_main] {
     return -1
-- 
1.8.1.4

  parent reply	other threads:[~2013-10-18 21:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 20:49 [PATCH v2 00/17] test suite parallel safety Tom Tromey
2013-10-18 20:49 ` [PATCH v2 03/17] fix weird.exp for parallel testing Tom Tromey
2013-10-18 20:49 ` [PATCH v2 12/17] fix up gdb.server Tom Tromey
2013-10-18 20:49 ` [PATCH v2 07/17] fix up gdb.trace Tom Tromey
2013-10-25 16:22   ` Pedro Alves
2013-10-25 16:37     ` Tom Tromey
2013-10-18 20:49 ` [PATCH v2 06/17] fix up gdb.mi Tom Tromey
2013-10-18 20:49 ` [PATCH v2 09/17] update checkpoint test Tom Tromey
2013-10-18 20:49 ` [PATCH v2 15/17] fix some "exec" tests Tom Tromey
2013-10-25 16:21   ` Pedro Alves
2013-10-25 16:39     ` Tom Tromey
2013-10-25 17:02       ` Pedro Alves
2013-10-18 20:49 ` [PATCH v2 08/17] simple changes in gdb.base Tom Tromey
2013-10-18 20:49 ` [PATCH v2 01/17] fix up log-file toggling Tom Tromey
2013-10-18 20:49 ` [PATCH v2 02/17] fix some simple thinkos in the test suite Tom Tromey
2013-10-18 21:00 ` [PATCH v2 14/17] fix argv0-symlink.exp for parallel mode Tom Tromey
2013-10-18 21:00 ` [PATCH v2 11/17] introduce relative_filename and use it Tom Tromey
2013-10-25 16:22   ` Pedro Alves
2013-10-25 16:42     ` Tom Tromey
2013-10-25 17:03       ` Pedro Alves
2013-10-28 19:01   ` Doug Evans
2013-10-28 20:10     ` Tom Tromey
2013-10-18 21:11 ` [PATCH v2 17/17] switch to fully parallel mode Tom Tromey
2013-10-18 21:24 ` [PATCH v2 10/17] update fileio test Tom Tromey
2013-10-18 21:24 ` [PATCH v2 13/17] make gdb.asm parallel-safe Tom Tromey
2013-10-18 21:36 ` [PATCH v2 05/17] fix up gdb.xml Tom Tromey
2013-10-25 16:21   ` Pedro Alves
2013-10-25 18:23     ` Tom Tromey
2013-10-18 21:36 ` [PATCH v2 04/17] fix up gdb.gdb Tom Tromey
2013-10-18 21:44 ` Tom Tromey [this message]
2013-10-25 16:23 ` [PATCH v2 00/17] test suite parallel safety Pedro Alves

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=1382129374-18344-17-git-send-email-tromey@redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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).