This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] replace wildcard regexp in gdb.base
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 04 Jun 2010 10:54:38 -0700
- Subject: [RFA] replace wildcard regexp in gdb.base
This change replaces gdb_test foo "" ""
with gdb_test foo ".*" ""
2010-06-04 Michael Snyder <msnyder@vmware.com>
* gdb.base/async.exp: Use ".*" instead of "" as wildcard regexp.
* gdb.base/call-ar-st.exp: Ditto.
* gdb.base/checkpoint.exp: Ditto.
* gdb.base/default.exp: Ditto.
* gdb.base/dump.exp: Ditto.
* gdb.base/ending-run.exp: Ditto.
* gdb.base/fileio.exp: Ditto.
* gdb.base/miscexprs.exp: Ditto.
* gdb.base/pointers.exp: Ditto.
* gdb.base/readline.exp: Ditto.
* gdb.base/reread.exp: Ditto.
* gdb.base/restore.exp: Ditto.
* gdb.base/shlib-call.exp: Ditto.
* gdb.base/valgrind-db-attach.exp: Ditto.
* gdb.base/volatile.exp: Ditto.
* gdb.base/watchpoints.exp: Ditto.
Index: async.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/async.exp,v
retrieving revision 1.11
diff -u -p -r1.11 async.exp
--- async.exp 5 May 2010 18:06:57 -0000 1.11
+++ async.exp 4 Jun 2010 17:47:06 -0000
@@ -67,12 +67,12 @@ if ![runto_main] then {
continue
}
-gdb_test "break baz" "" ""
+gdb_test "break baz" ".*" ""
#
# Make sure we get a 'completed' message when the target is done.
#
-gdb_test "set display-exec-done on" "" ""
+gdb_test "set display-exec-done on" ".*" ""
send_gdb "next&\n"
@@ -135,7 +135,7 @@ gdb_expect {
timeout { fail "(timeout) until &" }
}
-gdb_test "set display-exec-done off" "" ""
+gdb_test "set display-exec-done off" ".*" ""
unset_board_info "gdb_protocol"
set_board_info "gdb_protocol" "remote"
Index: call-ar-st.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/call-ar-st.exp,v
retrieving revision 1.26
diff -u -p -r1.26 call-ar-st.exp
--- call-ar-st.exp 1 Jun 2010 21:29:21 -0000 1.26
+++ call-ar-st.exp 4 Jun 2010 17:47:06 -0000
@@ -155,7 +155,7 @@ if ![gdb_skip_stdio_test "continue to 12
"\[ \t\r\n\]+1216.*print_double_array\\(double_array\\)"
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
# I am disabling this test, because it takes too long. I verified by
@@ -192,7 +192,7 @@ if {![gdb_skip_float_test "continuing to
".*main \\(\\) at .*call-ar-st.c:1220\[ \t\r\n\]+.*print_all_arrays\\(integer_array, char_array, float_array, double_array\\)."
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
#step
@@ -206,7 +206,7 @@ if ![gdb_skip_stdio_test "next over prin
"array_i :.*307.*print_char_array.*" \
"next over print_int_array in print-all_arrays"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
#call print_double_array(array_d)
@@ -240,7 +240,7 @@ if {![gdb_skip_float_test "continuing to
"\[ \t\r\n\]+.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
@@ -258,7 +258,7 @@ if ![gdb_skip_stdio_test "next to 1237"]
"BYE BYE FOR NOW.*1237.*printf\\(.VERY GREEN GRASS.n.\\);.*" \
"next to 1237"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
#call print_array_rep(\*list1, \*list2, \*list3)
@@ -319,7 +319,7 @@ if ![gdb_skip_stdio_test "continuing to
"Continuing\\..*Sum of 4 arrays.*Contents of linked list1.*Contents of two_floats_t.*main \\(\\) at .*call-ar-st.c:1281.*c = 0.*" \
"continue to 1281"
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
#call print_small_structs(*struct1, *struct2, *struct3, *struct4,
@@ -500,7 +500,7 @@ if ![gdb_skip_stdio_test "continuing to
gdb_test "continue" "Continuing\\..*Contents of two_floats_t:.*main \\(\\) at.*call-ar-st.c:1300.*1300.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
"continue to 1300"
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
#step
Index: checkpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/checkpoint.exp,v
retrieving revision 1.14
diff -u -p -r1.14 checkpoint.exp
--- checkpoint.exp 24 May 2010 22:03:58 -0000 1.14
+++ checkpoint.exp 4 Jun 2010 17:47:06 -0000
@@ -62,34 +62,34 @@ set break4_loc [gdb_get_line_number "bre
gdb_breakpoint $break1_loc
gdb_test "continue" "breakpoint 1.*" "break1 start"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 two"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 three"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 four"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 five"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 six"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 seven"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 eight"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 nine"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 ten"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "info checkpoints" \
" 10 .* 9 .* 8 .* 7 .* 6 .* 5 .* 4 .* 3 .* 2 .* 1 .*" \
@@ -169,43 +169,43 @@ gdb_test "shell diff -s pi.txt copy1.txt
gdb_breakpoint $break1_loc
gdb_test "restart 1" "Switching to .*c == EOF.*" "restart 1 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 1 one"
gdb_test "step" "if .c == EOF.*" "step in 1 two"
gdb_test "print lines" " = 102.*" "verify lines 1 two"
gdb_test "restart 2" "Switching to .*c == EOF.*" "restart 2 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 2 one"
gdb_test "step" "if .c == EOF.*" "step in 2 two"
gdb_test "print lines" " = 112.*" "verify lines 2 two"
gdb_test "restart 3" "Switching to .*c == EOF.*" "restart 3 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 3 one"
gdb_test "step" "if .c == EOF.*" "step in 3 two"
gdb_test "print lines" " = 522.*" "verify lines 3 two"
gdb_test "restart 4" "Switching to .*c == EOF.*" "restart 4 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 4 one"
gdb_test "step" "if .c == EOF.*" "step in 4 two"
gdb_test "print lines" " = 532.*" "verify lines 4 two"
gdb_test "restart 5" "Switching to .*c == EOF.*" "restart 5 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 5 one"
gdb_test "step" "if .c == EOF.*" "step in 5 two"
gdb_test "print lines" " = 1042.*" "verify lines 5 two"
gdb_test "restart 6" "Switching to .*c == EOF.*" "restart 6 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 6 one"
gdb_test "step" "if .c == EOF.*" "step in 6 two"
gdb_test "print lines" " = 1052.*" "verify lines 5 two"
gdb_test "restart 7" "Switching to .*c == EOF.*" "restart 7 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 1100" "breakpoint 1.*" "breakpoint 1 7 one"
gdb_test "step" "if .c == EOF.*" "step in 7 two"
gdb_test "print lines" " = 1162.*" "verify lines 7 two"
Index: default.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/default.exp,v
retrieving revision 1.40
diff -u -p -r1.40 default.exp
--- default.exp 1 Jun 2010 21:29:21 -0000 1.40
+++ default.exp 4 Jun 2010 17:47:06 -0000
@@ -392,12 +392,12 @@ gdb_test "pwd" "Working directory .*" "p
#test run "r" abbreviation
if [istarget "*-*-vxworks*"] then {
- gdb_test "set args" "" ""
+ gdb_test "set args" ".*" ""
gdb_test "r" "Starting program: .*
You must specify a function name to run, and arguments if any"\
"run \"r\" abbreviation"
- gdb_test "set args main" "" ""
+ gdb_test "set args main" ".*" ""
} else {
gdb_test_multiple "r" "run \"r\" abbreviation" {
@@ -418,11 +418,11 @@ You must specify a function name to run,
#test run
if [istarget "*-*-vxworks*"] then {
- gdb_test "set args" "" ""
+ gdb_test "set args" ".*" ""
gdb_test "run" "Starting program: .*
You must specify a function name to run, and arguments if any"
- gdb_test "set args main" "" ""
+ gdb_test "set args main" ".*" ""
} else {
gdb_test_multiple "run" "run" {
Index: dump.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/dump.exp,v
retrieving revision 1.21
diff -u -p -r1.21 dump.exp
--- dump.exp 24 May 2010 22:06:59 -0000 1.21
+++ dump.exp 4 Jun 2010 17:47:06 -0000
@@ -488,7 +488,7 @@ gdb_test "print intarray\[2\] == 0" " =
gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 4"
if ![string compare $is64bitonly "no"] then {
- gdb_test "print zero_all ()" "" ""
+ gdb_test "print zero_all ()" ".*" ""
# restore with expressions
test_restore_saved_value \
Index: ending-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ending-run.exp,v
retrieving revision 1.42
diff -u -p -r1.42 ending-run.exp
--- ending-run.exp 24 May 2010 22:06:59 -0000 1.42
+++ ending-run.exp 4 Jun 2010 17:47:06 -0000
@@ -105,7 +105,7 @@ if ![gdb_skip_stdio_test "Step to return
gdb_test "next" ".*Goodbye!.*32.*" \
"Step to return"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
set old_timeout $timeout
Index: fileio.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/fileio.exp,v
retrieving revision 1.18
diff -u -p -r1.18 fileio.exp
--- fileio.exp 24 May 2010 22:06:59 -0000 1.18
+++ fileio.exp 4 Jun 2010 17:47:06 -0000
@@ -83,7 +83,7 @@ gdb_test continue \
"Continuing\\..*open 4:.*ENOENT$stop_msg" \
"Opening nonexistant file returns ENOENT"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
catch "system \"chmod -f -w nowrt.fileio.test\""
Index: miscexprs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/miscexprs.exp,v
retrieving revision 1.16
diff -u -p -r1.16 miscexprs.exp
--- miscexprs.exp 25 May 2010 19:34:04 -0000 1.16
+++ miscexprs.exp 4 Jun 2010 17:47:06 -0000
@@ -69,7 +69,7 @@ if ![runto_main] then {
continue
}
-gdb_test "break marker1" "" ""
+gdb_test "break marker1" ".*" ""
gdb_test "cont" \
"Break.* marker1 \\(\\) at .*:$decimal.*" \
Index: pointers.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pointers.exp,v
retrieving revision 1.22
diff -u -p -r1.22 pointers.exp
--- pointers.exp 1 Jun 2010 21:29:21 -0000 1.22
+++ pointers.exp 4 Jun 2010 17:47:06 -0000
@@ -215,7 +215,7 @@ gdb_test "print **ptr_to_ptr_to_float" "
# with elementary type variables and pointers.
#
-gdb_test "break marker1" "" ""
+gdb_test "break marker1" ".*" ""
gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" \
continue to marker1"
gdb_test "up" "more_code.*" "up from marker1"
Index: readline.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/readline.exp,v
retrieving revision 1.10
diff -u -p -r1.10 readline.exp
--- readline.exp 1 Jan 2010 07:32:01 -0000 1.10
+++ readline.exp 4 Jun 2010 17:47:06 -0000
@@ -136,7 +136,7 @@ proc operate_and_get_next {name args} {
}
# Match the prompt so the next test starts at the right place.
- gdb_test "" "" "$name - final prompt"
+ gdb_test "" ".*" "$name - final prompt"
return 1
}
Index: reread.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/reread.exp,v
retrieving revision 1.15
diff -u -p -r1.15 reread.exp
--- reread.exp 5 May 2010 18:06:58 -0000 1.15
+++ reread.exp 4 Jun 2010 17:47:07 -0000
@@ -53,7 +53,7 @@ gdb_reinitialize_dir $srcdir/$subdir
# Load the first executable.
-gdb_test "shell mv ${binfile1} ${binfile}" "" ""
+gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
gdb_load ${binfile}
# Set a breakpoint at foo
@@ -82,10 +82,10 @@ gdb_expect {
# second executable into its place. Ensure that the new
# executable is at least a second newer than the old.
-gdb_test "shell mv ${binfile} ${binfile1}" "" ""
-gdb_test "shell mv ${binfile2} ${binfile}" "" ""
-gdb_test "shell sleep 1" "" ""
-gdb_test "shell touch ${binfile}" "" ""
+gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
+gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
+gdb_test "shell sleep 1" ".*" ""
+gdb_test "shell touch ${binfile}" ".*" ""
# Run a second time; GDB should detect that the executable has changed
# and reset the breakpoints correctly.
@@ -120,8 +120,8 @@ if [is_remote target] {
} else {
# Put the older executable back in place.
- gdb_test "shell mv ${binfile} ${binfile2}" "" ""
- gdb_test "shell mv ${binfile1} ${binfile}" "" ""
+ gdb_test "shell mv ${binfile} ${binfile2}" ".*" ""
+ gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
# Restart GDB entirely.
gdb_start
@@ -155,8 +155,8 @@ if [is_remote target] {
# Now move the newer executable into place, and re-run. GDB
# should still notice that the executable file has changed,
# and still re-set the breakpoint appropriately.
- gdb_test "shell mv ${binfile} ${binfile1}" "" ""
- gdb_test "shell mv ${binfile2} ${binfile}" "" ""
+ gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
+ gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
gdb_run_cmd
gdb_expect {
-re ".*Breakpoint.* foo .* at .*:9.*$gdb_prompt $" {
Index: restore.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/restore.exp,v
retrieving revision 1.17
diff -u -p -r1.17 restore.exp
--- restore.exp 27 May 2010 23:44:51 -0000 1.17
+++ restore.exp 4 Jun 2010 17:47:07 -0000
@@ -98,7 +98,7 @@ proc restore_tests { } {
}
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
}
Index: shlib-call.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shlib-call.exp,v
retrieving revision 1.19
diff -u -p -r1.19 shlib-call.exp
--- shlib-call.exp 27 May 2010 23:44:51 -0000 1.19
+++ shlib-call.exp 4 Jun 2010 17:47:07 -0000
@@ -94,7 +94,7 @@ if ![gdb_skip_stdio_test "next over shr1
"address of sgs is $hex.*g = shr2\\(g\\);" \
"next over shr1"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
Index: valgrind-db-attach.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/valgrind-db-attach.exp,v
retrieving revision 1.3
diff -u -p -r1.3 valgrind-db-attach.exp
--- valgrind-db-attach.exp 1 Jun 2010 21:29:21 -0000 1.3
+++ valgrind-db-attach.exp 4 Jun 2010 17:47:07 -0000
@@ -71,7 +71,7 @@ gdb_test_multiple "" $test {
}
}
-gdb_test "" "" "eat first prompt"
+gdb_test "" ".*" "eat first prompt"
# Initialization from default_gdb_start.
gdb_test_no_output "set height 0"
Index: volatile.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/volatile.exp,v
retrieving revision 1.19
diff -u -p -r1.19 volatile.exp
--- volatile.exp 27 May 2010 23:44:51 -0000 1.19
+++ volatile.exp 4 Jun 2010 17:47:07 -0000
@@ -87,7 +87,7 @@ proc local_compiler_xfail_check_2 { } {
}
}
-gdb_test "break marker1" "" ""
+gdb_test "break marker1" ".*" ""
gdb_test_multiple "cont" "continue to marker1" {
-re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
Index: watchpoints.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoints.exp,v
retrieving revision 1.6
diff -u -p -r1.6 watchpoints.exp
--- watchpoints.exp 3 Jun 2010 23:54:17 -0000 1.6
+++ watchpoints.exp 4 Jun 2010 17:47:07 -0000
@@ -48,8 +48,8 @@ gdb_load $binfile
}
runto_main
- gdb_test "watch ival1" "" ""
- gdb_test "watch ival3" "" ""
+ gdb_test "watch ival1" ".*" ""
+ gdb_test "watch ival3" ".*" ""
set prev_timeout $timeout
set timeout 600