[PATCH] D142883: [BigArchive][NFC] Enhance test cases introduced in D138986
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 03:56:31 PST 2023
lkail created this revision.
lkail added reviewers: jhenderson, PowerPC.
Herald added a project: All.
lkail requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Per @jhenderson 's comments, update test cases.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142883
Files:
llvm/test/Object/archive-big-malformed-first-member.test
llvm/test/Object/archive-big-read-empty-with-freelist.test
Index: llvm/test/Object/archive-big-read-empty-with-freelist.test
===================================================================
--- llvm/test/Object/archive-big-read-empty-with-freelist.test
+++ llvm/test/Object/archive-big-read-empty-with-freelist.test
@@ -1,3 +1,2 @@
-# Test reading an empty archive with free list in it.
-# RUN: llvm-ar tv %p/Inputs/aix-empty-big-archive-with-freelist.a 2>&1 \
-# RUN: | not grep 'truncated or malformed archive'
+# Test reading an empty archive with free list in it, should exit normally.
+# RUN: llvm-ar tv %p/Inputs/aix-empty-big-archive-with-freelist.a 2>&1
Index: llvm/test/Object/archive-big-malformed-first-member.test
===================================================================
--- llvm/test/Object/archive-big-malformed-first-member.test
+++ llvm/test/Object/archive-big-malformed-first-member.test
@@ -1,7 +1,8 @@
# Test reading an empty archive with first member's offset is not zero.
# RUN: echo "<bigaf>" > %t.a
# RUN: echo -n "0 0 0 128 0 0 " >> %t.a
-# RUN: not llvm-ar tv %t.a 2>&1 | grep 'truncated or malformed archive'
+# RUN: not llvm-ar tv %t.a 2>&1 | FileCheck %s
# RUN: echo "<bigaf>" > %t.a
# RUN: echo -n "0 0 0 28 0 0 " >> %t.a
-# RUN: not llvm-ar tv %t.a 2>&1 | grep 'truncated or malformed archive'
+# RUN: not llvm-ar tv %t.a 2>&1 | FileCheck %s
+# CHECK: truncated or malformed archive
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142883.493271.patch
Type: text/x-patch
Size: 1594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230130/cc1bc577/attachment.bin>
More information about the llvm-commits
mailing list