aboutsummaryrefslogtreecommitdiff
path: root/libctf/testsuite/libctf-regression/gzrewrite-ctf.c
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2024-04-02 16:13:46 +0100
committerNick Alcock <nick.alcock@oracle.com>2024-04-19 16:14:47 +0100
commit3b5e2d0e8d55fd61c8b0f7aaf61b6b097654a5c1 (patch)
tree776a06ad8a27133fd7cad18cdbd9187f78ae65b3 /libctf/testsuite/libctf-regression/gzrewrite-ctf.c
parenta96a9ca9535e0a59bd4367dd84040aa0a9ac6f48 (diff)
downloadbinutils-3b5e2d0e8d55fd61c8b0f7aaf61b6b097654a5c1.zip
binutils-3b5e2d0e8d55fd61c8b0f7aaf61b6b097654a5c1.tar.gz
binutils-3b5e2d0e8d55fd61c8b0f7aaf61b6b097654a5c1.tar.bz2
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.
Diffstat (limited to 'libctf/testsuite/libctf-regression/gzrewrite-ctf.c')
-rw-r--r--libctf/testsuite/libctf-regression/gzrewrite-ctf.c19
1 files changed, 19 insertions, 0 deletions
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;