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

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 06:11:37 PDT 2021


kzhuravl added a comment.

In D101304#2733289 <https://reviews.llvm.org/D101304#2733289>, @Conanap wrote:

> Hello,
>
> The `reland` version of this patch for which I cannot find the differential of has broken `LLVM::note-amd-valid-v2.test` on PowerPC:
>
>   /home/buildbots/ppc64be-clang-test/clang-ppc64be/llvm/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v2.test:17:14: error: LLVM-NEXT: expected string not found in input
>   # LLVM-NEXT: AMD HSA Code Object Version: [Major: 2, Minor: 1]
>                ^
>   <stdin>:15:68: note: scanning from here
>    Type: NT_AMD_HSA_CODE_OBJECT_VERSION (AMD HSA Code Object Version)
>                                                                      ^
>   <stdin>:16:2: note: possible intended match here
>    AMD HSA Code Object Version: [Major: 33554432, Minor: 16777216]
>    ^
>   Input file: <stdin>
>   Check file: /home/buildbots/ppc64be-clang-test/clang-ppc64be/llvm/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v2.test
>   -dump-input=help explains the following input dump.
>   Input was:
>   <<<<<<
>              .
>              .
>              .
>             10:  Offset: 0x40 
>             11:  Size: 0x18 
>             12:  Note { 
>             13:  Owner: AMD 
>             14:  Data size: 0x8 
>             15:  Type: NT_AMD_HSA_CODE_OBJECT_VERSION (AMD HSA Code Object Version) 
>   next:17'0                                                                        X error: no match found
>             16:  AMD HSA Code Object Version: [Major: 33554432, Minor: 16777216] 
>   next:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   next:17'1      ?                                                                possible intended match
>
> Seems like a small fix but if you could have a push for it soon that'd be great. Thanks! FYI @rksharma

Hi,

Reland patch fixed an issue if AMDGPU backend was not built, which was a one liner (I reverted original patch to not create the noise).

Seems like it is an endianness issue.

Unfortunately I don't have PowerPC, will adding these lines in note-amd-valid-v2.test mark it as XFAIL for you:

  diff --git a/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v2.test b/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v2.test
  index 688bbd50994c..f9cac212ce9f 100644
  --- a/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v2.test
  +++ b/llvm/test/tools/llvm-readobj/ELF/note-amd-valid-v2.test
  @@ -1,6 +1,9 @@
   ## This test is checking the handling of valid note entries for AMDGPU code
   ## object v2.
  
  +## Big endian not supported.
  +# XFAIL: host-byteorder-big-endian
  +
   # RUN: yaml2obj %s -o %t.o
   # RUN: llvm-readobj --notes %t.o | FileCheck %s --match-full-lines --check-prefix=LLVM
   # RUN: llvm-readelf --notes %t.o | FileCheck %s --match-full-lines --check-prefix=GNU

?


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