[DTrace-devel] [PATCH] test: Update -xctfpath test

Kris Van Hees kvanhees at kvh-deb-bpf.us.oracle.com
Tue Jan 30 16:31:15 UTC 2024


On Mon, Dec 18, 2023 at 05:47:58PM -0500, eugene.loh at oracle.com wrote:
> 
> With commit XXXXXXXX "btf: support compilation in older environments",

XXXXXXXX = f86b1e27

> 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>

Reviewed-by: Kris Van Hees <kris.van.hees 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