From 2036856f293a3d49831711ab1edadc6db5301f6e Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 9 Oct 2026 16:38:35 +0200 Subject: [PATCH 1/5] Only build the Eio neg_tests when eio_main is available The default alias builds every test in src/neg_tests. The CI jobs that build the compiler from source do not install Eio, so they failed with 'Library "eio_main" not found'. Using build_if keeps Eio out of the dependency cone of the main test suite. --- src/neg_tests/dune | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/neg_tests/dune b/src/neg_tests/dune index 885e2780..79f9f276 100644 --- a/src/neg_tests/dune +++ b/src/neg_tests/dune @@ -43,6 +43,8 @@ (name stm_tests_ref_eio) (modules stm_tests_ref_eio) (package qcheck-stm-eio) + ; Eio is not a dependency of multicoretests: skip when it is missing + (build_if %{lib-available:eio_main}) (libraries stm_tests_ref_spec qcheck-stm-eio.domain eio eio_main) ; Hangs with the linux backend (action @@ -84,6 +86,8 @@ (name stm_tests_clist_eio) (modules stm_tests_clist_spec stm_tests_clist_eio) (package qcheck-stm-eio) + ; Eio is not a dependency of multicoretests: skip when it is missing + (build_if %{lib-available:eio_main}) (libraries CList qcheck-stm-eio.domain eio eio_main) ; Hangs with the linux backend (action @@ -138,6 +142,8 @@ (name lin_tests_eio) (modules lin_tests_eio) (package qcheck-lin-eio) + ; Eio is not a dependency of multicoretests: skip when it is missing + (build_if %{lib-available:eio_main}) (flags (:standard -w -27)) (libraries lin_tests_common qcheck-lin-eio.domain eio eio_main) ; Hangs with the linux backend @@ -182,6 +188,8 @@ (name lin_internal_tests_eio) (modules lin_internal_tests_eio) (package qcheck-lin-eio) + ; Eio is not a dependency of multicoretests: skip when it is missing + (build_if %{lib-available:eio_main}) (flags (:standard -w -27)) (libraries lin_internal_tests_common qcheck-lin-eio.domain eio eio_main) ; (setenv EIO_BACKEND posix (run %{test} --verbose)) From 389ada28c98af75ececb578d77d64cba3f74e8a8 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 9 Oct 2026 16:40:32 +0200 Subject: [PATCH 2/5] Detach the neg_tests helper libraries from the multicoretests package The Eio neg_tests belong to qcheck-stm-eio and qcheck-lin-eio, but they use stm_tests_ref_spec, CList, lin_tests_common and lin_internal_tests_common. These were attached to multicoretests, so 'dune build -p qcheck-stm-eio @runtest' (as run by opam --with-test) could not find them. Private libraries without a package are available to the tests of every package. --- src/neg_tests/dune | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/neg_tests/dune b/src/neg_tests/dune index 79f9f276..d41d7aa1 100644 --- a/src/neg_tests/dune +++ b/src/neg_tests/dune @@ -3,7 +3,6 @@ (library (name stm_tests_ref_spec) (modules stm_tests_ref_spec) - (package multicoretests) (libraries qcheck-core qcheck-stm.stm) ) @@ -55,7 +54,6 @@ (library (name CList) (modules CList) - (package multicoretests) ) (test @@ -100,14 +98,12 @@ (library (name lin_tests_common) (modules lin_tests_common) - (package multicoretests) (libraries CList qcheck-lin.lin) ) (library (name lin_internal_tests_common) (modules lin_internal_tests_common) - (package multicoretests) (libraries CList qcheck-lin.lin) ) From 17f5d5fe008dadf35400845d7c0b96cd3fe4889c Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 9 Oct 2026 16:40:32 +0200 Subject: [PATCH 3/5] Add eio_main as a test dependency of the Eio packages The Eio neg_tests link with eio_main, so 'opam install --with-test' failed without it. --- dune-project | 2 ++ qcheck-lin-eio.opam | 1 + qcheck-stm-eio.opam | 1 + 3 files changed, 4 insertions(+) diff --git a/dune-project b/dune-project index 8f04ae8c..34e44d48 100644 --- a/dune-project +++ b/dune-project @@ -47,6 +47,7 @@ sequential and parallel tests against a declarative model.") (ocaml (>= 4.12)) (qcheck-core (>= "0.90")) (eio (>= "1.0")) + (eio_main (and (>= "1.0") :with-test)) (qcheck-multicoretests-util (= :version)) (qcheck-stm (= :version)))) @@ -79,6 +80,7 @@ and explained by some sequential interleaving.") (ocaml (>= 4.12)) (qcheck-core (>= "0.90")) (eio (>= "1.0")) + (eio_main (and (>= "1.0") :with-test)) (qcheck-multicoretests-util (= :version)) (qcheck-lin (= :version)))) diff --git a/qcheck-lin-eio.opam b/qcheck-lin-eio.opam index 04da3b7d..4b3730fc 100644 --- a/qcheck-lin-eio.opam +++ b/qcheck-lin-eio.opam @@ -25,6 +25,7 @@ depends: [ "ocaml" {>= "4.12"} "qcheck-core" {>= "0.90"} "eio" {>= "1.0"} + "eio_main" {>= "1.0" & with-test} "qcheck-multicoretests-util" {= version} "qcheck-lin" {= version} "odoc" {with-doc} diff --git a/qcheck-stm-eio.opam b/qcheck-stm-eio.opam index a70b6b72..84a6ee83 100644 --- a/qcheck-stm-eio.opam +++ b/qcheck-stm-eio.opam @@ -25,6 +25,7 @@ depends: [ "ocaml" {>= "4.12"} "qcheck-core" {>= "0.90"} "eio" {>= "1.0"} + "eio_main" {>= "1.0" & with-test} "qcheck-multicoretests-util" {= version} "qcheck-stm" {= version} "odoc" {with-doc} From c417e10f8c2b86599685ee90766a5f0fd635fbb9 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 9 Oct 2026 16:40:42 +0200 Subject: [PATCH 4/5] Require OCaml 5.1 for the Eio packages Eio itself requires OCaml 5.1, so the 4.12 lower bound was misleading. --- dune-project | 4 ++-- qcheck-lin-eio.opam | 2 +- qcheck-stm-eio.opam | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dune-project b/dune-project index 34e44d48..b95b2352 100644 --- a/dune-project +++ b/dune-project @@ -44,7 +44,7 @@ sequential and parallel tests against a declarative model.") "model-based testing" "parallel testing")) (depopts base-domains) (depends - (ocaml (>= 4.12)) + (ocaml (>= 5.1)) (qcheck-core (>= "0.90")) (eio (>= "1.0")) (eio_main (and (>= "1.0") :with-test)) @@ -77,7 +77,7 @@ and explained by some sequential interleaving.") (tags ("test" "property" "qcheck" "quickcheck" "parallelism" "sequential consistency")) (depopts base-domains) (depends - (ocaml (>= 4.12)) + (ocaml (>= 5.1)) (qcheck-core (>= "0.90")) (eio (>= "1.0")) (eio_main (and (>= "1.0") :with-test)) diff --git a/qcheck-lin-eio.opam b/qcheck-lin-eio.opam index 4b3730fc..bd301caf 100644 --- a/qcheck-lin-eio.opam +++ b/qcheck-lin-eio.opam @@ -22,7 +22,7 @@ homepage: "https://github.com/ocaml-multicore/multicoretests" bug-reports: "https://github.com/ocaml-multicore/multicoretests/issues" depends: [ "dune" {>= "3.18"} - "ocaml" {>= "4.12"} + "ocaml" {>= "5.1"} "qcheck-core" {>= "0.90"} "eio" {>= "1.0"} "eio_main" {>= "1.0" & with-test} diff --git a/qcheck-stm-eio.opam b/qcheck-stm-eio.opam index 84a6ee83..05cc46a0 100644 --- a/qcheck-stm-eio.opam +++ b/qcheck-stm-eio.opam @@ -22,7 +22,7 @@ homepage: "https://github.com/ocaml-multicore/multicoretests" bug-reports: "https://github.com/ocaml-multicore/multicoretests/issues" depends: [ "dune" {>= "3.18"} - "ocaml" {>= "4.12"} + "ocaml" {>= "5.1"} "qcheck-core" {>= "0.90"} "eio" {>= "1.0"} "eio_main" {>= "1.0" & with-test} From 34159fb83ac0611afa4d673651b971efc3f9045c Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 9 Oct 2026 16:40:42 +0200 Subject: [PATCH 5/5] CI: name the Eio installation step --- .github/workflows/opam.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/opam.yml b/.github/workflows/opam.yml index a7e041f5..5e26765c 100644 --- a/.github/workflows/opam.yml +++ b/.github/workflows/opam.yml @@ -51,7 +51,7 @@ jobs: run: | opam install --with-test ./qcheck-multicoretests-util.opam ./qcheck-lin.opam ./qcheck-stm.opam - - name: + - name: Test installation of the Eio OPAM packages if: matrix.test-eio == true run: | opam install --with-test ./qcheck-stm-eio.opam ./qcheck-lin-eio.opam