* [PATCH] test: skip tst.symbols.c if no /proc/kallmodsyms
@ 2024-07-31 19:02 Kris Van Hees
2024-07-31 19:36 ` Eugene Loh
0 siblings, 1 reply; 4+ messages in thread
From: Kris Van Hees @ 2024-07-31 19:02 UTC (permalink / raw)
To: dtrace, dtrace-devel
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
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] test: skip tst.symbols.c if no /proc/kallmodsyms
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
0 siblings, 1 reply; 4+ messages in thread
From: Eugene Loh @ 2024-07-31 19:36 UTC (permalink / raw)
To: Kris Van Hees, dtrace, dtrace-devel
Should we be adding a version of the test that's appropriate for
/proc/kallsyms?
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test: skip tst.symbols.c if no /proc/kallmodsyms
2024-07-31 19:36 ` Eugene Loh
@ 2024-07-31 19:55 ` Kris Van Hees
2024-08-01 0:50 ` Eugene Loh
0 siblings, 1 reply; 4+ messages in thread
From: Kris Van Hees @ 2024-07-31 19:55 UTC (permalink / raw)
To: Eugene Loh; +Cc: Kris Van Hees, dtrace, dtrace-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test: skip tst.symbols.c if no /proc/kallmodsyms
2024-07-31 19:55 ` Kris Van Hees
@ 2024-08-01 0:50 ` Eugene Loh
0 siblings, 0 replies; 4+ messages in thread
From: Eugene Loh @ 2024-08-01 0:50 UTC (permalink / raw)
To: Kris Van Hees; +Cc: dtrace, dtrace-devel
On 7/31/24 15:55, Kris Van Hees wrote:
> 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.
Already the test checks admittedly little, but little tests do catch
errors. Anyhow,
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
>> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-01 0:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-08-01 0:50 ` Eugene Loh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox