[DTrace-devel] [oracle/dtrace-utils] b5540c: test: Improve tst.dlclose1.sh test for USDT probes

euloh noreply at github.com
Fri Apr 22 15:26:44 UTC 2022


  Branch: refs/heads/dev
  Home:   https://github.com/oracle/dtrace-utils
  Commit: b5540c21afa63bdb6ec2c1c502b9faa80bfdbc50
      https://github.com/oracle/dtrace-utils/commit/b5540c21afa63bdb6ec2c1c502b9faa80bfdbc50
  Author: Eugene Loh <eugene.loh at oracle.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M test/unittest/usdt/tst.dlclose1.r
    A test/unittest/usdt/tst.dlclose1.r.p
    M test/unittest/usdt/tst.dlclose1.sh

  Log Message:
  -----------
  test: Improve tst.dlclose1.sh test for USDT probes

This test has been failing on aarch64/OL8 ever since its XFAIL was removed
in 8359ab81fa5e "tests: fix usdt/tst.dlclose1.sh".

That patch changed the problematic bufsize setting in the test, but it
could have removed the unnecessary bufsize setting altogether.

The test was then passing gratuitously.  As expected, it failed to find
USDT probes after the dlclose() call, but the reason was that there were
no USDT probes at all simply because they are not yet supported in DTrace
on BPF.

Meanwhile, the test was failing on aarch64/OL8 because no probes were
firing in the pause() call.

Fix the test so that it first confirms there are USDT probes before the
dlclose() call and second that there are no such probes after the call.

Use a different mechanism to synchronize between user program and test
script given the increased synchronization.

Eliminate the unnecessary bufsize setting.

When checking for USDT probes, make sure they are for the expected
process and not for any other test_prov* (e.g. an orphaned process from
an earlier test run).

Set @@xfail since USDT probes are not yet fully implemented.  (This new
version of the test has been checked on legacy DTrace.)

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>





More information about the DTrace-devel mailing list