[DTrace-devel] [PATCH v2] test: Update -xctfpath test
eugene.loh at oracle.com
eugene.loh at oracle.com
Fri Jan 12 00:57:12 UTC 2024
From: Eugene Loh <eugene.loh at oracle.com>
With commit f86b1e27 "btf: support compilation in older environments",
error messages for a bad -xctfpath depend on HAVE_LIBCTF. So loosen
the check. Just check for "Cannot open CTF archive /dev/null".
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
test/unittest/options/err.ctfpath.r | 2 +-
test/unittest/options/err.ctfpath.sh | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/unittest/options/err.ctfpath.r b/test/unittest/options/err.ctfpath.r
index 92509758..2dfd4254 100644
--- a/test/unittest/options/err.ctfpath.r
+++ b/test/unittest/options/err.ctfpath.r
@@ -1 +1 @@
-Cannot open CTF archive /dev/null: File is not in CTF or ELF format.; trying BTF.
+Cannot open CTF archive /dev/null
diff --git a/test/unittest/options/err.ctfpath.sh b/test/unittest/options/err.ctfpath.sh
index d0898729..c629624c 100755
--- a/test/unittest/options/err.ctfpath.sh
+++ b/test/unittest/options/err.ctfpath.sh
@@ -11,6 +11,7 @@ dtrace=$1
$dtrace $dt_flags -xdebug -xctfpath=/dev/null -n 'BEGIN { exit(0); }' |&
awk '/Cannot open CTF archive \/dev\/null/ {
sub(/^[^:]+: /, "");
+ sub(/:.*$/, "");
print;
exit(1);
}'
--
2.18.4
More information about the DTrace-devel
mailing list