[DTrace-devel] [PATCH] test: fix a stupid typo

Eugene Loh eugene.loh at oracle.com
Tue May 30 15:44:16 UTC 2023


On 5/30/23 11:21, Nick Alcock via DTrace-devel wrote:

> Serves me right for doing this at the last minute.

That comment is not needed for the patch.

By the way, the typo in the path also leads to test failures on some 
platforms.

> It will break other programs using USDT probes that aren't currently
> being probed on the same machine, so it's very temporary: but without
> either this or proper uprobes cleanup code, running tst.manyprobes.sh a
> few times will denial-of-service-attack the machine.

Not only the path typo should be fixed but also this heavy-handed 
cleanup.  The D script can include something like 'BEGIN { 
printf("target pid is %d\n", \$target); }'.  The script can then go 
through and search uprobes_events for /proc/$target/map_files/ events 
and remove those probes.  If you like, I can prepare that patch.  Or, 
feel free.  Anyhow, if we litter the system with 2000 uprobes, we should 
clean them up without blowing everything out of the water.

> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
> ---
>   test/unittest/usdt/tst.manyprobes.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/unittest/usdt/tst.manyprobes.sh b/test/unittest/usdt/tst.manyprobes.sh
> index 14bf912814418..8d0c91f1cce96 100755
> --- a/test/unittest/usdt/tst.manyprobes.sh
> +++ b/test/unittest/usdt/tst.manyprobes.sh
> @@ -72,6 +72,6 @@ script
>   status=$?
>   
>   # Temporary, until autocleanup is implemented
> -echo - > /sys/kernel/tracing/uprobe_events 2>/dev/null
> +echo - > /sys/kernel/debug/tracing/uprobe_events 2>/dev/null
>   
>   exit $status
>
> base-commit: f543fa6706c0b31364356c01bf3de63e3cce8ad1
> prerequisite-patch-id: fa667248b7b02e92ee6b3807123ebcf2ac0acc38
> prerequisite-patch-id: 0cec5f1a31d528a493d6143644c1e6b78c7f403b
> prerequisite-patch-id: 1e1ced5fcec01a0c2e38d12f1ae5a124c8f93860
> prerequisite-patch-id: eb290f098e38981181d85240150e1713979dc505
> prerequisite-patch-id: c25b38ab68e815a63f064aff7496408684f94a36
> prerequisite-patch-id: b86eb7e00b5883a586bd4dc7143ab25094912288
> prerequisite-patch-id: 85d3c176dc4a7105e4f04dbcdb4ccbdf18741795
> prerequisite-patch-id: 94206b53a67820bb1c9e828c11e57a0cb36949b6
> prerequisite-patch-id: c5a64d246ff26047723e5e1a9c16b42a1d5fbf87
> prerequisite-patch-id: 89cf4c6b9242525883ac02bb8ef90856ef908d0f
> prerequisite-patch-id: 0992642ac657a1da617588a6d7b28f3669960374
> prerequisite-patch-id: e8a65c309b3eaf3341ceac421ef602bcc3f057fa
> prerequisite-patch-id: 4d38462a4bf2b242f8fcec3bf28f1ad97fa40ca7
> prerequisite-patch-id: 6430030eaa9b5f09eedf6d41b698549096905c56
> prerequisite-patch-id: aefef52e1438f34dd49e0cde010e791d96ef06d9
> prerequisite-patch-id: e2bbb33b358df9330190eeb9b1e1ec25bebf06a6
> prerequisite-patch-id: 01c7598ca4429c23f650f760fb9ee3809b340322
> prerequisite-patch-id: 5998403c58e4b48f0cb0d87971e553d2999421fc
> prerequisite-patch-id: 8766128335d133bdd548ed5978aa9eefeb6f7b6d
> prerequisite-patch-id: 35e83414bbe54be31fe7cc15c7d6368543cd4e8f
> prerequisite-patch-id: fe12afceb640e98f3e1c71915e005f114677b22c
> prerequisite-patch-id: 3793aeb5329f974f12647158fe55329f5a801d06
> prerequisite-patch-id: 334d947a1a22d821075ff599c9290623f4698302
> prerequisite-patch-id: 4f36328ff57951343e944efc3723cc1d5d437f0a



More information about the DTrace-devel mailing list