diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2015-06-04 18:34:11 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-06-04 18:34:11 +0000 |
commit | 50d0fbd2b95dc931fe1803468628a7e53ad1bbee (patch) | |
tree | a7dc95b93931c0a6f800aefa40edebe351ada64b /llvm/test/tools/llvm-objdump/invalid-input.test | |
parent | 713bfbb2d415a73e0dd3e20ba7b37bf0493368bd (diff) | |
download | bcm5719-llvm-50d0fbd2b95dc931fe1803468628a7e53ad1bbee.tar.gz bcm5719-llvm-50d0fbd2b95dc931fe1803468628a7e53ad1bbee.zip |
llvm-objdump: return non-zero exit code for certain cases of invalid input
* If the input file is missing;
* If the type of input object file can't be recognized;
* If the object file can't be parsed correctly.
llvm-svn: 239065
Diffstat (limited to 'llvm/test/tools/llvm-objdump/invalid-input.test')
-rw-r--r-- | llvm/test/tools/llvm-objdump/invalid-input.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/invalid-input.test b/llvm/test/tools/llvm-objdump/invalid-input.test new file mode 100644 index 00000000000..2233cc2c209 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/invalid-input.test @@ -0,0 +1,5 @@ +RUN: not llvm-objdump -t %p/missing-file 2>&1 | FileCheck %s -check-prefix=NO_SUCH_FILE +NO_SUCH_FILE: '{{.*}}missing-file': No such file or directory + +RUN: not llvm-objdump -t %s 2>&1 | FileCheck %s -check-prefix=UNKNOWN_FILE_TYPE +UNKNOWN_FILE_TYPE: '{{.*}}invalid-input.test': The file was not recognized as a valid object file |