From f49c464f933172bae5685c2fb51b9e220902146c Mon Sep 17 00:00:00 2001 From: Mihails Strasuns Date: Tue, 11 Feb 2020 13:46:27 +0100 Subject: [PATCH] [gdb/testsuite] allow more registers in gdb.base/jit-reader.exp Fixes jit-reader test failures on systems that have more registers than expected by the current condition. On Intel i9-7920X the following extra registers are printed: k0 0x0 0 k1 0x0 0 k2 0x0 0 k3 0x0 0 k4 0x0 0 k5 0x0 0 k6 0x0 0 k7 0x0 0 gdb/testsuite/ChangeLog: 2020-02-18 Mihails Strasuns * gdb.base/jit-reader.exp: Relax register output check. --- gdb/testsuite/gdb.base/jit-reader.exp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp index 7852a5b5507..8663f0021de 100644 --- a/gdb/testsuite/gdb.base/jit-reader.exp +++ b/gdb/testsuite/gdb.base/jit-reader.exp @@ -66,7 +66,8 @@ proc info_registers_current_frame {sp} { set any "\[^\r\n\]*" set neg_decimal "-?$decimal" - gdb_test "info registers" \ + + set expected \ [multi_line \ "rax $hex +$neg_decimal" \ "rbx $hex +$neg_decimal" \ @@ -93,6 +94,11 @@ proc info_registers_current_frame {sp} { "fs $hex +$neg_decimal" \ "gs $hex +$neg_decimal" \ ] + + # There may be more registers. + append expected ".*" + + gdb_test "info registers" $expected } proc jit_reader_test {} { @@ -170,7 +176,8 @@ proc jit_reader_test {} { # Since the JIT unwinder only provides RIP/RSP/RBP, # all other registers should show as "". - gdb_test "info registers" \ + + set expected \ [multi_line \ "rax " \ "rbx " \ @@ -198,6 +205,11 @@ proc jit_reader_test {} { "gs " \ ] + # There may be more registers. + append expected ".*" + + gdb_test "info registers" $expected + # Make sure that "info frame" doesn't crash. gdb_test "info frame" "Stack level 1, .*in main.*" -- 2.30.2