test: Remove orphaned tst.lockstat.r
PATCH 1/2 test: Remove orphaned tst.lockstat.r
From: Eugene Loh <[email protected]>
In commit ded09d05a ("test: rework main lockstat test"), a lockstat test was renamed. Its .r results file was thereby orphaned. Remove the orphaned copy.
--- test/unittest/lockstat/tst.lockstat.r | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 test/unittest/lockstat/tst.lockstat.r
test/unittest/lockstat/tst.lockstat.r deleted +0 -13
@@ -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 -
Signature · 1 line
2.43.5
PATCH 2/2 test: Skip pid-0 tests on oversubscribed systems
From: Eugene Loh <[email protected]>
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.
--- 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
test/unittest/ustack/tst.kthread.d +2 -2
@@ -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); }
test/unittest/ustack/tst.kthread.x new file +5 -0
@@ -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 $?
test/unittest/ustack/tst.uaddr-pid0.d +2 -2
@@ -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);
test/unittest/ustack/tst.uaddr-pid0.r.p +2 -2
@@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit }
test/unittest/ustack/tst.uaddr-pid0.x new file +5 -0
@@ -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 $?
test/unittest/ustack/tst.ufunc-pid0.d +2 -2
@@ -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);
test/unittest/ustack/tst.ufunc-pid0.r.p +2 -2
@@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit }
test/unittest/ustack/tst.ufunc-pid0.x new file +5 -0
@@ -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 $?
test/unittest/ustack/tst.usym-pid0.d +2 -2
@@ -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);
test/unittest/ustack/tst.usym-pid0.r.p +2 -2
@@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit }
test/unittest/ustack/tst.usym-pid0.x new file +5 -0
@@ -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 $?
Signature · 1 line
2.43.5
Re: [DTrace-devel] [PATCH 2/2] test: Skip pid-0 tests on oversubscribed systems
Quoted 11 lines · eugene.loh--- via DTrace-devel
From: Eugene Loh <[email protected]>
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.
Quoted 6 lines
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 <[email protected]>
... although I think it would be best to have a single .x file and then create symbolic links for its copies under different names.
Quoted 184 lines
--- 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.xtest/unittest/ustack/tst.kthread.d +2
-2@@ -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); }test/unittest/ustack/tst.kthread.x new file +5
-0@@ -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 $?test/unittest/ustack/tst.uaddr-pid0.d +2
-2@@ -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);test/unittest/ustack/tst.uaddr-pid0.r.p +2
-2@@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit }test/unittest/ustack/tst.uaddr-pid0.x new file +5
-0@@ -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 $?test/unittest/ustack/tst.ufunc-pid0.d +2
-2@@ -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);test/unittest/ustack/tst.ufunc-pid0.r.p +2
-2@@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit }test/unittest/ustack/tst.ufunc-pid0.x new file +5
-0@@ -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 $?test/unittest/ustack/tst.usym-pid0.d +2
-2@@ -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);test/unittest/ustack/tst.usym-pid0.r.p +2
-2@@ -1,4 +1,4 @@ #!/usr/bin/gawk -f -# remove trailing blanks -{ sub(" *$", ""); print } +# remove trailing blanks, use only one line +{ sub(" *$", ""); print; exit }test/unittest/ustack/tst.usym-pid0.x new file +5
-0@@ -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 $?Signature · 7 lines
2.43.5 _______________________________________________ DTrace-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/dtrace-devel
Quoted 7 lines · eugene.loh--- via DTrace-devel
From: Eugene Loh <[email protected]>
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 <[email protected]>
Quoted 32 lines
--- test/unittest/lockstat/tst.lockstat.r | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 test/unittest/lockstat/tst.lockstat.rtest/unittest/lockstat/tst.lockstat.r deleted +0
-13@@ -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 -Signature · 7 lines
2.43.5 _______________________________________________ DTrace-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/dtrace-devel