[DTrace-devel] [PATCH] test: fix another use of a kernel variable
Kris Van Hees
kris.van.hees at oracle.com
Fri Aug 2 15:56:24 UTC 2024
Yet another case where lack datatype information for kernel variable
(i.e. lack of CTF, and BTF does not provide it) requires an explicit
use of the &-operator.
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
test/unittest/options/tst.linkmode.r | 2 +-
test/unittest/options/tst.linkmode.sh | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/unittest/options/tst.linkmode.r b/test/unittest/options/tst.linkmode.r
index 4b453f56..acbf8025 100644
--- a/test/unittest/options/tst.linkmode.r
+++ b/test/unittest/options/tst.linkmode.r
@@ -14,4 +14,4 @@ Linux version
-- @@stderr --
dtrace: failed to set -x linkmode: Invalid value for specified option
-dtrace: invalid probe specifier BEGIN { trace((string)`linux_banner); exit(0); }: relocation remains against kernel symbol vmlinux`linux_banner (offset {ptr})
+dtrace: invalid probe specifier BEGIN { trace((string)&`linux_banner); exit(0); }: relocation remains against kernel symbol vmlinux`linux_banner (offset {ptr})
diff --git a/test/unittest/options/tst.linkmode.sh b/test/unittest/options/tst.linkmode.sh
index 4e28f8bd..07045fd5 100755
--- a/test/unittest/options/tst.linkmode.sh
+++ b/test/unittest/options/tst.linkmode.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Oracle Linux DTrace.
-# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 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,7 +12,7 @@ dtrace=$1
function mytest() {
echo try $1
- $dtrace $1 -qn 'BEGIN { trace((string)`linux_banner); exit(0); }' | cut -c-14
+ $dtrace $1 -qn 'BEGIN { trace((string)&`linux_banner); exit(0); }' | cut -c-14
}
# Test different link modes.
--
2.45.2
More information about the DTrace-devel
mailing list