Commit 25a0b94
authored
Remove
* Make test_drop able to run concurrently
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
* Rename create_1000_sandboxes to create_200_sandboxes and make concurrent-safe
Reduces thread count (20->10) and sandboxes per thread (50->20) so the test can run alongside other tests without exhausting system resources. Removes #[ignore] and the corresponding test-isolated entry in the Justfile.
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
* Allow execute_on_heap to execute concurrently
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
* Make test_trace_trace concurrent-safe
Use Interest::sometimes() in TracingSubscriber to prevent the global interest cache from permanently caching Interest::never() when another thread's no-op subscriber registers callsites first. Add a warmup call + rebuild_interest_cache() to ensure callsites are properly registered before the real test run.
Also removes the now-unused build_metadata_testing module and TestLogger dependency.
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
* Remove GUEST env var and refactor test helpers
Replace the GUEST environment variable approach with explicit helper functions (with_rust_sandbox, with_c_sandbox, with_all_sandboxes, etc.) that make test intent clearer and remove runtime environment coupling.
Each test now explicitly declares which guest(s) it needs. Tests that work with both guests use with_all_sandboxes to run against both Rust and C guests in a single test invocation, removing the need for separate test-integration runs per guest language.
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
* Move max_memory_sandbox test to layout module
Move the test from integration tests into the layout module where it belongs, and rewrite it to test SandboxMemoryLayout::get_memory_size directly instead of going through UninitializedSandbox::new.
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
* Add error context to assert!(matches!()) and remove debug println in tests
Adds descriptive error messages to pattern-matching assertions so test failures show the actual value. Removes println!("{:?}", res) calls that were only useful for manual debugging.
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
---------
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>#[ignore] tests and GUEST env var, improve test ergonomics (#1196)1 parent f110930 commit 25a0b94
11 files changed
Lines changed: 884 additions & 902 deletions
File tree
- src
- hyperlight_host
- src
- mem
- sandbox
- testing
- tests
- common
- hyperlight_testing/src
- tests/rust_guests/simpleguest/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | 216 | | |
218 | | - | |
219 | 217 | | |
220 | | - | |
221 | 218 | | |
222 | 219 | | |
223 | 220 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
229 | 226 | | |
230 | 227 | | |
231 | | - | |
| 228 | + | |
232 | 229 | | |
233 | 230 | | |
234 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
665 | 674 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1333 | 1333 | | |
1334 | 1334 | | |
1335 | 1335 | | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
| 1336 | + | |
| 1337 | + | |
1348 | 1338 | | |
1349 | | - | |
1350 | | - | |
| 1339 | + | |
1351 | 1340 | | |
1352 | | - | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
1353 | 1353 | | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | | - | |
| 1356 | + | |
1357 | 1357 | | |
1358 | 1358 | | |
1359 | | - | |
1360 | 1359 | | |
1361 | | - | |
1362 | | - | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
1363 | 1373 | | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
1367 | 1378 | | |
1368 | | - | |
1369 | | - | |
| 1379 | + | |
| 1380 | + | |
1370 | 1381 | | |
1371 | 1382 | | |
1372 | 1383 | | |
1373 | 1384 | | |
1374 | | - | |
1375 | | - | |
| 1385 | + | |
1376 | 1386 | | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
1380 | 1391 | | |
1381 | 1392 | | |
1382 | 1393 | | |
| |||
Lines changed: 19 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
1125 | 1125 | | |
1126 | | - | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1127 | 1129 | | |
1128 | | - | |
1129 | | - | |
| 1130 | + | |
| 1131 | + | |
1130 | 1132 | | |
1131 | 1133 | | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
| 1134 | + | |
1142 | 1135 | | |
1143 | | - | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1144 | 1140 | | |
1145 | | - | |
| 1141 | + | |
1146 | 1142 | | |
1147 | | - | |
| 1143 | + | |
| 1144 | + | |
1148 | 1145 | | |
1149 | 1146 | | |
1150 | 1147 | | |
1151 | | - | |
| 1148 | + | |
1152 | 1149 | | |
1153 | 1150 | | |
1154 | | - | |
| 1151 | + | |
1155 | 1152 | | |
1156 | | - | |
| 1153 | + | |
1157 | 1154 | | |
1158 | 1155 | | |
1159 | 1156 | | |
| |||
0 commit comments