public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb/gdb-8.3-branch] [gdb/testsuite] Fix regexp in skip_opencl_tests
@ 2019-09-17 11:57 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-09-17 11:57 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fafa92ec3ca92e06fdea8f0f6a0fb08f5f906f77

commit fafa92ec3ca92e06fdea8f0f6a0fb08f5f906f77
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Sep 17 13:57:09 2019 +0200

    [gdb/testsuite] Fix regexp in skip_opencl_tests
    
    [ Backport of master commit d2b584a55b. ]
    
    When running gdb-caching-proc.exp, if skip_opencl_tests fails like this:
    ...
    (gdb) run
    Starting program: \
      build/gdb/testsuite/outputs/gdb.base/gdb-caching-proc/opencltest13530.x
    CHK_ERR (clGetPlatformIDs (1, &platform, NULL), -1001)
    src/gdb/testsuite/lib/opencl_hostapp.c:73 error: Unknown
    [Inferior 1 (process 13600) exited with code 01]
    (gdb)
    skip_opencl_tests: OpenCL support not detected
    ...
    then this regexp in skip_opencl_tests fails to match:
    ...
            -re ".*$inferior_exited_re code.*${gdb_prompt} $" {
    ...
    so instead we hit the default clause after a 30 seconds timeout.  With the
    iteration count set at 10, we end up taking 6 minutes to run this test-case.
    
    Fix this by adding the missing "with" in the regexp, bring back the runtime to
    half a minute.
    
    Tested on x86_64-linux.
    
    gdb/testsuite/ChangeLog:
    
    2019-04-29  Tom de Vries  <tdevries@suse.de>
    
    	PR testsuite/25005
    	* lib/opencl.exp (skip_opencl_tests): Add missing "with" in regexp.

Diff:
---
 gdb/testsuite/ChangeLog      | 5 +++++
 gdb/testsuite/lib/opencl.exp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 788a273..9cc0b92 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-04-29  Tom de Vries  <tdevries@suse.de>
+
+	PR testsuite/25005
+	* lib/opencl.exp (skip_opencl_tests): Add missing "with" in regexp.
+
 2019-04-18  Tom de Vries  <tdevries@suse.de>
 	    Pedro Alves  <palves@redhat.com>
 
diff --git a/gdb/testsuite/lib/opencl.exp b/gdb/testsuite/lib/opencl.exp
index 4d353de..33eb437 100644
--- a/gdb/testsuite/lib/opencl.exp
+++ b/gdb/testsuite/lib/opencl.exp
@@ -58,7 +58,7 @@ gdb_caching_proc skip_opencl_tests {
             verbose -log "\n$me: OpenCL support detected"
             set result 0
         }
-        -re ".*$inferior_exited_re code.*${gdb_prompt} $" {
+        -re ".*$inferior_exited_re with code.*${gdb_prompt} $" {
             verbose -log "\n$me: OpenCL support not detected"
             set result 1
         }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-17 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17 11:57 [binutils-gdb/gdb-8.3-branch] [gdb/testsuite] Fix regexp in skip_opencl_tests Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).