aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-03-02 15:17:01 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-03-02 15:17:01 +0000
commit9a5193cb858fc753c5f74f81abde85a8df753498 (patch)
tree0c8c37a0e108c257330221f94707976727ce3653 /gdb
parentd0773f31b4d16d5c88df71944ec26273c59988ec (diff)
downloadgdb-9a5193cb858fc753c5f74f81abde85a8df753498.zip
gdb-9a5193cb858fc753c5f74f81abde85a8df753498.tar.gz
gdb-9a5193cb858fc753c5f74f81abde85a8df753498.tar.bz2
use gdb_test_no_output in gdb.python/py-inferior.exp
gdb/testsuite/ChangeLog: * gdb.python/py-inferior.exp: Use gdb_test_no_output instead of gdb_test when running a test where we expected no output back.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.python/py-inferior.exp78
2 files changed, 44 insertions, 39 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c67a526..ac9bd0e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-02 Joel Brobecker <brobecker@adacore.com>
+
+ * gdb.python/py-inferior.exp: Use gdb_test_no_output instead of
+ gdb_test when running a test where we expected no output back.
+
2011-02-28 Michael Snyder <msnyder@vmware.com>
* gdb.cp/overload.cc: Change initializer value to integer.
diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp
index 2e9c5e0..c219117 100644
--- a/gdb/testsuite/gdb.python/py-inferior.exp
+++ b/gdb/testsuite/gdb.python/py-inferior.exp
@@ -91,8 +91,8 @@ set one_pattern_found "${newline}.${dec_number}"
gdb_test "set *(int32_t*) &int8_search_buf\[10\] = 0x61616161" "" ""
gdb_test "py search_buf = gdb.selected_frame ().read_var ('int8_search_buf')" "" ""
-gdb_test "py start_addr = search_buf.address" "" ""
-gdb_test "py length = search_buf.type.sizeof" "" ""
+gdb_test_no_output "py start_addr = search_buf.address"
+gdb_test_no_output "py length = search_buf.type.sizeof"
gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, length, 'aaa')" \
"${one_pattern_found}" "find string pattern"
@@ -109,51 +109,51 @@ gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, 10+3+1, 'aaa'
"${one_pattern_found}" "pattern found at end of range"
# Import struct to pack the following patterns.
-gdb_test "py from struct import *" "" ""
+gdb_test_no_output "py from struct import *"
# Test 16-bit pattern.
-gdb_test "set int16_search_buf\[10\] = 0x1234" "" ""
-gdb_test "py search_buf = gdb.selected_frame ().read_var ('int16_search_buf')" "" ""
-gdb_test "py start_addr = search_buf.address" "" ""
-gdb_test "py length = search_buf.type.sizeof" "" ""
-gdb_test "py pattern = pack('${python_pack_char}H',0x1234)" "" \
+gdb_test_no_output "set int16_search_buf\[10\] = 0x1234"
+gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int16_search_buf')"
+gdb_test_no_output "py start_addr = search_buf.address"
+gdb_test_no_output "py length = search_buf.type.sizeof"
+gdb_test_no_output "py pattern = pack('${python_pack_char}H',0x1234)"
gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)" \
"${one_pattern_found}" "find 16-bit pattern, with value pattern"
# Test 32-bit pattern.
-gdb_test "set int32_search_buf\[10\] = 0x12345678" "" ""
-gdb_test "py search_buf = gdb.selected_frame ().read_var ('int32_search_buf')" "" ""
-gdb_test "py start_addr = search_buf.address" "" ""
-gdb_test "py length = search_buf.type.sizeof" "" ""
-gdb_test "py pattern = pack('${python_pack_char}I',0x12345678)" "" \
+gdb_test_no_output "set int32_search_buf\[10\] = 0x12345678"
+gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int32_search_buf')"
+gdb_test_no_output "py start_addr = search_buf.address"
+gdb_test_no_output "py length = search_buf.type.sizeof"
+gdb_test_no_output "py pattern = pack('${python_pack_char}I',0x12345678)"
gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)" \
"${one_pattern_found}" "find 32-bit pattern, with python pattern"
# Test 64-bit pattern.
-gdb_test "set int64_search_buf\[10\] = 0xfedcba9876543210LL" "" ""
-gdb_test "py search_buf = gdb.selected_frame ().read_var ('int64_search_buf')" "" ""
-gdb_test "py start_addr = search_buf.address" "" ""
-gdb_test "py length = search_buf.type.sizeof" "" ""
-gdb_test "py pattern = pack('${python_pack_char}Q', 0xfedcba9876543210)" "" ""
+gdb_test_no_output "set int64_search_buf\[10\] = 0xfedcba9876543210LL"
+gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('int64_search_buf')"
+gdb_test_no_output "py start_addr = search_buf.address"
+gdb_test_no_output "py length = search_buf.type.sizeof"
+gdb_test_no_output "py pattern = pack('${python_pack_char}Q', 0xfedcba9876543210)"
gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)" \
"${one_pattern_found}" "find 64-bit pattern, with value pattern"
# Test mixed-sized patterns.
-gdb_test "set *(int8_t*) &search_buf\[10\] = 0x62" "" ""
-gdb_test "set *(int16_t*) &search_buf\[11\] = 0x6363" "" ""
-gdb_test "set *(int32_t*) &search_buf\[13\] = 0x64646464" "" ""
-gdb_test "py search_buf = gdb.selected_frame ().read_var ('search_buf')" "" ""
-gdb_test "py start_addr = search_buf\[0\].address" "" ""
-gdb_test "py pattern1 = pack('B', 0x62)" "" ""
-gdb_test "py pattern2 = pack('${python_pack_char}H', 0x6363)" "" ""
-gdb_test "py pattern3 = pack('${python_pack_char}I', 0x64646464)" "" ""
+gdb_test_no_output "set *(int8_t*) &search_buf\[10\] = 0x62"
+gdb_test_no_output "set *(int16_t*) &search_buf\[11\] = 0x6363"
+gdb_test_no_output "set *(int32_t*) &search_buf\[13\] = 0x64646464"
+gdb_test_no_output "py search_buf = gdb.selected_frame ().read_var ('search_buf')"
+gdb_test_no_output "py start_addr = search_buf\[0\].address"
+gdb_test_no_output "py pattern1 = pack('B', 0x62)"
+gdb_test_no_output "py pattern2 = pack('${python_pack_char}H', 0x6363)"
+gdb_test_no_output "py pattern3 = pack('${python_pack_char}I', 0x64646464)"
gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern1)" \
"${one_pattern_found}" "find mixed-sized pattern"
@@ -168,26 +168,26 @@ gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern3
set CHUNK_SIZE 16000 ;
-gdb_test "set *(int32_t*) &search_buf\[0*${CHUNK_SIZE}+100\] = 0x12345678" "" ""
-gdb_test "set *(int32_t*) &search_buf\[1*${CHUNK_SIZE}+100\] = 0x12345678" "" ""
-gdb_test "py start_addr = gdb.selected_frame ().read_var ('search_buf')" "" ""
-gdb_test "py length = gdb.selected_frame ().read_var ('search_buf_size')" "" ""
-gdb_test "py pattern = pack('${python_pack_char}I', 0x12345678)" "" ""
-gdb_test "py first = gdb.inferiors()\[0\].search_memory (start_addr,length, pattern)" "" ""
+gdb_test_no_output "set *(int32_t*) &search_buf\[0*${CHUNK_SIZE}+100\] = 0x12345678"
+gdb_test_no_output "set *(int32_t*) &search_buf\[1*${CHUNK_SIZE}+100\] = 0x12345678"
+gdb_test_no_output "py start_addr = gdb.selected_frame ().read_var ('search_buf')"
+gdb_test_no_output "py length = gdb.selected_frame ().read_var ('search_buf_size')"
+gdb_test_no_output "py pattern = pack('${python_pack_char}I', 0x12345678)"
+gdb_test_no_output "py first = gdb.inferiors()\[0\].search_memory (start_addr,length, pattern)"
gdb_test "py print first" "${one_pattern_found}" "search spanning large range 1st result"
-gdb_test "py start_addr = first + 1"
-gdb_test "py second = gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)" "" ""
+gdb_test_no_output "py start_addr = first + 1"
+gdb_test_no_output "py second = gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)"
gdb_test "py print second" "${one_pattern_found}" "search spanning large range 2nd result"
-gdb_test "py start_addr = second + 1"
-gdb_test "py third = gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)" "" ""
+gdb_test_no_output "py start_addr = second + 1"
+gdb_test_no_output "py third = gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)"
gdb_test "py print third" "${pattern_not_found}" "search spanning large range 3rd result"
# For native targets, test a pattern straddling a chunk boundary.
if [isnative] {
- gdb_test "set *(int32_t*) &search_buf\[${CHUNK_SIZE}-1\] = 0xfdb97531" "" ""
- gdb_test "py pattern = pack('${python_pack_char}I', 0xfdb97531)" "" ""
- gdb_test "py start_addr = gdb.selected_frame ().read_var ('search_buf')" "" ""
+ gdb_test_no_output "set *(int32_t*) &search_buf\[${CHUNK_SIZE}-1\] = 0xfdb97531"
+ gdb_test_no_output "py pattern = pack('${python_pack_char}I', 0xfdb97531)"
+ gdb_test_no_output "py start_addr = gdb.selected_frame ().read_var ('search_buf')"
gdb_test "py print gdb.inferiors()\[0\].search_memory (start_addr, length, pattern)" \
"${one_pattern_found}" "find pattern straddling chunk boundary"
}