[Libguestfs] [PATCH libguestfs 1/2] ocaml/implicit_close test: collect all currently unreachable blocks

Laszlo Ersek lersek at redhat.com
Tue May 30 11:29:27 UTC 2023


On 5/27/23 15:32, Jürgen Hötzel wrote:
> Fixes failing implice_close test on OCaml 5.
> ---
>  ocaml/t/guestfs_065_implicit_close.ml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ocaml/t/guestfs_065_implicit_close.ml b/ocaml/t/guestfs_065_implicit_close.ml
> index 567e550b4..5e00c21ac 100644
> --- a/ocaml/t/guestfs_065_implicit_close.ml
> +++ b/ocaml/t/guestfs_065_implicit_close.ml
> @@ -30,8 +30,8 @@ let () =
>   *)
>  
>  (* This should cause the GC to close the handle. *)
> -let () = Gc.compact ()
> +let () = Gc.full_major ()
>  
>  let () = assert  (!close_invoked = 1)
>  
> -let () = Gc.compact ()
> +let () = Gc.full_major ()

I can vaguely support this patch, as the documentation at
<https://v2.ocaml.org/api/Gc.html#VALfull_major> writes,

"This will collect all currently unreachable blocks"

*and* none of the other functions documented on that page are classified
similarly.

Acked-by: Laszlo Ersek <lersek at redhat.com>



More information about the Libguestfs mailing list