This series changes 'require' to take a list of simple predicates.
This patch backs out the one use of 'require' that doesn't conform to
this -- calling ensure_gdb_index.
---
gdb/testsuite/gdb.base/with-mf.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/gdb-add-index.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp | 5 ++++-
gdb/testsuite/gdb.rust/dwindex.exp | 5 ++++-
6 files changed, 24 insertions(+), 6 deletions(-)
@@ -24,7 +24,10 @@ if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
return -1
}
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+}
clean_restart $binfile
@@ -29,7 +29,10 @@ with_test_prefix non-symlink {
return -1
}
- require {ensure_gdb_index $binfile} != -1
+ if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+ }
}
# Regenerate exec without index.
@@ -27,7 +27,10 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \
return -1
}
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+}
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
@@ -24,7 +24,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-require {ensure_gdb_index $binfile} == 1
+if { [ensure_gdb_index $binfile] != 1 } {
+ untested "error adding gdb index"
+ return -1
+}
clean_restart ${binfile}
@@ -74,7 +74,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+}
clean_restart ${binfile}
@@ -26,7 +26,10 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
return -1
}
-require {ensure_gdb_index $binfile -dwarf-5} != -1
+if {[ensure_gdb_index $binfile -dwarf-5] == -1} {
+ untested "error adding gdb index"
+ return -1
+}
gdb_exit
gdb_start