Bug 25005 - gdb-caching-proc.exp takes a lot of time on skip_opencl_tests
Summary: gdb-caching-proc.exp takes a lot of time on skip_opencl_tests
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 8.3
: P2 normal
Target Milestone: 8.3.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-17 10:02 UTC by Tom de Vries
Modified: 2019-09-18 14:07 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2019-09-17 10:02:48 UTC
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.
Comment 1 Tom de Vries 2019-09-17 10:04:39 UTC
This was fixed on master by commit d2b584a55b "[gdb/testsuite] Fix regexp in skip_opencl_tests".
Comment 2 Sourceware Commits 2019-09-17 11:57:59 UTC
The gdb-8.3-branch branch has been updated by Tom de Vries <vries@sourceware.org>:

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.
Comment 3 Tom de Vries 2019-09-17 11:59:06 UTC
Patch backported to 8.3 branch, marking resolved-fixed.