Patchwork btrace, testsuite: do not enforce bts

login
register
mail settings
Submitter Metzger, Markus T
Date Feb. 6, 2018, 1:10 p.m.
Message ID <1517922619-28695-1-git-send-email-markus.t.metzger@intel.com>
Download mbox | patch
Permalink /patch/25836/
State New
Headers show

Comments

Metzger, Markus T - Feb. 6, 2018, 1:10 p.m.
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.

2018-02-06  Markus Metzger  <markus.t.metzger@intel.com>

testsuite/
	* gdb.btrace/buffer-size.exp: Do not force BTS.
---
 gdb/testsuite/gdb.btrace/buffer-size.exp | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

Patch

diff --git a/gdb/testsuite/gdb.btrace/buffer-size.exp b/gdb/testsuite/gdb.btrace/buffer-size.exp
index 7cd2702..2f78012 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"