[DTrace-devel] [PATCH 1/4] Tweak testsuite to account for libctf / libdtrace-ctf differences

Nick Alcock nick.alcock at oracle.com
Mon Nov 1 19:56:33 UTC 2021


On 30 Oct 2021, Kris Van Hees verbalised:
> Some error messages changed in libctf while libdrace-ctf is still using
> the old messages.  The most common change is the addition of a trailing
> period for error messages.  One instance is slightly more involved by
> mislabeling a struct as a union.

It's the other way round: libdtrace-ctf printed all forwards as 'struct
FOO', even if they were forwards to unions or enums. libctf fixed this
(in binutils-gdb commit b4b6ea46807ec9c01ed4f4f18a50840358d16c28).

> diff --git a/test/unittest/funcs/err.inet_ntoabadaddr.d b/test/unittest/funcs/err.inet_ntoabadaddr.d
> index 58e5a33d..40beaebf 100644
> --- a/test/unittest/funcs/err.inet_ntoabadaddr.d
> +++ b/test/unittest/funcs/err.inet_ntoabadaddr.d
> @@ -1,9 +1,10 @@
>  /*
>   * Oracle Linux DTrace.
> - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2007, 2021, 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.
>   */
> +/* @@skip: libctf bug */

This bug was fixed some time ago (upstream commit
6ab5b6d0f3adc36303d2cc5308a92cf95e2801f9). Is it worth adding a skip
that we're just going to want to remove again in short ordwer?

> diff --git a/test/utils/libctf.r.p b/test/utils/libctf.r.p
> new file mode 100755
> index 00000000..a2b4602c
> --- /dev/null
> +++ b/test/utils/libctf.r.p
> @@ -0,0 +1,7 @@
> +#!/usr/bin/gawk -f
> +# Licensed under the Universal Permissive License v 1.0 as shown at
> +# http://oss.oracle.com/licenses/upl.
> +/Duplicate member or variable name\.$/ { sub(/\.$/, ""); }
> +/Member name not found\.$/ { sub(/\.$/, ""); }
> +/enum union pirate:/ { sub(/enum union pirate/, "enum struct pirate"); }
> +{ print; }

Looks good. (There are many more potentially varying error messages, but
those do seem to be the only ones the testsuite triggers right now.)



More information about the DTrace-devel mailing list