Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/opam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:
- 5.3.0
- 5.4.0
- ocaml-variants.5.5.0+trunk
include:
# Testing upper and lower bounds for the Eio packages
- ocaml-compiler: 5.2.0
test-eio: true
- ocaml-compiler: ocaml-variants.5.5.0+trunk
test-eio: true

runs-on: ubuntu-latest

Expand All @@ -45,6 +51,11 @@ jobs:
run: |
opam install --with-test ./qcheck-multicoretests-util.opam ./qcheck-lin.opam ./qcheck-stm.opam

- name:
if: matrix.test-eio == true
run: |
opam install --with-test ./qcheck-stm-eio.opam ./qcheck-lin-eio.opam

- name: Show configuration
run: |
opam exec -- ocamlc -config
Expand Down
4 changes: 1 addition & 3 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ the multicore run-time of OCaml 5.0.")
base-domains
(qcheck-core (>= "0.90"))
(qcheck-lin (= :version))
(qcheck-stm (= :version))
(qcheck-stm-eio (= :version))
(qcheck-lin-eio (= :version))))
(qcheck-stm (= :version))))

(package
(name qcheck-stm)
Expand Down
44 changes: 44 additions & 0 deletions src/neg_tests/dune
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@
(action (run %{test} --verbose))
)

(test
(name stm_tests_ref_eio)
(modules stm_tests_ref_eio)
(package qcheck-stm-eio)
(libraries stm_tests_ref_spec qcheck-stm-eio.domain eio eio_main)
; Hangs with the linux backend
(action
(setenv EIO_BACKEND posix
(run %{test} --verbose)))
)

(library
(name CList)
(modules CList)
Expand Down Expand Up @@ -69,6 +80,17 @@
(action (run %{test} --verbose))
)

(test
(name stm_tests_clist_eio)
(modules stm_tests_clist_spec stm_tests_clist_eio)
(package qcheck-stm-eio)
(libraries CList qcheck-stm-eio.domain eio eio_main)
; Hangs with the linux backend
(action
(setenv EIO_BACKEND posix
(run %{test} --verbose)))
)

;; Linearization tests of ref and Clist with Lin

(library
Expand Down Expand Up @@ -112,6 +134,18 @@
(action (run %{test} --verbose))
)

(test
(name lin_tests_eio)
(modules lin_tests_eio)
(package qcheck-lin-eio)
(flags (:standard -w -27))
(libraries lin_tests_common qcheck-lin-eio.domain eio eio_main)
; Hangs with the linux backend
(action
(setenv EIO_BACKEND posix
(run %{test} --verbose)))
)

;; Linearization tests of ref and Clist with Lin.Internal

(test
Expand Down Expand Up @@ -143,3 +177,13 @@
; (action (run ./%{deps} --verbose))
(action (progn))
)

(test
(name lin_internal_tests_eio)
(modules lin_internal_tests_eio)
(package qcheck-lin-eio)
(flags (:standard -w -27))
(libraries lin_internal_tests_common qcheck-lin-eio.domain eio eio_main)
; (setenv EIO_BACKEND posix (run %{test} --verbose))
(action (progn))
)
22 changes: 22 additions & 0 deletions src/neg_tests/lin_internal_tests_eio.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
open Lin_internal_tests_common

module RT_int_domain = Lin_domain_eio.Make_internal(RConf_int) [@alert "-internal"]
module RT_int64_domain = Lin_domain_eio.Make_internal(RConf_int64) [@alert "-internal"]
module CLT_int_domain = Lin_domain_eio.Make_internal(CLConf(CList)(Int)) [@alert "-internal"]
module CLT_int64_domain = Lin_domain_eio.Make_internal(CLConf(CList)(Int64)) [@alert "-internal"]

let () =
Eio_main.run @@ fun env ->
let domain_mgr = Eio.Stdenv.domain_mgr env in
let count = 15000 in
QCheck_base_runner.run_tests_main
[
RT_int_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin.Internal ref int test with Eio";
RT_int64_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin.Internal ref int64 test with Eio";
CLT_int_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin.Internal CList int test with Eio";
CLT_int64_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin.Internal CList int64 test with Eio";
]
22 changes: 22 additions & 0 deletions src/neg_tests/lin_tests_eio.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
open Lin_tests_common

module RT_int_domain = Lin_domain_eio.Make(Ref_int_spec)
module RT_int64_domain = Lin_domain_eio.Make(Ref_int64_spec)
module CLT_int_domain = Lin_domain_eio.Make(CList_spec_int(CList))
module CLT_int64_domain = Lin_domain_eio.Make(CList_spec_int64(CList))

let () =
Eio_main.run @@ fun env ->
let domain_mgr = Eio.Stdenv.domain_mgr env in
let count = 10000 in
QCheck_base_runner.run_tests_main
[
RT_int_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin ref int test with Eio";
RT_int64_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin ref int64 test with Eio";
CLT_int_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin CList int test with Eio";
CLT_int64_domain.neg_lin_test ~domain_mgr ~count
~name:"Lin CList int64 test with Eio";
]
15 changes: 15 additions & 0 deletions src/neg_tests/stm_tests_clist_eio.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
open Stm_tests_clist_spec
module CLT_int_dom = STM_domain_eio.Make (CLConf (CList) (Int))
module CLT_int64_dom = STM_domain_eio.Make (CLConf (CList) (Int64))

let () =
Eio_main.run @@ fun env ->
let domain_mgr = Eio.Stdenv.domain_mgr env in
let count = 1000 in
QCheck_base_runner.run_tests_main
[
CLT_int_dom.neg_agree_test_par ~domain_mgr ~count
~name:"STM int CList test parallel";
CLT_int64_dom.neg_agree_test_par ~domain_mgr ~count
~name:"STM int64 CList test parallel";
]
15 changes: 15 additions & 0 deletions src/neg_tests/stm_tests_ref_eio.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
open Stm_tests_ref_spec

module RT_int = STM_domain_eio.Make(RConf_int)
module RT_int64 = STM_domain_eio.Make(RConf_int64)

let () =
Eio_main.run @@ fun env ->
let domain_mgr = Eio.Stdenv.domain_mgr env in
QCheck_base_runner.run_tests_main
[
RT_int.neg_agree_test_par ~domain_mgr ~count:1000
~name:"STM int ref test parallel";
RT_int64.neg_agree_test_par ~domain_mgr ~count:1000
~name:"STM int64 ref test parallel";
]