* [PATCH] test: if /proc/kallmodsyms does not exist, skip tests that require it
@ 2024-07-26 23:48 Kris Van Hees
2024-07-27 1:21 ` Eugene Loh
0 siblings, 1 reply; 3+ messages in thread
From: Kris Van Hees @ 2024-07-26 23:48 UTC (permalink / raw)
To: dtrace, dtrace-devel
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
test/unittest/aggs/tst.aggmod_full.x | 4 +++-
test/unittest/aggs/tst.aggmod_full2.x | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/unittest/aggs/tst.aggmod_full.x b/test/unittest/aggs/tst.aggmod_full.x
index 94239b47..955fb52a 100755
--- a/test/unittest/aggs/tst.aggmod_full.x
+++ b/test/unittest/aggs/tst.aggmod_full.x
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Oracle Linux DTrace.
-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 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.
@@ -12,6 +12,8 @@
# often of the form __key.*. If there are few (2-3), the bug is present
# and this test should not be run.
+[[ -r /proc/kallmodsyms ]] || exit 2
+
nzero=`awk '/ 0 /; / _end$/ || / __brk_limit$/ {exit(0);}' /proc/kallmodsyms | wc -l`
if [[ $nzero -lt 20 ]]; then
diff --git a/test/unittest/aggs/tst.aggmod_full2.x b/test/unittest/aggs/tst.aggmod_full2.x
index 2cc64c94..2e4c5900 100755
--- a/test/unittest/aggs/tst.aggmod_full2.x
+++ b/test/unittest/aggs/tst.aggmod_full2.x
@@ -20,6 +20,8 @@ fi
# often of the form __key.*. If there are few (2-3), the bug is present
# and this test should not be run.
+[[ -r /proc/kallmodsyms ]] || exit 2
+
nzero=`awk '/ 0 /; / _end$/ || / __brk_limit$/ {exit(0);}' /proc/kallmodsyms | wc -l`
if [[ $nzero -lt 20 ]]; then
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] test: if /proc/kallmodsyms does not exist, skip tests that require it
2024-07-26 23:48 [PATCH] test: if /proc/kallmodsyms does not exist, skip tests that require it Kris Van Hees
@ 2024-07-27 1:21 ` Eugene Loh
2024-07-27 1:31 ` Kris Van Hees
0 siblings, 1 reply; 3+ messages in thread
From: Eugene Loh @ 2024-07-27 1:21 UTC (permalink / raw)
To: Kris Van Hees, dtrace, dtrace-devel
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
but two comments:
1) There remains a possibility that we think kallmodsyms *should*
exist. That is, the missing file is less a reason to skip these tests
and more a reason to investigate why the file is missing. I'm not sure
if we want to address that.
2) In both files, the compact fix appears between another check and its
preceding comment block, which describes it. How about inserting the
fix before the comment block, perhaps also adding a comment for the fix
(mainly to match the commenting practice of these files).
On 7/26/24 19:48, Kris Van Hees wrote:
> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/aggs/tst.aggmod_full.x | 4 +++-
> test/unittest/aggs/tst.aggmod_full2.x | 2 ++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/test/unittest/aggs/tst.aggmod_full.x b/test/unittest/aggs/tst.aggmod_full.x
> index 94239b47..955fb52a 100755
> --- a/test/unittest/aggs/tst.aggmod_full.x
> +++ b/test/unittest/aggs/tst.aggmod_full.x
> @@ -1,7 +1,7 @@
> #!/bin/bash
> #
> # Oracle Linux DTrace.
> -# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
> +# Copyright (c) 2018, 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.
>
> @@ -12,6 +12,8 @@
> # often of the form __key.*. If there are few (2-3), the bug is present
> # and this test should not be run.
>
> +[[ -r /proc/kallmodsyms ]] || exit 2
> +
> nzero=`awk '/ 0 /; / _end$/ || / __brk_limit$/ {exit(0);}' /proc/kallmodsyms | wc -l`
>
> if [[ $nzero -lt 20 ]]; then
> diff --git a/test/unittest/aggs/tst.aggmod_full2.x b/test/unittest/aggs/tst.aggmod_full2.x
> index 2cc64c94..2e4c5900 100755
> --- a/test/unittest/aggs/tst.aggmod_full2.x
> +++ b/test/unittest/aggs/tst.aggmod_full2.x
> @@ -20,6 +20,8 @@ fi
> # often of the form __key.*. If there are few (2-3), the bug is present
> # and this test should not be run.
>
> +[[ -r /proc/kallmodsyms ]] || exit 2
> +
> nzero=`awk '/ 0 /; / _end$/ || / __brk_limit$/ {exit(0);}' /proc/kallmodsyms | wc -l`
>
> if [[ $nzero -lt 20 ]]; then
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] test: if /proc/kallmodsyms does not exist, skip tests that require it
2024-07-27 1:21 ` Eugene Loh
@ 2024-07-27 1:31 ` Kris Van Hees
0 siblings, 0 replies; 3+ messages in thread
From: Kris Van Hees @ 2024-07-27 1:31 UTC (permalink / raw)
To: Eugene Loh; +Cc: Kris Van Hees, dtrace, dtrace-devel
On Fri, Jul 26, 2024 at 09:21:37PM -0400, Eugene Loh wrote:
> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
Thanks.
> but two comments:
>
> 1) There remains a possibility that we think kallmodsyms *should* exist.
> That is, the missing file is less a reason to skip these tests and more a
> reason to investigate why the file is missing. I'm not sure if we want to
> address that.
If /proc/kallmodsyms is missing then that is a problem on the kernel side,
with older kernels. It has been replaced with modules.builtin.ranges which
is expected to make its way into the upstream kernel.
> 2) In both files, the compact fix appears between another check and its
> preceding comment block, which describes it. How about inserting the fix
> before the comment block, perhaps also adding a comment for the fix (mainly
> to match the commenting practice of these files).
Sure.
> On 7/26/24 19:48, Kris Van Hees wrote:
> > Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> > ---
> > test/unittest/aggs/tst.aggmod_full.x | 4 +++-
> > test/unittest/aggs/tst.aggmod_full2.x | 2 ++
> > 2 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/test/unittest/aggs/tst.aggmod_full.x b/test/unittest/aggs/tst.aggmod_full.x
> > index 94239b47..955fb52a 100755
> > --- a/test/unittest/aggs/tst.aggmod_full.x
> > +++ b/test/unittest/aggs/tst.aggmod_full.x
> > @@ -1,7 +1,7 @@
> > #!/bin/bash
> > #
> > # Oracle Linux DTrace.
> > -# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
> > +# Copyright (c) 2018, 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.
> > @@ -12,6 +12,8 @@
> > # often of the form __key.*. If there are few (2-3), the bug is present
> > # and this test should not be run.
> > +[[ -r /proc/kallmodsyms ]] || exit 2
> > +
> > nzero=`awk '/ 0 /; / _end$/ || / __brk_limit$/ {exit(0);}' /proc/kallmodsyms | wc -l`
> > if [[ $nzero -lt 20 ]]; then
> > diff --git a/test/unittest/aggs/tst.aggmod_full2.x b/test/unittest/aggs/tst.aggmod_full2.x
> > index 2cc64c94..2e4c5900 100755
> > --- a/test/unittest/aggs/tst.aggmod_full2.x
> > +++ b/test/unittest/aggs/tst.aggmod_full2.x
> > @@ -20,6 +20,8 @@ fi
> > # often of the form __key.*. If there are few (2-3), the bug is present
> > # and this test should not be run.
> > +[[ -r /proc/kallmodsyms ]] || exit 2
> > +
> > nzero=`awk '/ 0 /; / _end$/ || / __brk_limit$/ {exit(0);}' /proc/kallmodsyms | wc -l`
> > if [[ $nzero -lt 20 ]]; then
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-27 1:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 23:48 [PATCH] test: if /proc/kallmodsyms does not exist, skip tests that require it Kris Van Hees
2024-07-27 1:21 ` Eugene Loh
2024-07-27 1:31 ` 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