summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/strip-all.test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-objcopy/strip-all.test')
-rw-r--r--llvm/test/tools/llvm-objcopy/strip-all.test19
1 files changed, 15 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-objcopy/strip-all.test b/llvm/test/tools/llvm-objcopy/strip-all.test
index e4bf4e5e654..2e935526953 100644
--- a/llvm/test/tools/llvm-objcopy/strip-all.test
+++ b/llvm/test/tools/llvm-objcopy/strip-all.test
@@ -1,15 +1,26 @@
# RUN: yaml2obj %s > %t
+# RUN: cp %t %t3
# RUN: llvm-objcopy --strip-all %t %t2
# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s
-# We run yaml2obj again rather than copy %t to avoid interfering
-# with llvm-objcopy's test (which potentially could have corrupted/updated the binary).
+# Verify that the previous llvm-objcopy's run has not modified the input.
+# RUN: cmp %t %t3
-# RUN: yaml2obj %s > %t3
# RUN: llvm-strip %t3
-# RUN: llvm-readobj -file-headers -sections %t3 | FileCheck %s
# RUN: cmp %t2 %t3
+# RUN: cp %t %t4
+# RUN: llvm-strip %t4 -o %t5
+# RUN: cmp %t2 %t5
+
+# Verify that the previous llvm-strip's run has not modified the input.
+# RUN: cmp %t %t4
+
+# RUN: cp %t %t-should-remain-the-same
+# RUN: llvm-strip %t4 -o %t-should-remain-the-same -o %t-should-be-stripped
+# RUN: cmp %t2 %t-should-be-stripped
+# RUN: cmp %t %t-should-remain-the-same
+
!ELF
FileHeader:
Class: ELFCLASS64
OpenPOWER on IntegriCloud