Commit c15b5c87 authored by Sandipan Das's avatar Sandipan Das
Browse files

Fix 'test_libbcc' from failing because of ruby



This fixes 'test_usdt_probes', called from 'test_libbcc', from
failing if the static markers are in libruby rather than a ruby
executable. So, when the path of the binary having the markers
is tested, we must check if either "/ruby" or "/libruby" is a
substring rather than only checking for the former.

Also, rather than relying on hardcoded values for the number of
locations and arguments for a given probe, we capture this info
using the readelf tool and then compare these with the values
reported by bcc. This is because these numbers may vary across
different versions of ruby and will cause the tests to fail.
For example, 'test_libbcc' fails on Fedora 26 with ruby-2.4 as
the number of locations where it expects 'array__create' is 7
even when it is actually 2 as reported by bcc and verified with
readelf output.

Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
parent 5ac03dda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment