From: Kris Van Hees <kris.van.hees@oracle.com>
To: Eugene Loh <eugene.loh@oracle.com>
Cc: Kris Van Hees <kris.van.hees@oracle.com>,
dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH] test: skip tst.symbols.c if no /proc/kallmodsyms
Date: Wed, 31 Jul 2024 15:55:28 -0400 [thread overview]
Message-ID: <ZqqWsKcXMZ77kwcY@oracle.com> (raw)
In-Reply-To: <2612a5e1-eba9-d6dc-023e-3f505e797985@oracle.com>
On Wed, Jul 31, 2024 at 03:36:49PM -0400, Eugene Loh wrote:
> Should we be adding a version of the test that's appropriate for
> /proc/kallsyms?
I don't think that would make sense because this test seems to validate the
kallmodsyms information against the information dtrace is able to determine.
But with kallsyms and modules.builtin.ranges, we don't really have a good
way to validate the module association because there is only one source for
it.
I guess we could implement a version of this test that merely checks that
the symbol-address association is accurate but that is possibly not even
really worth doing? We obtain it using a straight read from the file and
adding the name and address to a list. Validation would merely mean that
we validate that we read it correctly and stored it correctly.
>
> On 7/31/24 15:02, Kris Van Hees wrote:
> > Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> > ---
> > test/unittest/consumer/tst.symbols.x | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> > create mode 100755 test/unittest/consumer/tst.symbols.x
> >
> > diff --git a/test/unittest/consumer/tst.symbols.x b/test/unittest/consumer/tst.symbols.x
> > new file mode 100755
> > index 00000000..e83d97f6
> > --- /dev/null
> > +++ b/test/unittest/consumer/tst.symbols.x
> > @@ -0,0 +1,12 @@
> > +#!/bin/bash
> > +#
> > +# Oracle Linux DTrace.
> > +# Copyright (c) 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.
> > +
> > +# If /proc/kallmodsyms does not exist, there is nothing to test
> > +
> > +[[ -r /proc/kallmodsyms ]] || exit 2
> > +
> > +exit 0
next prev parent reply other threads:[~2024-07-31 19:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 19:02 [PATCH] test: skip tst.symbols.c if no /proc/kallmodsyms Kris Van Hees
2024-07-31 19:36 ` Eugene Loh
2024-07-31 19:55 ` Kris Van Hees [this message]
2024-08-01 0:50 ` Eugene Loh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZqqWsKcXMZ77kwcY@oracle.com \
--to=kris.van.hees@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox