From 3b5e2d0e8d55fd61c8b0f7aaf61b6b097654a5c1 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Tue, 2 Apr 2024 16:13:46 +0100 Subject: libctf: add rewriting tests Now there's a chance of it actually working, we can add more tests for the long-broken dict read-and-rewrite cases. This is the first ever test for the (rarely-used, unpleasant, and until recently completely broken) ctf_gzwrite function. libctf/ * testsuite/libctf-regression/gzrewrite*: New test. * testsuite/libctf-regression/zrewrite*: Likewise. --- libctf/testsuite/libctf-regression/gzrewrite-ctf.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 libctf/testsuite/libctf-regression/gzrewrite-ctf.c (limited to 'libctf/testsuite/libctf-regression/gzrewrite-ctf.c') diff --git a/libctf/testsuite/libctf-regression/gzrewrite-ctf.c b/libctf/testsuite/libctf-regression/gzrewrite-ctf.c new file mode 100644 index 0000000..b5d483e --- /dev/null +++ b/libctf/testsuite/libctf-regression/gzrewrite-ctf.c @@ -0,0 +1,19 @@ +int an_int; +char *a_char_ptr; +typedef int (*a_typedef) (int main); +struct struct_forward; +enum enum_forward; +union union_forward; +typedef int an_array[50]; +struct a_struct { int foo; }; +union a_union { int bar; }; +enum an_enum { FOO }; + +a_typedef a; +struct struct_forward *x; +union union_forward *y; +enum enum_forward *z; +struct a_struct *xx; +union a_union *yy; +enum an_enum *zz; +an_array ar; -- cgit v1.1