[Libguestfs] [PATCH libguestfs 1/2] ocaml/implicit_close test: collect all currently unreachable blocks
Eric Blake
eblake at redhat.com
Tue May 30 16:26:56 UTC 2023
On Sat, May 27, 2023 at 03:32:36PM +0200, Jürgen Hötzel wrote:
> Fixes failing implice_close test on OCaml 5.
s/implice/implicit/
> ---
> 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 ()
Will libnbd need a similar patch? (I'm assuming that Rich modeled
libnbd's OCaml bindings after libguestfs and therefore it likely
shares an implicit close feature worth testing, although there is not
currently a 'ocaml/tests/*_implicit_close.ml' file in that project)
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list