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]

[commit/testsuite] Adjust valgrind.exp for my remote host setup


This patch is slightly specific to the way our test harness works, but
I suspect it's not alone.  It is impossible to reliably distinguish
"spawn failed" from "spawn succeeded but the spawned program printed a
message and exited".  We run tests using an SSH / bash session on a
remote host, so "spawn valgrind" produces an exit status of 1 and
a "command not found" message.

Tested on arm-none-eabi and locally on x86_64-linux; committed on
trunk.

-- 
Daniel Jacobowitz
CodeSourcery

2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>

	gdb/testsuite/
	* gdb.base/valgrind-db-attach.exp: Use unsupported instead of xfail.
	Recognize "command not found".

diff -urp gdb-merged-orig/gdb/testsuite/gdb.base/valgrind-db-attach.exp gdb-merged/gdb/testsuite/gdb.base/valgrind-db-attach.exp
--- gdb-merged-orig/gdb/testsuite/gdb.base/valgrind-db-attach.exp	2010-02-10 14:53:22.000000000 -0800
+++ gdb-merged/gdb/testsuite/gdb.base/valgrind-db-attach.exp	2010-02-13 11:19:07.000000000 -0800
@@ -34,8 +34,7 @@ set cmd "valgrind --db-attach=yes $db_co
 set res [remote_spawn host $cmd];
 if { $res < 0 || $res == "" } {
     verbose -log "Spawning $cmd failed."
-    setup_xfail *-*-*
-    fail $test
+    unsupported $test
     return -1
 }
 pass $test
@@ -49,8 +48,13 @@ gdb_test_multiple "" $test {
 	pass $test
     }
     -re "valgrind: failed to start tool 'memcheck' for platform '.*': No such file or directory" {
-	setup_xfail *-*-*
-	fail $test
+	unsupported $test
+	return -1
+    }
+    -re "command not found" {
+	# The spawn succeeded, but then valgrind was not found - e.g. if
+	# we spawned SSH to a remote system.
+	unsupported $test
 	return -1
     }
 }


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