[PATCH] D90245: [AMDGPU] Refactor and extend elf-header-flags-mach tests

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 10:23:25 PDT 2020


scott.linder added inline comments.


================
Comment at: llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml:1
-# RUN: yaml2obj --docnum=1 %s -o %t.o.1
-# RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-ALL,ELF-R600 %s
-# RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-R600 %s
+# RUN: sed -e 's/<BITS>/32/' -e 's/<MACH>/R600_R600/' %s | yaml2obj -o %t.o.1
+# RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-R600-ALL,ELF-R600-R600 %s
----------------
arsenm wrote:
> Is using sed actually portable?
I wasn't certain, but it seems to be a de-facto requirement to run `check-all`:

```
$ grep -r 'RUN:.* sed' llvm/test | wc -l
152
```

I made sure not to use any flags not already used in existing tests (i.e. I only use `-e`)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90245/new/

https://reviews.llvm.org/D90245



More information about the llvm-commits mailing list