Patchwork [committed,gdb/testsuite] Fix regexp in skip_opencl_tests

login
register
mail settings
Submitter Tom de Vries
Date April 29, 2019, 2:54 p.m.
Message ID <20190429145451.GA7738@delia>
Download mbox | patch
Permalink /patch/32460/
State New
Headers show

Comments

Tom de Vries - April 29, 2019, 2:54 p.m.
Hi,

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.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix regexp in skip_opencl_tests

gdb/testsuite/ChangeLog:

2019-04-29  Tom de Vries  <tdevries@suse.de>

	* lib/opencl.exp (skip_opencl_tests): Add missing "with" in regexp.

---
 gdb/testsuite/lib/opencl.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/gdb/testsuite/lib/opencl.exp b/gdb/testsuite/lib/opencl.exp
index 4d353de246..33eb437bc8 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
         }