File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 8
8
ptime
9
9
ptime.clock.os
10
10
crowbar
11
+ hxd.core
12
+ hxd.string
11
13
tls-miou-unix)
12
14
(instrumentation
13
15
(backend bisect_ppx)))
Original file line number Diff line number Diff line change @@ -248,6 +248,9 @@ let compile to_client to_server =
248
248
go 0x0 to_client to_server;
249
249
(Buffer. contents client, Buffer. contents server)
250
250
251
+ let pp_exn ppf exn = Fmt. string ppf (Printexc. to_string exn )
252
+ let pp_str ppf str = Hxd_string. pp Hxd. default ppf str
253
+
251
254
let run seed operations =
252
255
Miou_unix. run ~domains: 1 @@ fun () ->
253
256
let rng = Mirage_crypto_rng_miou_unix. (initialize (module Pfortuna )) in
@@ -278,9 +281,12 @@ let run seed operations =
278
281
let m = String. length send_to_server in
279
282
Mirage_crypto_rng_miou_unix. kill rng;
280
283
epr " [%a] %db %db transmitted\n %!" Fmt. (styled `Green string ) " OK" n m
281
- | _ ->
284
+ | a , b ->
282
285
Mirage_crypto_rng_miou_unix. kill rng;
283
- Crowbar. failf " [%a] Unexpected result\n %!" Fmt. (styled `Red string ) " ERROR"
286
+ Crowbar. failf " [%a] Unexpected result: %a & %a\n %!"
287
+ Fmt. (styled `Red string ) " ERROR"
288
+ Fmt. (Dump. result ~error: pp_exn ~ok: Fmt. (Dump. list (Dump. result ~error: pp_exn ~ok: pp_str))) a
289
+ Fmt. (Dump. result ~error: pp_exn ~ok: pp_str) b
284
290
285
291
let label name gen = Crowbar. with_printer Fmt. (const string name) gen
286
292
Original file line number Diff line number Diff line change @@ -17,13 +17,14 @@ depends: [
17
17
"ocaml" {>= "5.0.0"}
18
18
"dune" {>= "3.0"}
19
19
"tls" {= version}
20
- "mirage-crypto-rng-miou-unix" {>= "1.0.0"}
20
+ "mirage-crypto-rng-miou-unix" {>= "1.0.0" & with-test }
21
21
"x509" {>= "1.0.0"}
22
22
"miou" {>= "0.2.0"}
23
23
"crowbar" {with-test}
24
24
"rresult" {with-test}
25
25
"ohex" {with-test}
26
26
"ptime" {with-test}
27
+ "hxd" {with-test}
27
28
]
28
29
tags: [ "org:mirage"]
29
30
synopsis: "Transport Layer Security purely in OCaml, Miou+Unix layer"
You can’t perform that action at this time.
0 commit comments