* [PATCH 1/2] test: Remove orphaned tst.lockstat.r
@ 2025-04-14 20:19 eugene.loh
2025-04-14 20:19 ` [PATCH 2/2] test: Skip pid-0 tests on oversubscribed systems eugene.loh
2025-04-15 15:10 ` [DTrace-devel] [PATCH 1/2] test: Remove orphaned tst.lockstat.r Kris Van Hees
0 siblings, 2 replies; 4+ messages in thread
From: eugene.loh @ 2025-04-14 20:19 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@oracle.com>
In commit ded09d05a ("test: rework main lockstat test"), a lockstat
test was renamed. Its .r results file was thereby orphaned. Remove
the orphaned copy.
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
test/unittest/lockstat/tst.lockstat.r | 13 -------------
1 file changed, 13 deletions(-)
delete mode 100644 test/unittest/lockstat/tst.lockstat.r
diff --git a/test/unittest/lockstat/tst.lockstat.r b/test/unittest/lockstat/tst.lockstat.r
deleted file mode 100644
index 5bdc40c67..000000000
--- a/test/unittest/lockstat/tst.lockstat.r
+++ /dev/null
@@ -1,13 +0,0 @@
-Minimum lockstat events seen
-
-lockstat:::adaptive-spin - yes
-lockstat:::adaptive-block - yes
-lockstat:::adaptive-acquire - yes
-lockstat:::adaptive-release - yes
-lockstat:::rw-spin - yes
-lockstat:::rw-acquire - yes
-lockstat:::rw-release - yes
-lockstat:::spin-spin - yes
-lockstat:::spin-acquire - yes
-lockstat:::spin-release - yes
-
--
2.43.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] test: Skip pid-0 tests on oversubscribed systems 2025-04-14 20:19 [PATCH 1/2] test: Remove orphaned tst.lockstat.r eugene.loh @ 2025-04-14 20:19 ` eugene.loh 2025-04-15 15:32 ` [DTrace-devel] " Kris Van Hees 2025-04-15 15:10 ` [DTrace-devel] [PATCH 1/2] test: Remove orphaned tst.lockstat.r Kris Van Hees 1 sibling, 1 reply; 4+ messages in thread From: eugene.loh @ 2025-04-14 20:19 UTC (permalink / raw) To: dtrace, dtrace-devel From: Eugene Loh <eugene.loh@oracle.com> A number of tests check "tick-n /pid==0/" probes. The problem with this is that a tick-n probe runs on a specific CPU. If that CPU is fully subscribed, then pid 0 (swapper) will not run. Thus, the test will take a long time, only to time out. Change these tests to use profile-n instead of tick-n probes, improving chances that the test probe will fire on a less subscribed CPU. Therefore, also change the .r.p post-processing file so that it uses only one output line (in case two CPUs manage to write output). Finally, add skip files in case pid 0 does not fire on any CPU. Signed-off-by: Eugene Loh <eugene.loh@oracle.com> --- test/unittest/ustack/tst.kthread.d | 4 ++-- test/unittest/ustack/tst.kthread.x | 5 +++++ test/unittest/ustack/tst.uaddr-pid0.d | 4 ++-- test/unittest/ustack/tst.uaddr-pid0.r.p | 4 ++-- test/unittest/ustack/tst.uaddr-pid0.x | 5 +++++ test/unittest/ustack/tst.ufunc-pid0.d | 4 ++-- test/unittest/ustack/tst.ufunc-pid0.r.p | 4 ++-- test/unittest/ustack/tst.ufunc-pid0.x | 5 +++++ test/unittest/ustack/tst.usym-pid0.d | 4 ++-- test/unittest/ustack/tst.usym-pid0.r.p | 4 ++-- test/unittest/ustack/tst.usym-pid0.x | 5 +++++ 11 files changed, 34 insertions(+), 14 deletions(-) create mode 100755 test/unittest/ustack/tst.kthread.x create mode 100755 test/unittest/ustack/tst.uaddr-pid0.x create mode 100755 test/unittest/ustack/tst.ufunc-pid0.x create mode 100755 test/unittest/ustack/tst.usym-pid0.x diff --git a/test/unittest/ustack/tst.kthread.d b/test/unittest/ustack/tst.kthread.d index c6252b742..83ae6f7c6 100644 --- a/test/unittest/ustack/tst.kthread.d +++ b/test/unittest/ustack/tst.kthread.d @@ -1,6 +1,6 @@ /* * Oracle Linux DTrace. - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, 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. */ @@ -16,4 +16,4 @@ #pragma D option quiet -tick-100msec / pid == 0 / { ustack(); exit(0); } +profile-100msec / pid == 0 / { ustack(); exit(0); } diff --git a/test/unittest/ustack/tst.kthread.x b/test/unittest/ustack/tst.kthread.x new file mode 100755 index 000000000..b5fe7177a --- /dev/null +++ b/test/unittest/ustack/tst.kthread.x @@ -0,0 +1,5 @@ +#!/bin/sh + +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' +exit $? diff --git a/test/unittest/ustack/tst.uaddr-pid0.d b/test/unittest/ustack/tst.uaddr-pid0.d index 263a7ca94..ab54eea40 100644 --- a/test/unittest/ustack/tst.uaddr-pid0.d +++ b/test/unittest/ustack/tst.uaddr-pid0.d @@ -1,6 +1,6 @@ /* * Oracle Linux DTrace. - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, 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. */ @@ -9,7 +9,7 @@ #pragma D option quiet -tick-1 +profile-1 /pid == $target/ { uaddr(ucaller); diff --git a/test/unittest/ustack/tst.uaddr-pid0.r.p b/test/unittest/ustack/tst.uaddr-pid0.r.p index 9203dc824..78ab8e59d 100755 --- a/test/unittest/ustack/tst.uaddr-pid0.r.p +++ b/test/unittest/ustack/tst.uaddr-pid0.r.p @@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit } diff --git a/test/unittest/ustack/tst.uaddr-pid0.x b/test/unittest/ustack/tst.uaddr-pid0.x new file mode 100755 index 000000000..b5fe7177a --- /dev/null +++ b/test/unittest/ustack/tst.uaddr-pid0.x @@ -0,0 +1,5 @@ +#!/bin/sh + +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' +exit $? diff --git a/test/unittest/ustack/tst.ufunc-pid0.d b/test/unittest/ustack/tst.ufunc-pid0.d index f076782aa..cd34275f1 100644 --- a/test/unittest/ustack/tst.ufunc-pid0.d +++ b/test/unittest/ustack/tst.ufunc-pid0.d @@ -1,6 +1,6 @@ /* * Oracle Linux DTrace. - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, 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. */ @@ -9,7 +9,7 @@ #pragma D option quiet -tick-1 +profile-1 /pid == $target/ { ufunc(ucaller); diff --git a/test/unittest/ustack/tst.ufunc-pid0.r.p b/test/unittest/ustack/tst.ufunc-pid0.r.p index 9203dc824..78ab8e59d 100755 --- a/test/unittest/ustack/tst.ufunc-pid0.r.p +++ b/test/unittest/ustack/tst.ufunc-pid0.r.p @@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit } diff --git a/test/unittest/ustack/tst.ufunc-pid0.x b/test/unittest/ustack/tst.ufunc-pid0.x new file mode 100755 index 000000000..b5fe7177a --- /dev/null +++ b/test/unittest/ustack/tst.ufunc-pid0.x @@ -0,0 +1,5 @@ +#!/bin/sh + +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' +exit $? diff --git a/test/unittest/ustack/tst.usym-pid0.d b/test/unittest/ustack/tst.usym-pid0.d index d2f5ec5de..9aceab355 100644 --- a/test/unittest/ustack/tst.usym-pid0.d +++ b/test/unittest/ustack/tst.usym-pid0.d @@ -1,6 +1,6 @@ /* * Oracle Linux DTrace. - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, 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. */ @@ -9,7 +9,7 @@ #pragma D option quiet -tick-1 +profile-1 /pid == $target/ { usym(ucaller); diff --git a/test/unittest/ustack/tst.usym-pid0.r.p b/test/unittest/ustack/tst.usym-pid0.r.p index 9203dc824..78ab8e59d 100755 --- a/test/unittest/ustack/tst.usym-pid0.r.p +++ b/test/unittest/ustack/tst.usym-pid0.r.p @@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit } diff --git a/test/unittest/ustack/tst.usym-pid0.x b/test/unittest/ustack/tst.usym-pid0.x new file mode 100755 index 000000000..b5fe7177a --- /dev/null +++ b/test/unittest/ustack/tst.usym-pid0.x @@ -0,0 +1,5 @@ +#!/bin/sh + +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' +exit $? -- 2.43.5 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [DTrace-devel] [PATCH 2/2] test: Skip pid-0 tests on oversubscribed systems 2025-04-14 20:19 ` [PATCH 2/2] test: Skip pid-0 tests on oversubscribed systems eugene.loh @ 2025-04-15 15:32 ` Kris Van Hees 0 siblings, 0 replies; 4+ messages in thread From: Kris Van Hees @ 2025-04-15 15:32 UTC (permalink / raw) To: eugene.loh; +Cc: dtrace, dtrace-devel On Mon, Apr 14, 2025 at 04:19:59PM -0400, eugene.loh--- via DTrace-devel wrote: > From: Eugene Loh <eugene.loh@oracle.com> > > A number of tests check "tick-n /pid==0/" probes. The problem > with this is that a tick-n probe runs on a specific CPU. If that > CPU is fully subscribed, then pid 0 (swapper) will not run. Thus, > the test will take a long time, only to time out. > > Change these tests to use profile-n instead of tick-n probes, > improving chances that the test probe will fire on a less subscribed > CPU. > > Therefore, also change the .r.p post-processing file so that it uses > only one output line (in case two CPUs manage to write output). > > Finally, add skip files in case pid 0 does not fire on any CPU. > > Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com> ... although I think it would be best to have a single .x file and then create symbolic links for its copies under different names. > --- > test/unittest/ustack/tst.kthread.d | 4 ++-- > test/unittest/ustack/tst.kthread.x | 5 +++++ > test/unittest/ustack/tst.uaddr-pid0.d | 4 ++-- > test/unittest/ustack/tst.uaddr-pid0.r.p | 4 ++-- > test/unittest/ustack/tst.uaddr-pid0.x | 5 +++++ > test/unittest/ustack/tst.ufunc-pid0.d | 4 ++-- > test/unittest/ustack/tst.ufunc-pid0.r.p | 4 ++-- > test/unittest/ustack/tst.ufunc-pid0.x | 5 +++++ > test/unittest/ustack/tst.usym-pid0.d | 4 ++-- > test/unittest/ustack/tst.usym-pid0.r.p | 4 ++-- > test/unittest/ustack/tst.usym-pid0.x | 5 +++++ > 11 files changed, 34 insertions(+), 14 deletions(-) > create mode 100755 test/unittest/ustack/tst.kthread.x > create mode 100755 test/unittest/ustack/tst.uaddr-pid0.x > create mode 100755 test/unittest/ustack/tst.ufunc-pid0.x > create mode 100755 test/unittest/ustack/tst.usym-pid0.x > > diff --git a/test/unittest/ustack/tst.kthread.d b/test/unittest/ustack/tst.kthread.d > index c6252b742..83ae6f7c6 100644 > --- a/test/unittest/ustack/tst.kthread.d > +++ b/test/unittest/ustack/tst.kthread.d > @@ -1,6 +1,6 @@ > /* > * Oracle Linux DTrace. > - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. > + * Copyright (c) 2013, 2025, 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. > */ > @@ -16,4 +16,4 @@ > > #pragma D option quiet > > -tick-100msec / pid == 0 / { ustack(); exit(0); } > +profile-100msec / pid == 0 / { ustack(); exit(0); } > diff --git a/test/unittest/ustack/tst.kthread.x b/test/unittest/ustack/tst.kthread.x > new file mode 100755 > index 000000000..b5fe7177a > --- /dev/null > +++ b/test/unittest/ustack/tst.kthread.x > @@ -0,0 +1,5 @@ > +#!/bin/sh > + > +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } > + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' > +exit $? > diff --git a/test/unittest/ustack/tst.uaddr-pid0.d b/test/unittest/ustack/tst.uaddr-pid0.d > index 263a7ca94..ab54eea40 100644 > --- a/test/unittest/ustack/tst.uaddr-pid0.d > +++ b/test/unittest/ustack/tst.uaddr-pid0.d > @@ -1,6 +1,6 @@ > /* > * Oracle Linux DTrace. > - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. > + * Copyright (c) 2023, 2025, 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. > */ > @@ -9,7 +9,7 @@ > > #pragma D option quiet > > -tick-1 > +profile-1 > /pid == $target/ > { > uaddr(ucaller); > diff --git a/test/unittest/ustack/tst.uaddr-pid0.r.p b/test/unittest/ustack/tst.uaddr-pid0.r.p > index 9203dc824..78ab8e59d 100755 > --- a/test/unittest/ustack/tst.uaddr-pid0.r.p > +++ b/test/unittest/ustack/tst.uaddr-pid0.r.p > @@ -1,4 +1,4 @@ > #!/usr/bin/gawk -f > > -# remove trailing blanks > -{ sub(" *$", ""); print } > +# remove trailing blanks, use only one line > +{ sub(" *$", ""); print; exit } > diff --git a/test/unittest/ustack/tst.uaddr-pid0.x b/test/unittest/ustack/tst.uaddr-pid0.x > new file mode 100755 > index 000000000..b5fe7177a > --- /dev/null > +++ b/test/unittest/ustack/tst.uaddr-pid0.x > @@ -0,0 +1,5 @@ > +#!/bin/sh > + > +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } > + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' > +exit $? > diff --git a/test/unittest/ustack/tst.ufunc-pid0.d b/test/unittest/ustack/tst.ufunc-pid0.d > index f076782aa..cd34275f1 100644 > --- a/test/unittest/ustack/tst.ufunc-pid0.d > +++ b/test/unittest/ustack/tst.ufunc-pid0.d > @@ -1,6 +1,6 @@ > /* > * Oracle Linux DTrace. > - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. > + * Copyright (c) 2023, 2025, 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. > */ > @@ -9,7 +9,7 @@ > > #pragma D option quiet > > -tick-1 > +profile-1 > /pid == $target/ > { > ufunc(ucaller); > diff --git a/test/unittest/ustack/tst.ufunc-pid0.r.p b/test/unittest/ustack/tst.ufunc-pid0.r.p > index 9203dc824..78ab8e59d 100755 > --- a/test/unittest/ustack/tst.ufunc-pid0.r.p > +++ b/test/unittest/ustack/tst.ufunc-pid0.r.p > @@ -1,4 +1,4 @@ > #!/usr/bin/gawk -f > > -# remove trailing blanks > -{ sub(" *$", ""); print } > +# remove trailing blanks, use only one line > +{ sub(" *$", ""); print; exit } > diff --git a/test/unittest/ustack/tst.ufunc-pid0.x b/test/unittest/ustack/tst.ufunc-pid0.x > new file mode 100755 > index 000000000..b5fe7177a > --- /dev/null > +++ b/test/unittest/ustack/tst.ufunc-pid0.x > @@ -0,0 +1,5 @@ > +#!/bin/sh > + > +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } > + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' > +exit $? > diff --git a/test/unittest/ustack/tst.usym-pid0.d b/test/unittest/ustack/tst.usym-pid0.d > index d2f5ec5de..9aceab355 100644 > --- a/test/unittest/ustack/tst.usym-pid0.d > +++ b/test/unittest/ustack/tst.usym-pid0.d > @@ -1,6 +1,6 @@ > /* > * Oracle Linux DTrace. > - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. > + * Copyright (c) 2023, 2025, 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. > */ > @@ -9,7 +9,7 @@ > > #pragma D option quiet > > -tick-1 > +profile-1 > /pid == $target/ > { > usym(ucaller); > diff --git a/test/unittest/ustack/tst.usym-pid0.r.p b/test/unittest/ustack/tst.usym-pid0.r.p > index 9203dc824..78ab8e59d 100755 > --- a/test/unittest/ustack/tst.usym-pid0.r.p > +++ b/test/unittest/ustack/tst.usym-pid0.r.p > @@ -1,4 +1,4 @@ > #!/usr/bin/gawk -f > > -# remove trailing blanks > -{ sub(" *$", ""); print } > +# remove trailing blanks, use only one line > +{ sub(" *$", ""); print; exit } > diff --git a/test/unittest/ustack/tst.usym-pid0.x b/test/unittest/ustack/tst.usym-pid0.x > new file mode 100755 > index 000000000..b5fe7177a > --- /dev/null > +++ b/test/unittest/ustack/tst.usym-pid0.x > @@ -0,0 +1,5 @@ > +#!/bin/sh > + > +$dtrace -qn 'profile-100ms /pid == 0/ { exit(0) } > + tick-1s { trace("cannot profile pid 0; oversubscribed system?"); exit(2) }' > +exit $? > -- > 2.43.5 > > > _______________________________________________ > DTrace-devel mailing list > DTrace-devel@oss.oracle.com > https://oss.oracle.com/mailman/listinfo/dtrace-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DTrace-devel] [PATCH 1/2] test: Remove orphaned tst.lockstat.r 2025-04-14 20:19 [PATCH 1/2] test: Remove orphaned tst.lockstat.r eugene.loh 2025-04-14 20:19 ` [PATCH 2/2] test: Skip pid-0 tests on oversubscribed systems eugene.loh @ 2025-04-15 15:10 ` Kris Van Hees 1 sibling, 0 replies; 4+ messages in thread From: Kris Van Hees @ 2025-04-15 15:10 UTC (permalink / raw) To: eugene.loh; +Cc: dtrace, dtrace-devel On Mon, Apr 14, 2025 at 04:19:58PM -0400, eugene.loh--- via DTrace-devel wrote: > From: Eugene Loh <eugene.loh@oracle.com> > > In commit ded09d05a ("test: rework main lockstat test"), a lockstat > test was renamed. Its .r results file was thereby orphaned. Remove > the orphaned copy. > > Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com> > --- > test/unittest/lockstat/tst.lockstat.r | 13 ------------- > 1 file changed, 13 deletions(-) > delete mode 100644 test/unittest/lockstat/tst.lockstat.r > > diff --git a/test/unittest/lockstat/tst.lockstat.r b/test/unittest/lockstat/tst.lockstat.r > deleted file mode 100644 > index 5bdc40c67..000000000 > --- a/test/unittest/lockstat/tst.lockstat.r > +++ /dev/null > @@ -1,13 +0,0 @@ > -Minimum lockstat events seen > - > -lockstat:::adaptive-spin - yes > -lockstat:::adaptive-block - yes > -lockstat:::adaptive-acquire - yes > -lockstat:::adaptive-release - yes > -lockstat:::rw-spin - yes > -lockstat:::rw-acquire - yes > -lockstat:::rw-release - yes > -lockstat:::spin-spin - yes > -lockstat:::spin-acquire - yes > -lockstat:::spin-release - yes > - > -- > 2.43.5 > > > _______________________________________________ > DTrace-devel mailing list > DTrace-devel@oss.oracle.com > https://oss.oracle.com/mailman/listinfo/dtrace-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-15 15:32 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-04-14 20:19 [PATCH 1/2] test: Remove orphaned tst.lockstat.r eugene.loh 2025-04-14 20:19 ` [PATCH 2/2] test: Skip pid-0 tests on oversubscribed systems eugene.loh 2025-04-15 15:32 ` [DTrace-devel] " Kris Van Hees 2025-04-15 15:10 ` [DTrace-devel] [PATCH 1/2] test: Remove orphaned tst.lockstat.r Kris Van Hees
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox