-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Improve tst.dlclose1.sh test for USDT probes
This test has been failing on aarch64/OL8 ever since its XFAIL was removed in 8359ab8 "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@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
Showing
3 changed files
with
126 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
ID PROVIDER MODULE FUNCTION NAME | ||
|
||
started pid NNN | ||
ID PROVIDER MODULE FUNCTION NAME | ||
NNN test_provNNN livelib.so go go | ||
ID PROVIDER MODULE FUNCTION NAME | ||
-- @@stderr -- | ||
dtrace: failed to match test_prov*:::: No probe matches description | ||
dtrace: failed to match test_provNNN:::: No probe matches description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/awk -f | ||
{ | ||
# ignore the specific probe ID or process ID | ||
# (the script ensures the process ID is consistent) | ||
gsub(/[0-9]+/, "NNN"); | ||
|
||
# ignore the numbers of spaces for alignment | ||
# (they depend on the ID widths) | ||
gsub(/ +/, " "); | ||
|
||
print; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters