xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/output.s (revision 05216544a34eaf7aabf45df5f64d1c6c3e4e06c6)
1*05216544STom Stellard# REQUIRES: non-root-user
2e60f1473Sgbreynoo# RUN: rm -f %t1.txt %t2.txt %t3.txt
3e60f1473Sgbreynoo# RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o %t.o
4e60f1473Sgbreynoo
5e60f1473Sgbreynoo# RUN: llvm-dwarfdump -o=- %t.o | FileCheck %s
6e60f1473Sgbreynoo
7e60f1473Sgbreynoo# RUN: llvm-dwarfdump -o=%t1.txt %t.o
8e60f1473Sgbreynoo# RUN: FileCheck %s --input-file %t1.txt
9e60f1473Sgbreynoo
10e60f1473Sgbreynoo# RUN: touch %t2.txt
11e60f1473Sgbreynoo# RUN: llvm-dwarfdump -o=%t2.txt %t.o
12e60f1473Sgbreynoo# RUN: FileCheck %s --input-file %t2.txt
13e60f1473Sgbreynoo
14e60f1473Sgbreynoo# RUN: touch %t3.txt
15e60f1473Sgbreynoo# RUN: chmod 444 %t3.txt
167e176ff2SAbhina Sreeskantharajan# RUN: not llvm-dwarfdump -o=%t3.txt %t.o 2>&1 | FileCheck %s  --check-prefix=ERROR1 -DFILE=%t3.txt -DMSG=%errc_EACCES
17e60f1473Sgbreynoo
187e176ff2SAbhina Sreeskantharajan# RUN: not llvm-dwarfdump -o= %t.o 2>&1 | FileCheck %s  --check-prefix=ERROR2 -DMSG=%errc_ENOENT
19e60f1473Sgbreynoo
20e60f1473Sgbreynoo# CHECK: DW_TAG_compile_unit
217e176ff2SAbhina Sreeskantharajan# ERROR1: unable to open output file [[FILE]]: [[MSG]]
227e176ff2SAbhina Sreeskantharajan# ERROR2: unable to open output file : [[MSG]]
23