CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
66 lines
2.9 KiB
Plaintext
66 lines
2.9 KiB
Plaintext
## Test case where input file does not exit.
|
|
RUN: not llvm-readobj %t.blah 2>&1 | FileCheck --check-prefix=ENOENT -DTOOL=readobj -DMSG=%errc_ENOENT %s
|
|
RUN: not llvm-readelf %t.blah 2>&1 | FileCheck --check-prefix=ENOENT -DTOOL=readelf -DMSG=%errc_ENOENT %s
|
|
|
|
ENOENT: llvm-[[TOOL]]{{(\.exe)?}}: error: '{{.*}}.blah': [[MSG]]
|
|
|
|
# Test case with no input file.
|
|
RUN: not llvm-readobj 2>&1 | FileCheck %s --check-prefix=NO-FILE
|
|
RUN: not llvm-readelf 2>&1 | FileCheck %s --check-prefix=NO-FILE
|
|
NO-FILE: error: no input files specified
|
|
|
|
# Test case where input file is too small to be a recognised object file.
|
|
RUN: touch %t.empty
|
|
RUN: not llvm-readobj %t.empty 2>&1 | FileCheck --check-prefix=EMPTY %s
|
|
EMPTY: '{{.*}}.empty': The file was not recognized as a valid object file
|
|
|
|
# Test that unrecognised files in archives are ignored.
|
|
RUN: rm -f %t.a
|
|
RUN: llvm-ar rc %t.a %t.empty
|
|
RUN: llvm-readobj --all %t.a 2>&1 | FileCheck --check-prefix=NO-OUTPUT --allow-empty %s
|
|
NO-OUTPUT-NOT: {{.}}
|
|
|
|
## Test we report a meaningful warning for bitcode files.
|
|
## Check we try to continue dumping other files.
|
|
|
|
## Note: 'echo -e -n "\x42\x43\xc0\xde" > %t.bc.1' simply doesn't work properly on windows.
|
|
## It has an issue with writing of the 2 last bytes and emits different data instead.
|
|
## echo.exe from GnuWin32 works properly though, but using of python is a more stable way.
|
|
RUN: %python -c "import os; open(r'%t.bc.1', 'wb').write(b'\x42\x43\xC0\xDE')"
|
|
RUN: %python -c "import os; open(r'%t.bc.2', 'wb').write(b'\xDE\xC0\x17\x0B')"
|
|
RUN: llvm-readelf %t.bc.1 %t.bc.2 2>&1 | \
|
|
RUN: FileCheck --check-prefix=BITCODE -DFILE1=%t.bc.1 -DFILE2=%t.bc.2 %s
|
|
RUN: llvm-readobj %t.bc.1 %t.bc.2 2>&1 | \
|
|
RUN: FileCheck --check-prefix=BITCODE -DFILE1=%t.bc.1 -DFILE2=%t.bc.2 %s
|
|
|
|
# BITCODE: warning: '[[FILE1]]': bitcode files are not supported{{$}}
|
|
# BITCODE: warning: '[[FILE2]]': bitcode files are not supported{{$}}
|
|
|
|
# Test case where switch it not recognised.
|
|
RUN: not llvm-readobj --unknown-switch 2>&1 | FileCheck --check-prefix=UNKNOWN %s
|
|
UNKNOWN: error: unknown argument '--unknown-switch'
|
|
|
|
# Test version switch.
|
|
RUN: llvm-readobj --version | FileCheck %s --check-prefix=VERSION
|
|
RUN: llvm-readelf --version | FileCheck %s --check-prefix=VERSION
|
|
# In default configuration we could match "LLVM version", but the "LLVM" part
|
|
# can be changed with PACKAGE_NAME in CMake, so we match only version.
|
|
VERSION: version
|
|
|
|
# Test help switch.
|
|
RUN: llvm-readobj --help | FileCheck %s --check-prefixes=HELP,OBJ
|
|
RUN: llvm-readelf --help | FileCheck %s --check-prefixes=HELP,ELF
|
|
HELP: OVERVIEW: LLVM Object Reader
|
|
OBJ: llvm-readobj{{.*}} [options] <input object files>
|
|
ELF: llvm-readelf{{.*}} [options] <input object files>
|
|
HELP: OPTIONS:
|
|
HELP: -s Alias for --symbols
|
|
HELP: -t Alias for --section-details
|
|
HELP: OPTIONS (ELF specific):
|
|
HELP: --dynamic-table
|
|
HELP: OPTIONS (Mach-O specific):
|
|
HELP: --macho-data-in-code
|
|
HELP: OPTIONS (PE/COFF specific):
|
|
HELP: --codeview-ghash
|
|
HELP: @FILE
|