test_class_help "breakpoints" {
"Making program stop at certain points\.\[\r\n\]+"
}
-test_class_help "data" {"Examining data\.\[\r\n\]+"}
-test_class_help "files" {"Specifying and examining files\.\[\r\n\]+"}
-test_class_help "internals" {
- "Maintenance commands\.\[\r\n\]+"
- "Some gdb commands are provided just for use by gdb maintainers\.\[\r\n\]+"
- "These commands are subject to frequent change, and may not be as\[\r\n\]+"
- "well documented as user commands\.\[\r\n\]+"
+with_read1_timeout_factor 10 {
+ test_class_help "data" {"Examining data\.\[\r\n\]+"}
+ test_class_help "files" {"Specifying and examining files\.\[\r\n\]+"}
+ test_class_help "internals" {
+ "Maintenance commands\.\[\r\n\]+"
+ "Some gdb commands are provided just for use by gdb maintainers\.\[\r\n\]+"
+ "These commands are subject to frequent change, and may not be as\[\r\n\]+"
+ "well documented as user commands\.\[\r\n\]+"
+ }
}
test_class_help "obscure" {"Obscure features\.\[\r\n\]+"}
test_class_help "running" {"Running the program\.\[\r\n\]+"}
"When the program being debugged stops, gdb selects the innermost frame\.\[\r\n\]+"
"The commands below can be used to select other frames by number or address\.\[\r\n\]+"
}
-test_class_help "status" {
- "Status inquiries\.\[\r\n\]+"
-}
-test_class_help "support" {"Support facilities\.\[\r\n\]+"}
-test_class_help "tracepoints" {
- "Tracing of program execution without stopping the program\.\[\r\n\]+"
+with_read1_timeout_factor 10 {
+ test_class_help "status" {
+ "Status inquiries\.\[\r\n\]+"
+ }
+ test_class_help "support" {"Support facilities\.\[\r\n\]+"}
+ test_class_help "tracepoints" {
+ "Tracing of program execution without stopping the program\.\[\r\n\]+"
+ }
}
-test_user_defined_class_help
-
-# Test help of an abbreviated command. "break" is picked at random.
-set help_breakpoint_text "Set breakpoint at specified location\..*"
-# test help breakpoint "b" abbreviation
-gdb_test "help b" $help_breakpoint_text "help breakpoint \"b\" abbreviation"
-# test help breakpoint "br" abbreviation
-gdb_test "help br" $help_breakpoint_text "help breakpoint \"br\" abbreviation"
-# test help breakpoint "bre" abbreviation
-gdb_test "help bre" $help_breakpoint_text "help breakpoint \"bre\" abbreviation"
-# test help breakpoint "brea" abbreviation
+with_read1_timeout_factor 10 {
+ test_user_defined_class_help
+
+ # Test help of an abbreviated command. "break" is picked at random.
+ set help_breakpoint_text "Set breakpoint at specified location\..*"
+ # test help breakpoint "b" abbreviation
+ gdb_test "help b" $help_breakpoint_text "help breakpoint \"b\" abbreviation"
+ # test help breakpoint "br" abbreviation
+ gdb_test "help br" $help_breakpoint_text "help breakpoint \"br\" abbreviation"
+ # test help breakpoint "bre" abbreviation
+ gdb_test "help bre" $help_breakpoint_text "help breakpoint \"bre\" abbreviation"
+ # test help breakpoint "brea" abbreviation
+}
gdb_test "help brea" $help_breakpoint_text "help breakpoint \"brea\" abbreviation"
# test help breakpoint "break" abbreviation
gdb_test "help break" $help_breakpoint_text "help breakpoint \"break\" abbreviation"
set testname "$test"
gdb_test "$test" "$r1$r2$r3$r4" "$testname"
+proc gdb_test_multiple_with_read1_timeout_factor { factor command message \
+ user_code } {
+ with_read1_timeout_factor $factor {
+ uplevel [list gdb_test_multiple $command $message $user_code]
+ }
+}
+
set test "info macros"
set r1 ".*#define FOO \"hello\""
set r2 ".*#define ONE"
set r3 ".*\r\n$gdb_prompt"
set testname "$test 2"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re "$r1$r2$r3" {
pass $testname
}
set r3 ".*#define TWO"
set r4 ".*\r\n$gdb_prompt"
set testname "$test 3"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define THREE.*\r\n$gdb_prompt" {
fail $testname
}
set r4 ".*#define TWO"
set r5 ".*\r\n$gdb_prompt"
set testname "$test 4"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define FOUR.*\r\n$gdb_prompt" {
fail $testname
}
}
# same as above with a linespec.
set test "info macros *\$pc"
-gdb_test_multiple "$test" $test {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $test {
-re ".*#define FOUR.*\r\n$gdb_prompt" {
fail $test
}
set r4 ".*\r\n$gdb_prompt"
set test "info macros"
set testname "$test 5"
-gdb_test_multiple "$test" $test {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $test {
-re ".*#define THREE.*\r\n$gdb_prompt" {
fail $testname
}
set r1 ".*#define DEF_MACROS"
set r2 ".*\r\n$gdb_prompt"
set testname "$test 6"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define FOO \" \".*\r\n$gdb_prompt" {
fail $testname
}
set r3 ".*#define FOUR"
set r4 ".*\r\n$gdb_prompt"
set testname "$test 7"
-gdb_test_multiple "$test" $testname {
+gdb_test_multiple_with_read1_timeout_factor 10 "$test" $testname {
-re ".*#define FOO \" \".*\r\n$gdb_prompt" {
fail $testname
}
node_result result 10 $limit {} 0 $log
if {!$log} {
+ if {$limit < 0 || $limit >= 8 } {
+ set read1_timeout_factor 10
+ } else {
+ set read1_timeout_factor 1
+ }
# The only output we check for is the contents of the struct,
# ignoring the leading "type = struct S10 {" and trailing "}" of
# the outermost node.
set result [lindex $result 0]
lassign $result type access key name children
- cp_test_ptype_class $name "ptype $name (limit = $limit)" $key \
- $name $children
+ with_read1_timeout_factor $read1_timeout_factor {
+ cp_test_ptype_class $name "ptype $name (limit = $limit)" $key \
+ $name $children
+ }
}
}