[DTrace-devel] [PATCH] test: if /proc/kallmodsyms does not exist, skip tests that require it
Kris Van Hees
kris.van.hees at oracle.com
Sat Jul 27 01:31:24 UTC 2024
On Fri, Jul 26, 2024 at 09:21:37PM -0400, Eugene Loh wrote:
> Reviewed-by: Eugene Loh <eugene.loh at 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 at 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
More information about the DTrace-devel
mailing list