You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/runtime/docs/design/datacontracts/data_descriptor.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ endianness. The types `nint`, `nuint` and `pointer` have target architecture po
31
31
The data descriptor consists of:
32
32
* a collection of type structure descriptors
33
33
* a collection of global value descriptors
34
+
* an optional collection of pointers to sub-descriptors
34
35
35
36
## Types
36
37
@@ -92,6 +93,15 @@ The value must be an integral constant within the range of its type. Signed val
92
93
natural encoding. Pointer values need not be aligned and need not point to addressable target
93
94
memory.
94
95
96
+
## Sub-descriptor descriptors
97
+
98
+
Each sub-descriptor descriptor is effectively a global with a type of `pointer`. They will consist of:
99
+
* a name
100
+
* a pointer value
101
+
102
+
If the value is non-null, the pointer points to another [contract descriptor](contract-descriptor.md#contract-descriptor-1).
103
+
104
+
When parsing a data descriptor with sub-descriptors each sub-descriptor should be parsed then its type, global, and contract values should be merged in. If any conflicts arise when merging in sub-descriptor data, this is an error and behavior is undefined.
95
105
96
106
## Physical descriptors
97
107
@@ -129,6 +139,7 @@ The toplevel dictionary will contain:
129
139
* optional `"baseline": "BASELINE_ID"` see below
130
140
*`"types": TYPES_DESCRIPTOR` see below
131
141
*`"globals": GLOBALS_DESCRIPTOR` see below
142
+
* optional `"sub-descriptors": SUB_DESCRIPTORS_DESCRIPTOR` see below
132
143
133
144
Additional toplevel keys may be present. For example, the in-memory data descriptor will contain a
134
145
`"contracts"` key (see [contract descriptor](./contract_descriptor.md#Compatible_contracts)) for the
@@ -233,7 +244,9 @@ Note that a two element array is unambiguously "type and value", whereas a one-e
233
244
unambiguously "indirect value".
234
245
235
246
236
-
**Both formats**
247
+
### Sub-descriptor Values
248
+
249
+
Sub-descriptor values will be an additional array, with the same specification as [global values](#Global-values) with the exception that the only valid value type is a `pointer`.
237
250
238
251
#### Specification Appendix
239
252
@@ -284,7 +297,7 @@ string. For pointers, the address can be stored at a known offset in an in-proc
284
297
array of pointers and the offset written into the constant JSON string.
285
298
286
299
The indirection array is not part of the data descriptor spec. It is part of the [contract
Copy file name to clipboardExpand all lines: src/runtime/docs/design/datacontracts/datacontracts_design.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ More details are provided in the [data descriptor spec](./data_descriptor.md).
26
26
27
27
#### Global Values
28
28
29
-
Global values which can be either primitive integer constantsor pointers.
29
+
Global values which can be either primitive integer constants, pointers, or strings.
30
30
All global values have a string describing their name, a type, and a value of one of the above types.
31
31
32
32
#### Data Structure Layout
@@ -41,6 +41,10 @@ The determinate size of a structure may be larger than the sum of the sizes of t
41
41
in the data descriptor (that is, the data descriptor does not include every field and may not
42
42
include padding bytes).
43
43
44
+
#### (Optional) Sub-descriptor pointers
45
+
46
+
Sub-descriptors are special global values which contain a pointer to another data descriptor. These are used when data definitions are not known by the runtime at compile time but may be known by an external component. In that case the data descriptor defers to the external component to describe its data.
47
+
44
48
### Compatible Contract
45
49
46
50
Each compatible contract is described by a string naming the contract, and a uint32 version. It is an ERROR if multiple versions of a contract are specified in the contract descriptor.
Copy file name to clipboardExpand all lines: src/runtime/docs/workflow/testing/coreclr/testing.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,8 +145,12 @@ Some tests need to be run in their own process as they interact with global proc
145
145
146
146
Sometimes you may want to run a test with the least amount of code before actually executing the test. In addition to the merged test runner, we have another runner mode known as the "Standalone" runner. This runner is used by default in tests that require process isolation. This runner consists of a simple `try-catch` around executing each test sequentially, with no test results file or runtime test filtering.
147
147
148
+
If you have a merged test runner that you want to run in the standalone mode, you can pass `-p:BuildAsStandalone=true` when building the merged test runner. This will build a project that runs all tests sequentially with no filtering or result file support.
149
+
148
150
To filter tests on a merged test runner built as standalone, you can set the `TestFilter` property, like so: `./dotnet.sh build -c Checked src/tests/path/to/test.csproj -p:TestFilter=SubstringOfFullyQualifiedTestName`. This mechanism supports the same filtering as the runtime test filtering. Using this mechanism will allow you to skip individual test cases at build time instead of at runtime.
149
151
152
+
The `TestFilter` property can also be used on a runner assembly in the merged runner mode.
153
+
150
154
#### Building all tests with the Standalone Runner
151
155
152
156
If you wish to use the Standalone runner described in the [previous section](#the-standalone-test-runner-and-build-time-test-filtering), you can set the `BuildAllTestsAsStandalone` environment variable to `true` when invoking the `./src/tests/build.sh` or `./src/tests/build.cmd` scripts (for example, `export BuildAllTestsAsStandalone=true` or `set BuildAllTestsAsStandalone=true`). This will build all tests that are not directly in a merged test runner's project as separate executable tests and build only the tests that are compiled into the runner directly. If a runner has no tests that are built directly into the runner, then it will be excluded.
0 commit comments