From: Christina Schimpe Date: Wed, 6 Aug 2025 20:08:35 +0000 (-0700) Subject: testsuite: add untested in case OS corefile is not found X-Git-Tag: gdb-17-branchpoint~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=857ef95cd9eb87a1548f1d4999ce230a454f16ac;p=thirdparty%2Fbinutils-gdb.git testsuite: add untested in case OS corefile is not found Even though the core_find proc will log a warning, it's better to log "untested" and then terminate the test. This will help to avoid silently skipped tests, when running the testsuite. Most of the tests already do that. This patch adds the missing ones. Approved-By: Luis Machado --- diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index 649cc867f04..04d8c553c68 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -218,6 +218,7 @@ proc test_core {file displacement} { set corefile [core_find $file {} "segv"] if {$corefile == ""} { + untested "unable to create or find corefile" return } diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index da1fdf3517c..fd8d1d1274c 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -31,6 +31,7 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { # mmapped data in core file" test. set corefile [core_find $binfile {}] if {$corefile == ""} { + untested "unable to create or find corefile" return 0 } diff --git a/gdb/testsuite/gdb.base/corefile2.exp b/gdb/testsuite/gdb.base/corefile2.exp index 392705b5930..d35ba1a1295 100644 --- a/gdb/testsuite/gdb.base/corefile2.exp +++ b/gdb/testsuite/gdb.base/corefile2.exp @@ -40,6 +40,7 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { set corefile [core_find $binfile {}] if {$corefile == ""} { + untested "unable to create or find corefile" return 0 } diff --git a/gdb/testsuite/gdb.base/corefile3.exp b/gdb/testsuite/gdb.base/corefile3.exp index 57b230004b6..ef391d15049 100644 --- a/gdb/testsuite/gdb.base/corefile3.exp +++ b/gdb/testsuite/gdb.base/corefile3.exp @@ -34,6 +34,7 @@ if {[build_executable $testfile.exp $testfile $srcfile] == -1} { set corefile [core_find $binfile {}] if {$corefile == ""} { + untested "unable to create or find corefile" return } diff --git a/gdb/testsuite/gdb.base/many-headers.exp b/gdb/testsuite/gdb.base/many-headers.exp index f46b9800cf9..5e022da8534 100644 --- a/gdb/testsuite/gdb.base/many-headers.exp +++ b/gdb/testsuite/gdb.base/many-headers.exp @@ -33,6 +33,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile debug]} { # Generate core file. set corefile [core_find $binfile] if {$corefile == ""} { + untested "unable to create or find corefile" return 0 } diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi-corefile.exp index 3f0e7202330..b4914866dfc 100644 --- a/gdb/testsuite/gdb.mi/mi-corefile.exp +++ b/gdb/testsuite/gdb.mi/mi-corefile.exp @@ -29,6 +29,7 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { set corefile [core_find $binfile {}] if {$corefile == ""} { + untested "unable to create or find corefile" return 0 } diff --git a/gdb/testsuite/gdb.threads/corethreads.exp b/gdb/testsuite/gdb.threads/corethreads.exp index 3b50ae3a3cd..0011dc3547c 100644 --- a/gdb/testsuite/gdb.threads/corethreads.exp +++ b/gdb/testsuite/gdb.threads/corethreads.exp @@ -29,6 +29,7 @@ if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executa set corefile [core_find $binfile] if {$corefile == ""} { + untested "unable to create or find corefile" return 0 }