[PATCH] D115889: [dSYM][NFC] Add error test case for llvm-dwarfdump

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 16 10:24:12 PST 2021


ellis created this revision.
Herald added a reviewer: jhenderson.
Herald added a subscriber: cmtice.
ellis requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

Add a test to `llvm-dwarfdump` to simply test that the error messages
make sense when passing bad `.dSYM`s.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115889

Files:
  llvm/test/tools/llvm-dwarfdump/errors.test


Index: llvm/test/tools/llvm-dwarfdump/errors.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-dwarfdump/errors.test
@@ -0,0 +1,10 @@
+RUN: mkdir -p %t/empty.dSYM/Contents/Resources/DWARF
+RUN: mkdir -p %t/malformed.dSYM/Contents/blah
+
+RUN: not llvm-dwarfdump %t/empty.dSYM 2>&1 | FileCheck %s --check-prefix ERR1
+RUN: not llvm-dwarfdump %t/malformed.dSYM 2>&1 | FileCheck %s --check-prefix ERR2
+
+
+ERR1: error: {{.*}}.dSYM: no objects found in dSYM bundle
+
+ERR2: error: {{.*}}.dSYM: expected directory 'Contents/Resources/DWARF' in dSYM bundle


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115889.394919.patch
Type: text/x-patch
Size: 614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211216/924b4b19/attachment.bin>


More information about the llvm-commits mailing list