This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix testenv.exp test case
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 30 Nov 2011 09:33:29 +0100 (CET)
- Subject: [commit] Fix testenv.exp test case
Hello,
I've noticed two issues with the new testenv.exp test case:
- passing environment variables across the remote protocol is not
supported, so this test shouldn't be run remotely
- when running multiple passes of the testsuite in a row
(e.g. using unix/{-m32,-m64}), the second pass will fail because
a global environment variable has remained set after the end of
the first pass
Fixed by the patch below. Tested on s390x-ibm-linux.
Committed to mainline.
Bye,
Ulrich
ChangeLog:
* gdb.base/testenv.exp: Skip on remote targets. Unset global
environment variable after test completed.
Index: gdb-head/gdb/testsuite/gdb.base/testenv.exp
===================================================================
--- gdb-head.orig/gdb/testsuite/gdb.base/testenv.exp
+++ gdb-head/gdb/testsuite/gdb.base/testenv.exp
@@ -22,6 +22,10 @@ if $tracelevel then {
strace $tracelevel
}
+# There's no support for passing environment variables in the remote protocol.
+if { [is_remote target] } {
+ return 0
+}
set testfile "testenv"
set srcfile ${testfile}.c
@@ -119,3 +123,7 @@ gdb_test "continue" \
"Test with TEST_GDB_GLOBAL unset"
gdb_exit
+
+# Clear environment in case we're doing multiple runs
+unset env(TEST_GDB_GLOBAL)
+
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com