also looking at this
fix(sync): stop craft's locks busy-waiting
#80
3 files
+229
-23
| @@ -768,6 +768,18 @@ pub fn build(b: *std.Build) void { | ||
| 768 | 768 | }); |
| 769 | 769 | bridge_log_tests.root_module.link_libc = true; |
| 770 | 770 | |
| 771 | // The blocking primitives every other lock in craft is built on. They | |
| 772 | // spun without yielding until now, so this is the first time they have | |
| 773 | // been exercised at all. | |
| 774 | const compat_mutex_tests = b.addTest(.{ | |
| 775 | .root_module = b.createModule(.{ | |
| 776 | .root_source_file = b.path("src/compat_mutex.zig"), | |
| 777 | .target = target, | |
| 778 | .optimize = optimize, | |
| 779 | }), | |
| 780 | }); | |
| 781 | compat_mutex_tests.root_module.link_libc = true; | |
| 782 | ||
| 771 | 783 | // The conformance test: what craft declares, against what it dispatches. |
| 772 | 784 | const capability_conformance_tests = b.addTest(.{ |
| 773 | 785 | .root_module = b.createModule(.{ |
| @@ -1139,6 +1151,7 @@ pub fn build(b: *std.Build) void { | ||
| 1139 | 1151 | const run_local_tls_tests = b.addRunArtifact(local_tls_tests); |
| 1140 | 1152 | const run_menu_roles_tests = b.addRunArtifact(menu_roles_tests); |
| 1141 | 1153 | const run_capabilities_tests = b.addRunArtifact(capabilities_tests); |
| 1154 | const run_compat_mutex_tests = b.addRunArtifact(compat_mutex_tests); | |
| 1142 | 1155 | const run_bridge_log_tests = b.addRunArtifact(bridge_log_tests); |
| 1143 | 1156 | const run_log_unit_tests = b.addRunArtifact(log_unit_tests); |
| 1144 | 1157 | const run_bridge_shell_tests = b.addRunArtifact(bridge_shell_tests); |
| @@ -1263,6 +1276,7 @@ pub fn build(b: *std.Build) void { | ||
| 1263 | 1276 | test_step.dependOn(&run_local_tls_tests.step); |
| 1264 | 1277 | test_step.dependOn(&run_menu_roles_tests.step); |
| 1265 | 1278 | test_step.dependOn(&run_capabilities_tests.step); |
| 1279 | test_step.dependOn(&run_compat_mutex_tests.step); | |
| 1266 | 1280 | test_step.dependOn(&run_bridge_log_tests.step); |
| 1267 | 1281 | test_step.dependOn(&run_log_unit_tests.step); |
| 1268 | 1282 | test_step.dependOn(&run_bridge_shell_tests.step); |