Richard W.M. Jones
2023-Jun-27 12:33 UTC
[Libguestfs] [PATCH libguestfs 4/4] ocaml/t/guestfs_065_implicit_close.ml: Skip this test on OCaml 5
Link: https://discuss.ocaml.org/t/ocaml-5-forcing-objects-to-be-collected-and-finalized/12492/2 --- ocaml/t/guestfs_065_implicit_close.ml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ocaml/t/guestfs_065_implicit_close.ml b/ocaml/t/guestfs_065_implicit_close.ml index f2dfecbd5c..04e511dd8a 100644 --- a/ocaml/t/guestfs_065_implicit_close.ml +++ b/ocaml/t/guestfs_065_implicit_close.ml @@ -16,6 +16,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) +let () + (* In OCaml 5, Gc.full_major does not actually collect the handle + * for unknown reasons. Skip the test until we can resolve this. + * https://discuss.ocaml.org/t/ocaml-5-forcing-objects-to-be-collected-and-finalized/12492/2 + *) + if Sys.ocaml_version >= "5" then + exit 77 + let close_invoked = ref 0 let close _ _ _ _ -- 2.41.0
Laszlo Ersek
2023-Jun-28 10:24 UTC
[Libguestfs] [PATCH libguestfs 4/4] ocaml/t/guestfs_065_implicit_close.ml: Skip this test on OCaml 5
On 6/27/23 14:33, Richard W.M. Jones wrote:> Link: https://discuss.ocaml.org/t/ocaml-5-forcing-objects-to-be-collected-and-finalized/12492/2 > --- > ocaml/t/guestfs_065_implicit_close.ml | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/ocaml/t/guestfs_065_implicit_close.ml b/ocaml/t/guestfs_065_implicit_close.ml > index f2dfecbd5c..04e511dd8a 100644 > --- a/ocaml/t/guestfs_065_implicit_close.ml > +++ b/ocaml/t/guestfs_065_implicit_close.ml > @@ -16,6 +16,14 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > *) > > +let () > + (* In OCaml 5, Gc.full_major does not actually collect the handle > + * for unknown reasons. Skip the test until we can resolve this. > + * https://discuss.ocaml.org/t/ocaml-5-forcing-objects-to-be-collected-and-finalized/12492/2 > + *) > + if Sys.ocaml_version >= "5" then > + exit 77 > + > let close_invoked = ref 0 > > let close _ _ _ _series looks great and even understandable, thanks!
Possibly Parallel Threads
- [PATCH libguestfs 4/4] ocaml/t/guestfs_065_implicit_close.ml: Skip this test on OCaml 5
- [PATCH libguestfs 0/4] Fix ups for OCaml 5
- [PATCH libguestfs 1/2] ocaml/implicit_close test: collect all currently unreachable blocks
- [PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
- [PATCH 4/4] ocaml: The implicit close patch only works on native code.