mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-30 07:37:36 +00:00
The node-synthetic group is an allow-list of test modules, and an allow-list goes stale the day the next socket test lands: the new module runs beside the others and the first sign is a dropped handshake on a loaded runner, far from the cause. testing/check-node-test-groups.py recomputes the membership. It flags every function under src/node/tests/ (and in src/testutil.rs) that uses a socket primitive or calls a flagged function, to a fixpoint, so modules that reach a socket only through a helper are caught. Module names come from mod.rs's declarations. It then evaluates both profiles' overrides in order, as nextest does, and fails when a test in a flagged module is not in node-synthetic or a lock_large_network_test() holder is not in node-large. It also checks the nextest pin in the workflows matches the config. It exits 2 rather than pass when it finds no test modules, no flagged module, no lock holder, or a filter it cannot evaluate, so a moved directory or a reformatted filter cannot pass vacuously. Uses that open no socket are exempted one function and primitive at a time, each with its reason, in testing/node-test-groups/exemptions.toml. The fixtures beside it cover each way a test reaches a socket and each check the guard makes; every case names the output it expects, so a case that fails for the wrong reason fails the runner. Both run from local CI's guards and from the ci-parity job.
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
# [test-groups] does not define node-large.
|
|
expect exit 2
|
|
expect [test-groups] has no node-large
|
|
=== .config/nextest.toml
|
|
nextest-version = { required = "0.9.149" }
|
|
|
|
[test-groups]
|
|
node-synthetic = { max-threads = 1 }
|
|
|
|
[[profile.default.overrides]]
|
|
filter = 'package(fips-mesh) & test(/^node::tests::(big::test_big_100_nodes|big::test_big_via_helper|sock_direct::test_sock_100_nodes)$/)'
|
|
test-group = 'node-large'
|
|
|
|
[[profile.default.overrides]]
|
|
filter = 'package(fips-mesh) & test(/^node::tests::(helpers|rx_shutdown|via_connected|pathed|sock_direct|via_helper|via_testutil|via_two_hops|on_another_trunk)::/)'
|
|
test-group = 'node-synthetic'
|
|
|
|
[[profile.ci.overrides]]
|
|
filter = 'package(fips-mesh) & test(/^node::tests::(big::test_big_100_nodes|big::test_big_via_helper|sock_direct::test_sock_100_nodes)$/)'
|
|
test-group = 'node-large'
|
|
|
|
[[profile.ci.overrides]]
|
|
filter = 'package(fips-mesh) & test(/^node::tests::(helpers|rx_shutdown|via_connected|pathed|sock_direct|via_helper|via_testutil|via_two_hops|on_another_trunk)::/)'
|
|
test-group = 'node-synthetic'
|
|
|
|
[[profile.ci.overrides]]
|
|
filter = 'test(slow)'
|
|
slow-timeout = "120s"
|