This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[pushed] gdb: Fix a few unstable test names


Avoid putting unstable path names in test messages, in order to avoid
spurious testrun result diffs like:

 [....]
 -PASS: gdb.base/break-fun-addr.exp: /home/pedro/gdb/test-build1/gdb/testsuite/outputs/gdb.base/break-fun-addr/break-fun-addr1: break *main
 +PASS: gdb.base/break-fun-addr.exp: /home/pedro/gdb/test-build2/gdb/testsuite/outputs/gdb.base/break-fun-addr/break-fun-addr1: break *main
 [....]

gdb/ChangeLog:
2017-03-08  Pedro Alves  <palves@redhat.com>

	* gdb.base/break-fun-addr.exp: Use $testfile1/$testfile2 for test
	prefix instead of $binfile1/$binfile2.
	* gdb.btrace/gcore.exp: Use "core" instead of unstable path name
	in test message.
	* gdb.python/py-completion.exp: Use "load python file" as test
	messages instead of unstable path names.
---
 gdb/testsuite/ChangeLog                    | 9 +++++++++
 gdb/testsuite/gdb.base/break-fun-addr.exp  | 4 ++--
 gdb/testsuite/gdb.btrace/gcore.exp         | 3 ++-
 gdb/testsuite/gdb.python/py-completion.exp | 6 ++++--
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d7b603b..b2b14db 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,4 +1,13 @@
 2017-03-08  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/break-fun-addr.exp: Use $testfile1/$testfile2 for test
+	prefix instead of $binfile1/$binfile2.
+	* gdb.btrace/gcore.exp: Use "core" instead of unstable path name
+	in test message.
+	* gdb.python/py-completion.exp: Use "load python file" as test
+	messages instead of unstable path names.
+
+2017-03-08  Pedro Alves  <palves@redhat.com>
 	    Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	PR cli/21218
diff --git a/gdb/testsuite/gdb.base/break-fun-addr.exp b/gdb/testsuite/gdb.base/break-fun-addr.exp
index cbf9828..0597b99 100644
--- a/gdb/testsuite/gdb.base/break-fun-addr.exp
+++ b/gdb/testsuite/gdb.base/break-fun-addr.exp
@@ -46,7 +46,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {d
 
 clean_restart ${binfile1}
 
-with_test_prefix "${binfile1}" {
+with_test_prefix "${testfile1}" {
 
     gdb_test "break *main" \
         "Breakpoint.*at.* file .*$srcfile1, line .*" \
@@ -73,7 +73,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {d
 # start a new debugging session with a different executable.
 gdb_load ${binfile2}
 
-with_test_prefix "${binfile2}" {
+with_test_prefix "${testfile2}" {
 
     gdb_run_cmd
     gdb_test "" \
diff --git a/gdb/testsuite/gdb.btrace/gcore.exp b/gdb/testsuite/gdb.btrace/gcore.exp
index d6b311b..c136d12 100644
--- a/gdb/testsuite/gdb.btrace/gcore.exp
+++ b/gdb/testsuite/gdb.btrace/gcore.exp
@@ -41,4 +41,5 @@ gdb_test "record goto begin" ".*main\.2.*"
 
 # generate a core file - this used to assert
 set corefile [standard_output_file core]
-gdb_test "generate-core-file $corefile" "Saved corefile $corefile"
+gdb_test "generate-core-file $corefile" "Saved corefile $corefile" \
+    "generate-core-file core"
diff --git a/gdb/testsuite/gdb.python/py-completion.exp b/gdb/testsuite/gdb.python/py-completion.exp
index bb7e775..b99afa7 100644
--- a/gdb/testsuite/gdb.python/py-completion.exp
+++ b/gdb/testsuite/gdb.python/py-completion.exp
@@ -23,7 +23,8 @@ gdb_start
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
-gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py"
+gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py" \
+    "load python file"
 
 # Create a temporary directory
 set testdir "[standard_output_file "py-completion-testdir"]/"
@@ -73,7 +74,8 @@ gdb_test_multiple "" "completefilecommandcond completion" {
 # with the expected output of the below tests in a buggy gdb.
 gdb_exit
 gdb_start
-gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py"
+gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py" \
+    "load python file again"
 
 gdb_test_sequence "complete completel" \
     "list all completions of 'complete completel'" {
-- 
2.5.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]