Re: [PATCH] test: skip when /proc/kallmodsyms is not present
Eugene Loh <[email protected]> Mon, 9 Feb 2026 13:55:03 -0500
| Newsgroups | dev.linux.lists.dtrace |
|---|---|
| Message-ID | <[email protected]> |
I'm rusty on this stuff, but maybe you can help me out. What happens with the test if kallmodsyms is not there? The test does not directly rely on that file. The test simply makes libdtrace calls, and dt_modsym_update() can fail over to kallsyms if kallmodsyms is not present. On 2/9/26 13:34, Kris Van Hees wrote: > Signed-off-by: Kris Van Hees <[email protected]> > --- > test/unittest/consumer/tst.merge_ranges_bug25767469.x | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/test/unittest/consumer/tst.merge_ranges_bug25767469.x b/test/unittest/consumer/tst.merge_ranges_bug25767469.x > index 7e265f2f..a92690ad 100755 > --- a/test/unittest/consumer/tst.merge_ranges_bug25767469.x > +++ b/test/unittest/consumer/tst.merge_ranges_bug25767469.x > @@ -1,10 +1,14 @@ > #!/bin/bash > # > # Oracle Linux DTrace. > -# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. > +# Copyright (c) 2018, 2026, 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 > + > # The test depends on a kernel fix to report kernel (and built-in-module) > # symbol sizes correctly in /proc/kallmodsyms. An easy check is to count > # how many kernel and built-in-module symbols (that is, symbols that appear