[DTrace-devel] [PATCH v3] dtrace provider: add a predicate against the current tgid

Eugene Loh eugene.loh at oracle.com
Thu Feb 29 20:16:53 UTC 2024


On 2/29/24 14:47, Nick Alcock wrote:

> On 29 Feb 2024, Kris Van Hees verbalised:
>
>> On Thu, Feb 29, 2024 at 05:42:30PM +0000, Nick Alcock via DTrace-devel wrote:
>>> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
>> Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>
> This commit induces a failure of
> test/unittest/dtrace-util/tst.DisOption.sh, but this test is testing an
> undocumented option, is carrying out transformations with awk etc on it,
> that are uncommented and entirely opaque to me (it seems to be splitting
> things up then diffing the original against the split-up pieces and
> expecting it to work?), and honestly I think Eugene can probably fix it
> in seconds. I don't have any idea what it's trying to verify. A comment
> or two might be a good idea.

I'll add some comments.

Anyhow, it's trying to confirm that the option values dump the 
appropriate phases.  So it runs a few times for different phases and 
checks for consistency.

One question:  will the disasm output be the same from run to run? 
BOOTTM will change, so the test filters that out.

With this patch, the tgid value in the predicate also changes.  So that 
should also be filtered.

Proposed fix coming up next.

> test/unittest/dtrace-util/tst.DisOption.sh: Running timeout --signal=TERM 41 test/unittest/dtrace-util/tst.DisOption.sh /home/opc/dtrace-user/build/dtrace
> FAIL: erroneous exitcode (1).
> 1.chk does not match 1.err
> --- 1.chk       2024-02-29 18:16:46.406663283 +0000
> +++ 1.err       2024-02-29 18:16:39.240609071 +0000
> @@ -16,7 +16,7 @@
>   0000 00000: bf 6 1 0000 00000000    mov  %r6, %r1
>   0001 00008: 85 0 0 0000 0000000e    call bpf_get_current_pid_tgid
>   0002 00016: 77 0 0 0000 00000020    rsh  %r0, 32
> -0003 00024: 55 0 0 0091 000c48bf    jne  %r0, 805055, 145         ! -> 149
> +0003 00024: 55 0 0 0091 000c48b9    jne  %r0, 805049, 145         ! -> 149
>   0004 00032: bf 1 6 0000 00000000    mov  %r1, %r6
>   0005 00040: bf 9 a 0000 00000000    mov  %r9, %fp
>   0006 00048: 07 9 0 0000 ffffffa8    add  %r9, -88
> @@ -184,7 +184,7 @@
>   0000 00000: bf 6 1 0000 00000000    mov  %r6, %r1
>   0001 00008: 85 0 0 0000 0000000e    call bpf_get_current_pid_tgid
>   0002 00016: 77 0 0 0000 00000020    rsh  %r0, 32
> -0003 00024: 55 0 0 0085 000c48bf    jne  %r0, 805055, 133         ! -> 137
> +0003 00024: 55 0 0 0085 000c48b9    jne  %r0, 805049, 133         ! -> 137
>   0004 00032: bf 1 6 0000 00000000    mov  %r1, %r6
>   0005 00040: bf 9 a 0000 00000000    mov  %r9, %fp
>   0006 00048: 07 9 0 0000 ffffffa8    add  %r9, -88



More information about the DTrace-devel mailing list