[DTrace-devel] [PATCH 17/19] test: Add a pid-USDT test
Eugene Loh
eugene.loh at oracle.com
Fri Oct 4 04:49:25 UTC 2024
On 8/29/24 16:32, Sam James wrote:
> "eugene.loh--- via DTrace-devel" <dtrace-devel at oss.oracle.com> writes:
>
>> From: Eugene Loh <eugene.loh at oracle.com>
>>
>> This checks that pid entry, pid return, pid offset, USDT, and USDT
>> is-enabled probes can all coexist. Specifically, pid offset probes
>> can sit on the same PCs as pid entry, USDT, and USDT is-enabled
>> probes.
>>
>> Note that PCs for pid return probes are apparently in the caller
>> function. I guess that's due to using uretprobe. I'm not convinced
>> yet that that isn't a bug. It isn't what Solaris did.
>>
>> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
>> ---
>> test/unittest/usdt/tst.pidprobes.r | 1 +
>> test/unittest/usdt/tst.pidprobes.sh | 243 ++++++++++++++++++++++++++++
>> 2 files changed, 244 insertions(+)
>> create mode 100644 test/unittest/usdt/tst.pidprobes.r
>> create mode 100755 test/unittest/usdt/tst.pidprobes.sh
>>
>> diff --git a/test/unittest/usdt/tst.pidprobes.r b/test/unittest/usdt/tst.pidprobes.r
>> new file mode 100644
>> index 00000000..2e9ba477
>> --- /dev/null
>> +++ b/test/unittest/usdt/tst.pidprobes.r
>> @@ -0,0 +1 @@
>> +success
>> diff --git a/test/unittest/usdt/tst.pidprobes.sh b/test/unittest/usdt/tst.pidprobes.sh
>> new file mode 100755
>> index 00000000..7eadb9b7
>> --- /dev/null
>> +++ b/test/unittest/usdt/tst.pidprobes.sh
>> @@ -0,0 +1,243 @@
>> +#!/bin/bash
>> +#
>> +# Oracle Linux DTrace.
>> +# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
>> +# Licensed under the Universal Permissive License v 1.0 as shown at
>> +# http://oss.oracle.com/licenses/upl.
>> +#
>> +# This test verifies that USDT and pid probes can share underlying probes.
>> +
>> +dtrace=$1
>> +
>> +# Set up test directory.
>> +
>> +DIRNAME=$tmpdir/pidprobes.$$.$RANDOM
>> +mkdir -p $DIRNAME
>> +cd $DIRNAME
>> +
> Let's do mktemp -d?
Thanks. On the other hand, that sequence is very common in the test
suite. Maybe there should be a massive conversion to mktemp if we want
to go that route.
>> [...]
More information about the DTrace-devel
mailing list