[llvm] bef10bf - [AIX][BigArchive][NFC] Add test case that list members of archive with free list in it
Kai Luo via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 19:24:20 PST 2022
Author: Kai Luo
Date: 2022-12-16T11:23:53+08:00
New Revision: bef10bf4e343141acda17cdf0fb7b7c09ee566d3
URL: https://github.com/llvm/llvm-project/commit/bef10bf4e343141acda17cdf0fb7b7c09ee566d3
DIFF: https://github.com/llvm/llvm-project/commit/bef10bf4e343141acda17cdf0fb7b7c09ee566d3.diff
LOG: [AIX][BigArchive][NFC] Add test case that list members of archive with free list in it
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
Added:
llvm/test/Object/Inputs/aix-empty-big-archive-with-freelist.a
llvm/test/Object/archive-big-read-empty-with-freelist.test
Modified:
Removed:
################################################################################
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
index 0000000000000..4b80edb49a9bf
Binary files /dev/null and b/llvm/test/Object/Inputs/aix-empty-big-archive-with-freelist.a
diff er
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
index 0000000000000..2ac3253446597
--- /dev/null
+++ b/llvm/test/Object/archive-big-read-empty-with-freelist.test
@@ -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'
More information about the llvm-commits
mailing list