Fix the test about read/atomic_read on block devices

This commit is contained in:
Calascibetta Romain 2024-12-06 14:48:23 +01:00
parent d101b4c7ea
commit 0e68ab94e5
3 changed files with 4 additions and 3 deletions

View file

@ -505,7 +505,8 @@ let select ~block cancelled_syscalls =
handles := miou_solo5_yield 0; handles := miou_solo5_yield 0;
if !handles == 0 then go signals else signals if !handles == 0 then go signals else signals
in in
let signals = go [] in let signals = consume_block domain [] in
let signals = go signals in
let signals = collect_handles ~handles:!handles domain signals in let signals = collect_handles ~handles:!handles domain signals in
collect_sleepers domain signals collect_sleepers domain signals

View file

@ -17,7 +17,7 @@ let () = Miou_solo5.(run [ block "simple" ]) @@ fun blk () ->
let hash = Digest.string str in let hash = Digest.string str in
Fmt.pr "%08x: %s\n%!" 0 (Digest.to_hex hash) Fmt.pr "%08x: %s\n%!" 0 (Digest.to_hex hash)
in in
Miou_solo5.Block.atomic_read blk ~off:pagesize bstr; Miou_solo5.Block.read blk ~off:pagesize bstr;
let str = bigstring_to_string bstr in let str = bigstring_to_string bstr in
let hash = Digest.string str in let hash = Digest.string str in
Fmt.pr "%08x: %s\n%!" pagesize (Digest.to_hex hash); Fmt.pr "%08x: %s\n%!" pagesize (Digest.to_hex hash);

View file

@ -42,6 +42,6 @@ Tests some simple unikernels
Solo5: rodata @ (0x1c6000 - 0x1f7fff) Solo5: rodata @ (0x1c6000 - 0x1f7fff)
Solo5: data @ (0x1f8000 - 0x267fff) Solo5: data @ (0x1f8000 - 0x267fff)
Solo5: heap >= 0x268000 < stack < 0x20000000 Solo5: heap >= 0x268000 < stack < 0x20000000
00000200: 5e00b6c8f387deac083b9718e08a361b
00000000: 94a3b2375dd8aa75e3d2cdef54179909 00000000: 94a3b2375dd8aa75e3d2cdef54179909
00000200: 5e00b6c8f387deac083b9718e08a361b
Solo5: solo5_exit(0) called Solo5: solo5_exit(0) called