diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7f2c8391f8f3d12b1f19695dc0a2f639ef292719..c0954b32c6fbdd21ef6e11302a4de7175980a3d4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-26  Joseph Myers  <joseph@codesourcery.com>
+
+	* gdb.mi/mi-basics.exp (test_cwd_specification): Do not test
+	environment-pwd for remote host.
+	* gdb.mi/mi2-basics.exp (test_cwd_specification): Likewise.
+
 2009-08-24  Keith Seitz  <keiths@redhat.com>
 
 	* gdb.cp/cpcompletion.exp (test_class_complete): New procedure.
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index fd9df8321239e3cd4216121377502daf72bfa9c0..ffacec226620731598ee1d76618c9866c183a464 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -184,9 +184,13 @@ proc test_cwd_specification {} {
              "205\\\^done" \
              "environment-cd arg operation"
 
-    mi_gdb_test "206-environment-pwd" \
+    # The canonical name of the working directory may differ on a
+    # remote host from that on the build system.
+    if ![is_remote host] {
+	mi_gdb_test "206-environment-pwd" \
              "206\\\^done,cwd=\"${escapedobjdir}\"" \
              "environment-pwd operation"
+    }
 }
 
 proc test_path_specification {} {
diff --git a/gdb/testsuite/gdb.mi/mi2-basics.exp b/gdb/testsuite/gdb.mi/mi2-basics.exp
index db22c937455fad37bf4f96ffa6dc38d0d16d398c..7d72afb9f5e087ab2127a73b03ffb1af06a11499 100644
--- a/gdb/testsuite/gdb.mi/mi2-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi2-basics.exp
@@ -186,9 +186,13 @@ proc test_cwd_specification {} {
              "205\\\^done" \
              "environment-cd arg operation"
 
-    mi_gdb_test "206-environment-pwd" \
+    # The canonical name of the working directory may differ on a
+    # remote host from that on the build system.
+    if ![is_remote host] {
+	mi_gdb_test "206-environment-pwd" \
              "206\\\^done,cwd=\"${escapedobjdir}\"" \
              "environment-pwd operation"
+    }
 }
 
 proc test_path_specification {} {