[test] Replace yaml2obj > with yaml2obj -o and remove unneeded input redirection

This commit is contained in:
Fangrui Song
2020-08-20 15:00:25 -07:00
parent dc693a036d
commit b587ca93be
228 changed files with 294 additions and 294 deletions

View File

@@ -1,7 +1,7 @@
# Test behavior on unusual (and probably corrupt) files. Test that we drop an
# empty PT_LOAD segment.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
#
# CHECK-NOT: container

View File

@@ -1,7 +1,7 @@
# Test that an overlapping PT_INTERP segment does not cause us to drop the
# subsequent PT_LOAD segment.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Index: 0

View File

@@ -1,6 +1,6 @@
# Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# RUN: %lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s

View File

@@ -1,7 +1,7 @@
# Test behavior on unusual (and probably corrupt) object files. Check that we
# drop the second PT_LOAD segment which overlaps with the first one.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Type: container

View File

@@ -1,6 +1,6 @@
# Test that sections are made child-sections of the PT_LOAD segments/sections.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Index: 0

View File

@@ -1,6 +1,6 @@
# Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# RUN: %lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file -contents %t | FileCheck %s
# CHECK: Name: .debug_info

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Plugin name: elf
# CHECK: Architecture: avr--

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Base VM address: 0x400000

View File

@@ -1,6 +1,6 @@
# REQUIRES: lld
# RUN: yaml2obj %s > %t.o
# RUN: yaml2obj %s -o %t.o
# RUN: ld.lld %t.o -o %t -image-base 0x47000
# RUN: lldb-test object-file %t | FileCheck %s

View File

@@ -1,5 +1,5 @@
# RUN: mkdir -p %t/.build-id/1b
# RUN: yaml2obj %s > %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
# RUN: yaml2obj %s -o %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
# RUN: cd %t
# RUN: llvm-objcopy --strip-all %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/stripped.out
# RUN: lldb-test object-file %t/stripped.out | FileCheck %s

View File

@@ -1,5 +1,5 @@
# REQUIRES: zlib
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file --contents %t | FileCheck %s
--- !ELF
FileHeader:

View File

@@ -1,5 +1,5 @@
# RUN: mkdir -p %t/.build-id/1b
# RUN: yaml2obj %s > %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
# RUN: yaml2obj %s -o %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
# RUN: cd %t
# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/stripped.out
# RUN: lldb-test object-file %t/stripped.out | FileCheck %s

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=%t %t %t.stripped
# RUN: lldb-test object-file %t.stripped | FileCheck %s

View File

@@ -3,7 +3,7 @@
# This test checks that an error occurs when a corrupted
# .gnu_debugdata section is trying to be xz uncompressed.
# RUN: yaml2obj %s > %t.obj
# RUN: yaml2obj %s -o %t.obj
# RUN: %lldb -b -o 'image dump symtab' %t.obj 2>&1 | FileCheck %s

View File

@@ -1,6 +1,6 @@
# REQUIRES: lzma
# RUN: yaml2obj %s > %t.obj
# RUN: yaml2obj %s -o %t.obj
# RUN: %lldb -b -o 'image dump symtab' %t.obj | FileCheck %s

View File

@@ -3,7 +3,7 @@
# This test checks that a warning is printed when we're trying
# to decompress a .gnu_debugdata section when no LZMA support was compiled in.
# RUN: yaml2obj %s > %t.obj
# RUN: yaml2obj %s -o %t.obj
# RUN: %lldb -b -o 'image dump symtab' %t.obj 2>&1 | FileCheck %s

View File

@@ -1,6 +1,6 @@
# Test whether NetBSD executables are recognized correctly.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Architecture: x86_64--netbsd8.99.30
# CHECK: Type: executable

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK-LABEL: Name: .one

View File

@@ -4,7 +4,7 @@
# Right now the overlapping sections get dropped, but other behaviors
# (including outright rejecting such files) are possible too.
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK-NOT: .overlap1

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK-LABEL: Name: .r-x

View File

