1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test
George Rimar 43a9549487 [llvm-objcopy] - Stop using Inputs/alloc-symtab.o
Initially Inputs/alloc-symtab.o was added in D42222.
It contains an allocatable .symtab section. Today
we are able to create such sections using yaml2obj.

Later people started using this input for no solid reason in their tests.
Now multiple of tests are using it. 
(And those tests do not need such a specific case actually).

In this patch I removed this binary and rewrote the few tests.

Differential revision: https://reviews.llvm.org/D65278

llvm-svn: 367310
2019-07-30 13:37:02 +00:00

30 lines
1.1 KiB
Plaintext

## This tests for an expected error when --preserve-dates is
## specified at the same time as using stdin or stdout as input or
## output files.
# RUN: yaml2obj %s -o %t.foo
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_DYN
Machine: EM_X86_64
...
# RUN: not llvm-objcopy --preserve-dates - %t 2>&1 | FileCheck %s
# RUN: not llvm-objcopy --preserve-dates %t.foo - 2>&1 | FileCheck %s
## Test that llvm-strip reports a proper error when --preserve-dates is specified
## with one or more inputs, where one of them is stdin.
# RUN: not llvm-strip --preserve-dates - < %t.foo 2>&1 | FileCheck %s
# RUN: not llvm-strip --preserve-dates %t.foo - < %t.foo 2>&1 | FileCheck %s
# RUN: not llvm-strip --preserve-dates - %t.foo < %t.foo 2>&1 | FileCheck %s
# RUN: not llvm-strip --preserve-dates %t.foo - %t.foo < %t.foo 2>&1 | FileCheck %s
## Testing -o.
# RUN: not llvm-strip --preserve-dates - -o %t.foo < %t.foo 2>&1 | FileCheck %s
# RUN: not llvm-strip --preserve-dates %t.foo -o - < %t.foo 2>&1 | FileCheck %s
# CHECK: error: --preserve-dates requires a file