From de65820cd69a4d9aaa87079a809c70364571efab Mon Sep 17 00:00:00 2001 From: Markus Metzger Date: Tue, 9 Jan 2018 16:12:24 +0100 Subject: [PATCH] btrace, testsuite: do not force BTS In gdb.btrace/buffer-size.exp we explicitly ask for the BTS recording format. This may lead to spurious fails on systems where PT is being used by some other process at the same time. Set both PT and BTS buffer sizes to 1 and check that whatever recording format is used will use a 4KB buffer. testsuite/ * gdb.btrace/buffer-size.exp: Do not force BTS. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.btrace/buffer-size.exp | 15 ++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8bcb50ea89e..d2ebdbe011f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-02-20 Markus Metzger + + * gdb.btrace/buffer-size.exp: Do not force BTS. + 2018-02-14 Pedro Alves * gdb.base/bp-cmds-continue-ctrl-c.exp (do_test): Test "bt" after diff --git a/gdb/testsuite/gdb.btrace/buffer-size.exp b/gdb/testsuite/gdb.btrace/buffer-size.exp index 7cd2702f6b9..2f78012cc8f 100644 --- a/gdb/testsuite/gdb.btrace/buffer-size.exp +++ b/gdb/testsuite/gdb.btrace/buffer-size.exp @@ -33,17 +33,14 @@ if ![runto_main] { } gdb_test_no_output "set record btrace bts buffer-size 1" -gdb_test "show record btrace bts buffer-size" "The record/replay bts buffer size is 1\.\r" "bts buffer size before recording" +gdb_test_no_output "set record btrace pt buffer-size 1" +gdb_test "show record btrace bts buffer-size" "The record/replay bts buffer size is 1\.\r" +gdb_test "show record btrace pt buffer-size" "The record/replay pt buffer size is 1\.\r" -gdb_test_no_output "record btrace bts" -gdb_test "show record btrace bts buffer-size" "The record/replay bts buffer size is 1\.\r" "bts buffer size while recording" +gdb_test_no_output "record btrace" gdb_test "info record" [multi_line \ "Active record target: record-btrace" \ - "Recording format: Branch Trace Store\." \ + "Recording format: \[^\\\r\\\n\]*" \ "Buffer size: 4kB\." \ "Recorded 0 instructions in 0 functions \\\(0 gaps\\\) for \[^\\\r\\\n\]*" \ - ] "info record with small bts buffer" -gdb_test "record stop" ".*" "stop recording with small bts buffer" - -gdb_test_no_output "set record btrace bts buffer-size 0" -gdb_test "show record btrace bts buffer-size" "The record/replay bts buffer size is unlimited\.\r" "unlimited bts buffer size" + ] "info record" -- 2.30.2