Revert "[llvm-exegesis] Fix preservation of RDI in subprocess mode (#72458)"
[llvm-project.git] / mlir / test / IR / invalid-file-metadata.mlir
blob553bd43c6aeeb02b8ad6de6f7f2a1fa949b0dde0
1 // RUN: mlir-opt %s -split-input-file -verify-diagnostics
3 // expected-error@+2 {{expected identifier key in file metadata dictionary}}
4 {-#
6 // -----
8 // expected-error@+2 {{expected ':'}}
9 {-#
10   key
11 #-}
13 // -----
15 // expected-error@+2 {{unknown key 'some_key' in file metadata dictionary}}
16 {-#
17   some_key: {}
18 #-}
20 // -----
22 //===----------------------------------------------------------------------===//
23 // `dialect_resources`
24 //===----------------------------------------------------------------------===//
26 // expected-error@+2 {{expected '{'}}
27 {-#
28   dialect_resources: "value"
29 #-}
31 // -----
33 // expected-error@+3 {{expected identifier key for 'resource' entry}}
34 {-#
35   dialect_resources: {
36     10
37   }
38 #-}
40 // -----
42 // expected-error@+3 {{expected ':'}}
43 {-#
44   dialect_resources: {
45     entry "value"
46   }
47 #-}
49 // -----
51 // expected-error@+3 {{dialect 'foobar' is unknown}}
52 {-#
53   dialect_resources: {
54     foobar: {
55       entry: "foo"
56     }
57   }
58 #-}
60 // -----
62 // expected-error@+4 {{unknown 'resource' key 'unknown_entry' for dialect 'ml_program'}}
63 {-#
64   dialect_resources: {
65     ml_program: {
66       unknown_entry: "foo"
67     }
68   }
69 #-}
71 // -----
73 // expected-error@+4 {{expected hex string blob for key 'invalid_blob'}}
74 {-#
75   dialect_resources: {
76     test: {
77       invalid_blob: 10
78     }
79   }
80 #-}
82 // -----
84 // expected-error@+4 {{expected hex string blob for key 'invalid_blob'}}
85 {-#
86   dialect_resources: {
87     test: {
88       invalid_blob: ""
89     }
90   }
91 #-}
93 // -----
95 // expected-error@+4 {{expected hex string blob for key 'invalid_blob' to encode alignment in first 4 bytes}}
96 {-#
97   dialect_resources: {
98     test: {
99       invalid_blob: "0x"
100     }
101   }
104 // -----
106 //===----------------------------------------------------------------------===//
107 // `external_resources`
108 //===----------------------------------------------------------------------===//
110 // expected-error@+2 {{expected '{'}}
112   external_resources: "value"
115 // -----
117 // expected-error@+3 {{expected identifier key for 'resource' entry}}
119   external_resources: {
120     10
121   }
124 // -----
126 // expected-error@+3 {{expected ':'}}
128   external_resources: {
129     entry "value"
130   }