[yaml2obj][tests] Replace 8-byte `od` conversion with 1-byte conversion
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Sat, 3 Aug 2019 18:52:45 +0000 (18:52 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Sat, 3 Aug 2019 18:52:45 +0000 (18:52 +0000)
Summary:
`od` on AIX does not seem to implement 8-byte integer conversions. Work
around this by using 1-byte conversions, which can be used in this case
since the value is byte-order insensitive.

Reviewers: grimar, daltenty, xingxue, jasonliu, MaskRay

Reviewed By: grimar, MaskRay

Subscribers: MaskRay, llvm-commits

Tags: #llvm

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

llvm-svn: 367760

llvm/test/tools/yaml2obj/elf-override-shoffset.yaml
llvm/test/tools/yaml2obj/elf-override-shsize.yaml

index 3bde177..21a172c 100644 (file)
@@ -73,13 +73,13 @@ Sections:
 
 # RUN: yaml2obj --docnum=2 %s -o %t2
 # RUN: yaml2obj --docnum=3 %s -o %t3
-# RUN: od -t x8 -v %t2 > %t.txt
-# RUN: od -t x8 -v %t3 >> %t.txt
+# RUN: od -t x1 -v %t2 > %t.txt
+# RUN: od -t x1 -v %t3 >> %t.txt
 # RUN: FileCheck %s --input-file=%t.txt --check-prefix=CASE2
 
-# CASE2: [[OFFSET:.*]] fefefefefefefefe
+# CASE2: [[OFFSET:.*]] fe fe fe fe fe fe fe fe
 # CASE2: [[FILESIZE:.*]]{{$}}
-# CASE2: [[OFFSET]] fefefefefefefefe
+# CASE2: [[OFFSET]] fe fe fe fe fe fe fe fe
 # CASE2: [[FILESIZE]]{{$}}
 
 --- !ELF
index e57053b..9873698 100644 (file)
@@ -72,13 +72,13 @@ Sections:
 
 # RUN: yaml2obj --docnum=2 %s -o %t2
 # RUN: yaml2obj --docnum=3 %s -o %t3
-# RUN: od -t x8 -v %t2 > %t.txt
-# RUN: od -t x8 -v %t3 >> %t.txt
+# RUN: od -t x1 -v %t2 > %t.txt
+# RUN: od -t x1 -v %t3 >> %t.txt
 # RUN: FileCheck %s --input-file=%t.txt --check-prefix=CASE2
 
-# CASE2: [[OFFSET:.*]] fefefefefefefefe
+# CASE2: [[OFFSET:.*]] fe fe fe fe fe fe fe fe
 # CASE2: [[FILESIZE:.*]]{{$}}
-# CASE2: [[OFFSET]] fefefefefefefefe
+# CASE2: [[OFFSET]] fe fe fe fe fe fe fe fe
 # CASE2: [[FILESIZE]]{{$}}
 
 --- !ELF