Skip to content

Commit 789a159

Browse files
authored
Merge pull request #1 from shym/polish-stm-threads
Polish ocaml-multicore#88
2 parents fe79d20 + f129408 commit 789a159

File tree

29 files changed

+91
-91
lines changed

29 files changed

+91
-91
lines changed

lib/STM_domain.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ module Make : functor (Spec : STM_spec.Spec) ->
1515
val agree_prop_par : Spec.cmd list * Spec.cmd list * Spec.cmd list -> bool
1616
(** Parallel agreement property based on [Domain] *)
1717

18-
val agree_test_par : count:int -> name:string -> QCheck2.Test.t
18+
val agree_test_par : count:int -> name:string -> QCheck.Test.t
1919
(** Parallel agreement test based on [Domain] which combines [repeat] and [~retries] *)
2020

21-
val neg_agree_test_par : count:int -> name:string -> QCheck2.Test.t
21+
val neg_agree_test_par : count:int -> name:string -> QCheck.Test.t
2222
(** An negative agreement test (for convenience). Accepts two labeled parameters:
2323
[count] is the test count and [name] is the printed test name. *)
2424

lib/STM_sequential.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module Make : functor (Spec : STM_spec.Spec) ->
2727
when interpreted from the model's initial state and the [sut]'s initial state.
2828
Cleans up after itself by calling [Spec.cleanup] *)
2929

30-
val agree_test : count:int -> name:string -> QCheck2.Test.t
30+
val agree_test : count:int -> name:string -> QCheck.Test.t
3131
(** An actual agreement test (for convenience). Accepts two labeled parameters:
3232
[count] is the test count and [name] is the printed test name. *)
3333

lib/STM_thread.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ module Make : functor (Spec : STM_spec.Spec) ->
1111
val agree_prop_conc : Spec.cmd list * Spec.cmd list * Spec.cmd list -> bool
1212
(** Concurrent agreement property based on [Thread] *)
1313

14-
val agree_test_conc : count:int -> name:string -> QCheck2.Test.t
14+
val agree_test_conc : count:int -> name:string -> QCheck.Test.t
1515
(** Concurrent agreement test based on [Thread] which combines [repeat] and [~retries] *)
1616

17-
val neg_agree_test_conc : count:int -> name:string -> QCheck2.Test.t
17+
val neg_agree_test_conc : count:int -> name:string -> QCheck.Test.t
1818
(** An negative agreement test (for convenience). Accepts two labeled parameters:
1919
[count] is the test count and [name] is the printed test name. *)
2020

src/array/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
(executable
1313
(name stm_tests)
1414
(modules stm_tests)
15-
(libraries qcheck-stm.base qcheck-stm.sequential qcheck-stm.domain)
15+
(libraries qcheck-stm.sequential qcheck-stm.domain)
1616
(preprocess (pps ppx_deriving.show)))
1717

1818
(rule

src/array/stm_tests.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ struct
103103
| _, _ -> false
104104
end
105105

106-
module ArraySTM_Seq = STM_sequential.Make(AConf)
107-
module ArraySTM_Dom = STM_domain.Make(AConf)
106+
module ArraySTM_seq = STM_sequential.Make(AConf)
107+
module ArraySTM_dom = STM_domain.Make(AConf)
108108

109109
;;
110110
Util.set_ci_printing ()
111111
;;
112112
QCheck_base_runner.run_tests_main
113113
(let count = 1000 in
114-
[ArraySTM_Seq.agree_test ~count ~name:"STM Array test sequential";
115-
ArraySTM_Dom.neg_agree_test_par ~count ~name:"STM Array test parallel" (* this test is expected to fail *)
114+
[ArraySTM_seq.agree_test ~count ~name:"STM Array test sequential";
115+
ArraySTM_dom.neg_agree_test_par ~count ~name:"STM Array test parallel" (* this test is expected to fail *)
116116
])

src/atomic/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
(executable
1313
(name stm_tests)
1414
(modules stm_tests)
15-
(libraries qcheck-stm.base qcheck-stm.sequential qcheck-stm.domain)
15+
(libraries qcheck-stm.sequential qcheck-stm.domain)
1616
(preprocess (pps ppx_deriving.show)))
1717

1818
(rule

src/atomic/stm_tests.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ struct
6666
| _,_ -> false
6767
end
6868

69-
module AT_Seq = STM_sequential.Make(CConf)
70-
module AT_Dom = STM_domain.Make(CConf)
69+
module AT_seq = STM_sequential.Make(CConf)
70+
module AT_dom = STM_domain.Make(CConf)
7171
;;
7272
Util.set_ci_printing ()
7373
;;
7474
QCheck_base_runner.run_tests_main
75-
(let count = 1000 in
76-
[AT_Seq.agree_test ~count ~name:"STM Atomic test sequential";
77-
AT_Dom.agree_test_par ~count ~name:"STM Atmoic test parallel";])
75+
(let count = 250 in
76+
[AT_seq.agree_test ~count ~name:"STM Atomic test sequential";
77+
AT_dom.agree_test_par ~count ~name:"STM Atmoic test parallel";])

src/bigarray/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
(executable
1616
(name stm_tests)
1717
(modules stm_tests)
18-
(libraries qcheck-stm.base qcheck-stm.sequential qcheck-stm.domain)
18+
(libraries qcheck-stm.sequential qcheck-stm.domain)
1919
(preprocess
2020
(pps ppx_deriving.show)))
2121

src/buffer/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
(executable
1010
(name stm_tests)
1111
(modules stm_tests)
12-
(libraries qcheck-stm.base qcheck-stm.sequential qcheck-stm.domain)
12+
(libraries qcheck-stm.sequential qcheck-stm.domain)
1313
(preprocess (pps ppx_deriving.show)))
1414

1515
(rule

src/buffer/stm_tests.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ struct
125125
| _, _ -> false
126126
end
127127

128-
module BufferSTM_Seq = STM_sequential.Make(BConf)
129-
module BufferSTM_Dom = STM_domain.Make(BConf)
128+
module BufferSTM_seq = STM_sequential.Make(BConf)
129+
module BufferSTM_dom = STM_domain.Make(BConf)
130130

131131
;;
132132
Util.set_ci_printing ()
133133
;;
134134
QCheck_base_runner.run_tests_main
135-
(let count = 100 in
136-
[BufferSTM_Seq.agree_test ~count ~name:"STM Buffer test sequential";
137-
BufferSTM_Dom.neg_agree_test_par ~count ~name:"STM Buffer test parallel"])
135+
(let count = 1000 in
136+
[BufferSTM_seq.agree_test ~count ~name:"STM Buffer test sequential";
137+
BufferSTM_dom.neg_agree_test_par ~count ~name:"STM Buffer test parallel"])

0 commit comments

Comments
 (0)