diff options
author | Tom Tromey <tom@tromey.com> | 2022-12-14 17:04:35 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-01-13 13:18:54 -0700 |
commit | 15bdcf4ca1514b89c242eccd3a74599bdd00e3e0 (patch) | |
tree | 42a397b20d291ad8a6f122cd9e9eef4d227ec140 | |
parent | c2a5d74050ea9d7897b4122ef57c627d395683b3 (diff) | |
download | fsf-binutils-gdb-15bdcf4ca1514b89c242eccd3a74599bdd00e3e0.zip fsf-binutils-gdb-15bdcf4ca1514b89c242eccd3a74599bdd00e3e0.tar.gz fsf-binutils-gdb-15bdcf4ca1514b89c242eccd3a74599bdd00e3e0.tar.bz2 |
Don't use ensure_gdb_index with require
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.
-rw-r--r-- | gdb/testsuite/gdb.base/with-mf.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/gdb-add-index.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.rust/dwindex.exp | 5 |
6 files changed, 24 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/with-mf.exp b/gdb/testsuite/gdb.base/with-mf.exp index c16027b..f26d48e 100644 --- a/gdb/testsuite/gdb.base/with-mf.exp +++ b/gdb/testsuite/gdb.base/with-mf.exp @@ -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 diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp index e65cc88..d8ed180 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp @@ -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. diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp index 12dc2c3..248bb28 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp @@ -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. diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp index fc85795..2c9f037 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp @@ -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} diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp index 9257303..09c26eb 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp @@ -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} diff --git a/gdb/testsuite/gdb.rust/dwindex.exp b/gdb/testsuite/gdb.rust/dwindex.exp index 306a7e7..4f05cb9 100644 --- a/gdb/testsuite/gdb.rust/dwindex.exp +++ b/gdb/testsuite/gdb.rust/dwindex.exp @@ -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 |