@@ -2,7 +2,7 @@
# here to document the existing behavior and to make sure we don't do something
# completely crazy (like crashing).
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# The section is called .data, but it has the SHF_EXECINSTR flag set. Have

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK-LABEL: Name: .text

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s >%t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: UUID: 333059A4-3CC3-D5F9

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t.out
# RUN: yaml2obj %s -o %t.out
# RUN: lldb-test symbols %t.out | FileCheck %s
# Test that the deployment target is parsed from the load commands.
# CHECK: x86_64-apple-macosx10.14.0

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t.out
# RUN: yaml2obj %s -o %t.out
# RUN: lldb-test symbols %t.out | FileCheck %s
# Test that the deployment target is parsed from the load commands.
# CHECK: x86_64-apple-macosx10.14.0

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t.out
# RUN: yaml2obj %s -o %t.out
# RUN: lldb-test object-file %t.out | FileCheck %s
# Test that the deployment target is parsed from the load commands.

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
#CHECK: Showing 2 sections

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Plugin name: pe-coff

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Plugin name: pe-coff

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Plugin name: pe-coff

View File

@@ -1,6 +1,6 @@
# REQUIRES: lld
# RUN: yaml2obj < %p/export-dllfunc.yaml > %t.export-dllfunc.obj
# RUN: yaml2obj < %s > %t.obj
# RUN: yaml2obj %p/export-dllfunc.yaml -o %t.export-dllfunc.obj
# RUN: yaml2obj %s -o %t.obj
#
# RUN: lld-link /machine:x64 /out:%t.export-dllfunc.dll /noentry /nodefaultlib /dll %t.export-dllfunc.obj /export:DllFunc
# RUN: lld-link /out:%t.exe %t.obj %t.export-dllfunc.lib /nodefaultlib /entry:main /include:DllFunc

View File

@@ -1,6 +1,6 @@
# REQUIRES: arm
# RUN: yaml2obj %s > %t.exe
# RUN: yaml2obj %s -o %t.exe
# RUN: %lldb %t.exe -o "disassemble -b -n entry" -b | FileCheck %s
# CHECK: {{.*}}.exe[0x401000] <+0>: 0x0040 lsls r0, r0, #0x1

View File

@@ -1,5 +1,5 @@
# REQUIRES: lld
# RUN: yaml2obj < %s > %t.obj
# RUN: yaml2obj %s -o %t.obj
#
# RUN: lld-link /machine:x64 /out:%t.dll /noentry /nodefaultlib /debug /dll %t.obj /export:DllFunc
#

View File

@@ -1,7 +1,7 @@
## Test that errors in loading an exe doesn't crash lldb.
## The ExportTable RelativeVirtualAddress is out of bounds here.
# RUN: yaml2obj %s > %t.exe
# RUN: yaml2obj %s -o %t.exe
# RUN: %lldb %t.exe 2>&1 | FileCheck %s
# CHECK: error: '{{.*}}' doesn't contain any {{.*}} platform architectures

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK-LABEL: Name: .text

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Name: .text{{$}}

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test symbols %t | FileCheck %s
## The .file symbol isn't checked, but is included to test that the symbol

View File

@@ -1,5 +1,5 @@
# REQUIRES: lld
# RUN: yaml2obj %s > %t.obj
# RUN: yaml2obj %s -o %t.obj
# RUN: lldb-test object-file %t.obj | FileCheck %s
# CHECK-DAG: UUID: 14B292E0-D81A-B4F1-4C4C-44205044422E-00000001

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Plugin name: wasm

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Plugin name: wasm

View File

@@ -1,4 +1,4 @@
# RUN: yaml2obj %s > %t
# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s
# CHECK: Plugin name: wasm

View File

@@ -1,8 +1,8 @@
# RUN: rm -rf %t
# RUN: mkdir %t
# RUN: cd %t
# RUN: yaml2obj --docnum=1 %s > test.wasm
# RUN: yaml2obj --docnum=2 %s > test_sym.wasm
# RUN: yaml2obj --docnum=1 %s -o test.wasm
# RUN: yaml2obj --docnum=2 %s -o test_sym.wasm
# RUN: lldb-test object-file test.wasm | FileCheck %s
# This test checks that SymbolVendorWasm correctly loads DWARF debug sections