On Wed, 2025-11-12 at 15:11 +0100, Paul Houssel wrote:
Lgtm, one nit below:
+{
- .descr = "dedup: recursive typedef",
- /*
* This test simulates a recursive typedef, which in GO is defined as such:** type Foo func() Foo** In BTF terms, this is represented as a TYPEDEF referencing* a FUNC_PROTO that returns the same TYPEDEF.*/- .input = {
.raw_types = {/** [1] typedef Foo -> func() Foo* [2] func_proto() -> Foo*/BTF_TYPEDEF_ENC(NAME_NTH(1), 2), /* [1] */BTF_FUNC_PROTO_ENC(1, 0), /* [2] */
Nit: Maybe repeat the above two types, just to make sure that deduplication happens?
BTF_END_RAW,},BTF_STR_SEC("\0Foo"),- },
- .expect = {
.raw_types = {BTF_TYPEDEF_ENC(NAME_NTH(1), 2), /* [1] */BTF_FUNC_PROTO_ENC(1, 0), /* [2] */BTF_END_RAW,},BTF_STR_SEC("\0Foo"),- },
+},
[...]