RPMsg inter-partition messaging
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(crowbar): Alcotest-style API with suite exports and grouped run

- Change `run` signature to `string -> (string * test_case list) list -> unit`
matching Alcotest's grouping convention
- Fix `_name` bug: pass the name through to Alcotest.run_with_args
- Each fuzz module now exports `let suite = ("name", [test_case ...])`
- Entry points (fuzz.ml) collect suites: `Crowbar.run "pkg" [Fuzz_X.suite]`
- Remove stale `add_test`/`suite` API, keep only `test_case`/`run`
- Remove `let run () = ()` from fuzz_common.ml files
- Update merlint E725 rule to match new `let suite = ("name", ...)` pattern
- Update E725 test fixtures and expected output

+18 -16
-1
fuzz/fuzz_common.ml
··· 1 1 (** Common utilities for RPMsg fuzz tests. *) 2 2 3 3 let truncate s = String.sub s 0 (min (String.length s) 512) 4 - let run () = ()
+9 -6
fuzz/fuzz_endpoint.ml
··· 50 50 | None -> fail "expected message" 51 51 | Some received -> if received <> buf then fail "binary roundtrip mismatch" 52 52 53 - let run () = 54 - add_test ~name:"endpoint: pipe roundtrip" [ bytes ] test_pipe_roundtrip; 55 - add_test ~name:"endpoint: max size message" [ bytes ] test_max_size_message; 56 - add_test ~name:"endpoint: binary payload" 57 - [ uint8; uint8; uint8; uint8 ] 58 - test_binary_payload 53 + let suite = 54 + ( "endpoint", 55 + [ 56 + test_case "pipe roundtrip" [ bytes ] test_pipe_roundtrip; 57 + test_case "max size message" [ bytes ] test_max_size_message; 58 + test_case "binary payload" 59 + [ uint8; uint8; uint8; uint8 ] 60 + test_binary_payload; 61 + ] )
+1 -4
fuzz/fuzz_rpmsg.ml
··· 1 1 (** Main entry point for RPMsg fuzz tests. *) 2 2 3 - let () = 4 - Fuzz_common.run (); 5 - Fuzz_wire.run (); 6 - Fuzz_endpoint.run () 3 + let () = Crowbar.run "rpmsg" [ Fuzz_wire.suite; Fuzz_endpoint.suite ]
+8 -5
fuzz/fuzz_wire.ml
··· 19 19 let _ = Wire.Codec.decode Rpmsg.endpoint_info_codec b 0 in 20 20 () 21 21 22 - let run () = 23 - add_test ~name:"wire: codec roundtrip" 24 - [ bytes; range 65536; range 65536 ] 25 - test_codec_roundtrip; 26 - add_test ~name:"wire: decode crash safety" [ bytes ] test_decode_crash_safety 22 + let suite = 23 + ( "wire", 24 + [ 25 + test_case "codec roundtrip" 26 + [ bytes; range 65536; range 65536 ] 27 + test_codec_roundtrip; 28 + test_case "decode crash safety" [ bytes ] test_decode_crash_safety; 29 + ] )