Skip to content

Commit 8acfeef

Browse files
committed
Fixing up tests based on feedback.
../llvm/test/tools/llvm-objcopy/DXContainer/dump-section-errors.yaml ../llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml
1 parent 826d77c commit 8acfeef

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

llvm/test/tools/llvm-objcopy/DXContainer/dump-section-errors.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# RUN: yaml2obj %s -o %t.dxbc
2-
# RUN: not llvm-objcopy --dump-section=FKE0=%t.fek0 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-EMPTY
3-
# RUN: not llvm-objcopy --dump-section=FKE3=%t.fek1 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING
4-
# RUN: not llvm-objcopy --dump-section=FKE2=%t/does_not_exist/.fek2 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-BAD-PATH
2+
# RUN: not llvm-objcopy --dump-section=FKE0=%t.fek0 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-EMPTY -DFILE=%t.fek0
3+
# RUN: not llvm-objcopy --dump-section=FKE3=%t.fek1 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING -DFILE=%t.fek1
4+
# RUN: not llvm-objcopy --dump-section=FKE2=%t/does_not_exist/.fek2 %t.dxbc 2>&1 | FileCheck %s --check-prefix=CHECK-BAD-PATH -DFILE=%t/does_not_exist/.fek2 -DMSG=%errc_ENOENT
5+
6+
# CHECK-EMPTY: error: '[[FILE]]': part 'FKE0' is empty
7+
# CHECK-MISSING: error: '[[FILE]]': part 'FKE3' not found
8+
# CHECK-BAD-PATH: error: '[[FILE]]': [[MSG]]
59

6-
# CHECK-EMPTY: error: {{.*}}: part 'FKE0' is empty
7-
# CHECK-MISSING: error: {{.*}}: part 'FKE3' not found
8-
# CHECK-BAD-PATH: error: {{.*}}: No such file or directory
910
--- !dxcontainer
1011
Header:
1112
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,

llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,28 @@
1111
## Dump the PSV0 part and verify its size.
1212
# RUN: llvm-objcopy --dump-section=PSV0=%t.psv0 %t.dxbc
1313
# RUN: wc -c %t.psv0 | FileCheck %s --check-prefix=PSV0-SIZE
14+
# RUN: od -h %t.psv0 | FileCheck %s --check-prefix=PSV0-CONTENTS
1415
# PSV0-SIZE: 76
16+
17+
# For a compute shader the structure size is encoded followed by a bunch of 00'd
18+
# bytes until you get to the unused wave size min and max (0xffff), followed by
19+
# the shader stage (5 for compute).
20+
# TODO: Update this test to use objdump or obj2yaml once we support
21+
# --add-section in objcopy. See issue:
22+
# https://github.com/llvm/llvm-project/issues/162159.
23+
# PSV0-CONTENTS: 0000000 0034 0000 0000 0000 0000 0000 0000 0000
24+
# PSV0-CONTENTS: 0000020 0000 0000 0000 0000 ffff ffff 0005 0000
25+
1526
--- !dxcontainer
1627
Header:
1728
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1829
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
1930
Version:
2031
Major: 1
2132
Minor: 0
22-
FileSize: 1956
23-
PartCount: 6
24-
PartOffsets: [ 56, 1796, 1812, 1840, 1856, 1872 ]
33+
FileSize: 1872
34+
PartCount: 2
35+
PartOffsets: [ 40, 1780 ]
2536
Parts:
2637
- Name: DXIL
2738
Size: 1732
@@ -240,22 +251,6 @@ Parts:
240251
0x3, 0x1, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x50,
241252
0x10, 0xCD, 0x14, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0,
242253
0x0, 0x0, 0x0, 0x0, 0x0 ]
243-
- Name: SFI0
244-
Size: 8
245-
- Name: HASH
246-
Size: 20
247-
Hash:
248-
IncludesSource: false
249-
Digest: [ 0x2, 0xB5, 0x24, 0x1, 0x50, 0x48, 0xC3, 0x12,
250-
0x39, 0x28, 0xAE, 0x46, 0x68, 0x14, 0x84, 0xDA ]
251-
- Name: ISG1
252-
Size: 8
253-
Signature:
254-
Parameters: []
255-
- Name: OSG1
256-
Size: 8
257-
Signature:
258-
Parameters: []
259254
- Name: PSV0
260255
Size: 76
261256
PSVInfo:

0 commit comments

Comments
 (0)