[llvm] r367862 - [yaml2obj][tests] Fix overly restrictive od output check

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 06:55:41 PDT 2019


Author: hubert.reinterpretcast
Date: Mon Aug  5 06:55:41 2019
New Revision: 367862

URL: http://llvm.org/viewvc/llvm-project?rev=367862&view=rev
Log:
[yaml2obj][tests] Fix overly restrictive od output check

Summary:
rL364517 introduced further instances of `od` output checking of the
kind previously corrected by rL363829. This patch corrects the issue by
suppressing output of the input offset. The check remains sufficiently
sensitive to test for the intended value of the specific byte since the
relevant byte value is the only output we are expecting from `od`.

Reviewers: grimar, xingxue, daltenty, jasonliu, jhenderson, MaskRay

Reviewed By: grimar, MaskRay

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65680

Modified:
    llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml

Modified: llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml?rev=367862&r1=367861&r2=367862&view=diff
==============================================================================
--- llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml (original)
+++ llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml Mon Aug  5 06:55:41 2019
@@ -44,10 +44,10 @@ FileHeader:
 ## is unable to dump such headers.
 
 # RUN: yaml2obj --docnum=3 %s -o %t3
-# RUN: od -t x1 -v -j 0x3a -N 1 %t3 | FileCheck %s --check-prefix=NEWSIZE
-# RUN: od -t x1 -v -j 0x3a -N 1 %t2 | FileCheck %s --check-prefix=OLDSIZE
-# NEWSIZE: 0000072 01
-# OLDSIZE: 0000072 40
+# RUN: od -A n -t x1 -v -j 0x3a -N 1 %t3 | FileCheck %s --check-prefix=NEWSIZE
+# RUN: od -A n -t x1 -v -j 0x3a -N 1 %t2 | FileCheck %s --check-prefix=OLDSIZE
+# NEWSIZE: 01
+# OLDSIZE: 40
 
 --- !ELF
 FileHeader:




More information about the llvm-commits mailing list