aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-call.exp31
2 files changed, 35 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5b89bcd..7f68228 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2020-12-11 Tom de Vries <tdevries@suse.de>
+ PR testsuite/26991
+ * gdb.arch/i386-mpx-call.exp: Don't expect to trigger bounds
+ violations by setting bounds registers if the bounds are passed in the
+ Bounds Table.
+
+2020-12-11 Tom de Vries <tdevries@suse.de>
+
PR testsuite/26954
* gdb.base/float128.exp: Detect and handle no mpfr support.
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-call.exp b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
index 41abbee..8f8fea5 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-call.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
@@ -49,6 +49,15 @@ gdb_test_multiple "print have_mpx ()" $test {
}
}
+set bounds_table 0
+gdb_test_multiple "disassemble upper" "" {
+ -re -wrap "bndldx.*" {
+ set bounds_table 1
+ }
+ -re -wrap "" {
+ }
+}
+
# Convenience for returning from an inferior call that causes a BND violation.
#
gdb_test_no_output "set confirm off"
@@ -136,9 +145,25 @@ proc perform_a_call {func} {
#
proc check_bound_violation {parm parm_type is_positive} {
- global u_fault
-
- gdb_test "continue" "$u_fault.*" "continue to a bnd violation"
+ global u_fault bounds_table
+
+ set have_bnd_violation 0
+ gdb_test_multiple "continue" "continue to a bnd violation" {
+ -re -wrap "Continuing\." {
+ if { $bounds_table } {
+ pass $gdb_test_name
+ } else {
+ fail $gdb_test_name
+ }
+ }
+ -re -wrap "$u_fault.*" {
+ pass $gdb_test_name
+ set have_bnd_violation 1
+ }
+ }
+ if { ! $have_bnd_violation } {
+ return
+ }
set message "access only one position"
if {$is_positive == 1} {