[PATCH] D101304: AMDGPU/llvm-readobj: Add missing tests for note parsing/displaying

Stella Stamenova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 30 09:56:02 PDT 2021


stella.stamenova added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v3.s:4
+
+# RUN: llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj < %s | llvm-readobj --notes - | FileCheck %s --match-full-lines --check-prefix=LLVM
+# RUN: llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj < %s | llvm-readelf --notes - | FileCheck %s --match-full-lines --check-prefix=GNU
----------------
This test assumes that the triple is available, but that's not always the case which results in failures such as:

```
FAIL: LLVM :: tools/llvm-readobj/ELF/note-amd-valid-v3.s (66018 of 76097)
******************** TEST 'LLVM :: tools/llvm-readobj/ELF/note-amd-valid-v3.s' FAILED ********************
Script:
--
: 'RUN: at line 4';   /mnt/vss/_work/1/b/llvm/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj < /mnt/vss/_work/1/s/llvm-project/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v3.s | /mnt/vss/_work/1/b/llvm/bin/llvm-readobj --notes - | /mnt/vss/_work/1/b/llvm/bin/FileCheck /mnt/vss/_work/1/s/llvm-project/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v3.s --match-full-lines --check-prefix=LLVM
: 'RUN: at line 5';   /mnt/vss/_work/1/b/llvm/bin/llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj < /mnt/vss/_work/1/s/llvm-project/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v3.s | /mnt/vss/_work/1/b/llvm/bin/llvm-readelf --notes - | /mnt/vss/_work/1/b/llvm/bin/FileCheck /mnt/vss/_work/1/s/llvm-project/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v3.s --match-full-lines --check-prefix=GNU
--
Exit Code: 2

Command Output (stderr):
--
/mnt/vss/_work/1/b/llvm/bin/llvm-mc: error: : error: unable to get target for 'amdgcn-amd-amdhsa', see --version and --triple.
/mnt/vss/_work/1/b/llvm/bin/llvm-readobj: error: '<stdin>': The file was not recognized as a valid object file
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /mnt/vss/_work/1/b/llvm/bin/FileCheck /mnt/vss/_work/1/s/llvm-project/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v3.s --match-full-lines --check-prefix=LLVM
```

You either need to use REQUIRES: to specify what is needed or you need to move it to one of the directories that already do (such as AMDGPU).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101304



More information about the llvm-commits mailing list