[AIX][BigArchive][NFC] Add test case that list members of archive with free list...
authorKai Luo <lkail@cn.ibm.com>
Fri, 16 Dec 2022 03:08:34 +0000 (11:08 +0800)
committerKai Luo <lkail@cn.ibm.com>
Fri, 16 Dec 2022 03:23:53 +0000 (11:23 +0800)
The archive is generated via
```
touch foo.c
ar crus libfoo.a foo.c
ar d libfoo.a foo.c
```
Thus it contains free list.

Differential Revision: https://reviews.llvm.org/D138985

llvm/test/Object/Inputs/aix-empty-big-archive-with-freelist.a [new file with mode: 0644]
llvm/test/Object/archive-big-read-empty-with-freelist.test [new file with mode: 0644]

diff --git a/llvm/test/Object/Inputs/aix-empty-big-archive-with-freelist.a b/llvm/test/Object/Inputs/aix-empty-big-archive-with-freelist.a
new file mode 100644 (file)
index 0000000..4b80edb
Binary files /dev/null and b/llvm/test/Object/Inputs/aix-empty-big-archive-with-freelist.a differ
diff --git a/llvm/test/Object/archive-big-read-empty-with-freelist.test b/llvm/test/Object/archive-big-read-empty-with-freelist.test
new file mode 100644 (file)
index 0000000..2ac3253
--- /dev/null
@@ -0,0 +1,3 @@
+# Test reading an empty archive with free list in it.
+# RUN: not llvm-ar tv %p/Inputs/aix-empty-big-archive-with-freelist.a 2>&1 \
+# RUN:   | grep 'truncated or malformed archive'