diff --git a/gdb/testsuite/gdb.base/info_qt.exp b/gdb/testsuite/gdb.base/info_qt.exp
index 83084a3ce83..ab0872973a7 100644
--- a/gdb/testsuite/gdb.base/info_qt.exp
+++ b/gdb/testsuite/gdb.base/info_qt.exp
@@ -42,7 +42,7 @@ set number "\[0-9]\+"
 ############# Test 'info functions'.
 
 with_test_prefix "info functions nameregexp" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info functions info_fun"
 	"info functions -- info_fun"
 	"info functions ^info_fun" } {
@@ -56,13 +56,12 @@ with_test_prefix "info functions nameregexp" {
 		     "${number}:	int info_fun2bis\\\(char\\\);" \
 		     "${number}:	entier info_fun2xxx\\\(char, int, int\\\);" \
 		     "${number}:	entier info_fun2yyy\\\(char, int, int\\\);" \
-		    ] \
-		"info functions info_fun"
+		    ]
     }
 }
 
 with_test_prefix "info functions nameregexp quiet" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info functions -q info_fun"
 	"info functions -q -- info_fun" } {
 	    gdb_test $cmd \
@@ -74,21 +73,20 @@ with_test_prefix "info functions nameregexp quiet" {
 		     "${number}:	int info_fun2bis\\\(char\\\);" \
 		     "${number}:	entier info_fun2xxx\\\(char, int, int\\\);" \
 		     "${number}:	entier info_fun2yyy\\\(char, int, int\\\);" \
-		    ] \
-		"info functions -q info_fun"
+		    ]
 	}
 }
 
 with_test_prefix "info functions nameregexp quiet no match" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info functions -q nowaythiscanmatch"
 	"info functions -q -- -q" } {
-	    gdb_test_no_output $cmd "quiet info functions empty output"
+	    gdb_test_no_output $cmd
 	}
 }
 
 with_test_prefix "info functions typeregexp nameregexp" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info functions -t entier -q info_fun"
 	"info functions -q -t 'entier (' -- info_fun"
 	"info functions -q -t '(char, int, int)' -- info_fun"
@@ -99,8 +97,7 @@ with_test_prefix "info functions typeregexp nameregexp" {
 		     "File .*info_qt.c:" \
 		     "${number}:	entier info_fun2xxx\\\(char, int, int\\\);" \
 		     "${number}:	entier info_fun2yyy\\\(char, int, int\\\);" \
-		    ] \
-		"info functions -q info_fun"
+		    ]
 	}
 }
 
@@ -112,7 +109,7 @@ with_test_prefix "info functions typeregexp nameregexp no match" {
 ############# Test 'info variables'.
 
 with_test_prefix "info variables nameregexp" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info variables info_qt"
 	"info variables -- info_qt"
 	"info variables ^info_qt" } {
@@ -123,21 +120,20 @@ with_test_prefix "info variables nameregexp" {
 		     "File .*info_qt.c:" \
 		     "${number}:	entier info_qt_ent;" \
 		     "${number}:	int info_qt_inc;" \
-		    ] \
-		"info functions info_fun"
+		    ]
 	}
 }
 
 with_test_prefix "info variables nameregexp quiet no match" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info variables -q nowaythiscanmatch"
 	"info variables -q -- -q" } {
-	    gdb_test_no_output $cmd "quiet info variables empty output"
+	    gdb_test_no_output $cmd
 	}
 }
 
 with_test_prefix "info variables typeregexp nameregexp quiet" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info variables -t entier -q info_qt"
 	"info variables -q -t entier -- info_qt" } {
 	    gdb_test $cmd \
@@ -145,8 +141,7 @@ with_test_prefix "info variables typeregexp nameregexp quiet" {
 		     "" \
 		     "File .*info_qt.c:" \
 		     "${number}:	entier info_qt_ent;" \
-		    ] \
-		"info variables -q -t entier info_fun"
+		    ]
 	}
 }
 
@@ -162,7 +157,7 @@ with_test_prefix "info variables typeregexp nameregexp quiet no match" {
 gdb_test "frame 1" ".* in setup .*" "set frame 1 for info args"
 
 with_test_prefix "info args matching all args" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info args"
 	"info args arg_"
 	"info args g"
@@ -172,21 +167,19 @@ with_test_prefix "info args matching all args" {
 		     "arg_c = 100 'd'" \
 		     "arg_i = 3" \
 		     "arg_j = 4" \
-		    ] \
-		"info args"
+		    ]
 	}
 }
 
 with_test_prefix "info args matching some args" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info args -t int"
 	"info args arg_[ij]"} {
 	    gdb_test $cmd \
 		[multi_line \
 		     "arg_i = 3" \
 		     "arg_j = 4" \
-		    ] \
-		"info args"
+		    ]
 	}
 }
 
@@ -201,7 +194,7 @@ with_test_prefix "info args no match" {
 gdb_test "frame 1" ".* in setup .*" "set frame 1 for info locals"
 
 with_test_prefix "info locals matching all locals" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info locals"
 	"info locals loc_arg_"
 	"info locals g"
@@ -211,13 +204,12 @@ with_test_prefix "info locals matching all locals" {
 		     "loc_arg_c = 100 'd'" \
 		     "loc_arg_i = 3" \
 		     "loc_arg_j = 4" \
-		    ] \
-		"info locals"
+		    ]
 	}
 }
 
 with_test_prefix "info locals matching some locals" {
-    foreach_with_prefix cmd {
+    foreach cmd {
 	"info locals -t int"
 	"info locals arg_[ij]"
 	"info locals loc_arg_[ij]"} {
@@ -225,8 +217,7 @@ with_test_prefix "info locals matching some locals" {
 		[multi_line \
 		     "loc_arg_i = 3" \
 		     "loc_arg_j = 4" \
-		    ] \
-		"info args"
+		    ]
 	}
 }
 
