]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commit
task/internal/__init__.py: improve core program extraction 1719/head
authorKamoltat Sirivadhna <ksirivad@redhat.com>
Wed, 3 Aug 2022 21:00:06 +0000 (21:00 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 24 Aug 2022 01:52:34 +0000 (01:52 +0000)
commit5b7c97c7198cce25b8e0cba3c3549e42bc300aed
treefdbfad355729fe5291fce0ebc80decaabbb4f1f7
parent8802dd0235745db1511e14e14c2b4232f5b0c71a
task/internal/__init__.py: improve core program extraction

Problem:
The previous technique for extracting the program name
of the coredump file doesn't deal with the case
where there is no white space after program name
e.g.,

``SVR4-style, from 'ceph_test_rados_api_io', real uid: 1000``

here we will get an error when we reach the part where we

``remote.sh(['which', dump_program]).rstrip()``.

Solution:

Use regex to extract first occurence of the word that
is in the format ``from '<word>'``.

Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
teuthology/task/internal/__init__.py