Skip to content

Commit 1434f08

Browse files
authored
Merge pull request #197 from jmid/disable-ref-thread-tests
Disable ref thread tests in bytecode mode
2 parents ed26e1b + 5c93e00 commit 1434f08

16 files changed

+92
-71
lines changed

src/neg_tests/dune

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,81 +6,82 @@
66
(package multicoretests)
77
(deps
88
;; STM tests
9-
ref_stm_seq_tests.exe
10-
ref_stm_dom_tests.exe
11-
ref_stm_thread_tests.exe
12-
conclist_stm_tests.exe
9+
stm_tests_sequential_ref.exe
10+
stm_tests_domain_ref.exe
11+
stm_tests_thread_ref.exe ;; currently disabled under bytecode mode
12+
stm_tests_conclist.exe
1313
;; Lin tests
14-
domain_lin_tests.exe ;; currently not run on CI
15-
effect_lin_tests.exe ;; currently not run on CI
16-
thread_lin_tests.exe
14+
lin_tests_domain.exe ;; currently not run on CI
15+
lin_tests_effect.exe ;; currently not run on CI
16+
lin_tests_thread_ref.exe ;; currently disabled under bytecode mode
17+
lin_tests_thread_conclist.exe
1718
;; Lin_api tests
18-
domain_lin_tests_dsl.exe
19-
effect_lin_tests_dsl.exe
20-
thread_lin_tests_dsl.exe)) ;; currently not run on CI
19+
lin_tests_dsl_domain.exe
20+
lin_tests_dsl_effect.exe
21+
lin_tests_dsl_thread.exe)) ;; currently not run on CI
2122

2223
(library
23-
(name ref_stm_spec)
24-
(modules ref_stm_spec)
24+
(name stm_tests_spec_ref)
25+
(modules stm_tests_spec_ref)
2526
(libraries qcheck qcheck-stm.base)
2627
(preprocess (pps ppx_deriving.show ppx_deriving.eq)))
2728

2829
(executable
29-
(name ref_stm_seq_tests)
30-
(modules ref_stm_seq_tests)
31-
(libraries ref_stm_spec qcheck-stm.sequential))
30+
(name stm_tests_sequential_ref)
31+
(modules stm_tests_sequential_ref)
32+
(libraries stm_tests_spec_ref qcheck-stm.sequential))
3233

3334
(executable
34-
(name ref_stm_dom_tests)
35-
(modules ref_stm_dom_tests)
36-
(libraries ref_stm_spec qcheck-stm.domain))
35+
(name stm_tests_domain_ref)
36+
(modules stm_tests_domain_ref)
37+
(libraries stm_tests_spec_ref qcheck-stm.domain))
3738

3839
(executable
39-
(name ref_stm_thread_tests)
40-
(modules ref_stm_thread_tests)
41-
(libraries ref_stm_spec qcheck-stm.thread))
40+
(name stm_tests_thread_ref)
41+
(modules stm_tests_thread_ref)
42+
(libraries stm_tests_spec_ref qcheck-stm.thread))
4243

4344
(rule
4445
(alias runtest)
4546
(package multicoretests)
46-
(deps ref_stm_seq_tests.exe)
47+
(deps stm_tests_sequential_ref.exe)
4748
(action (run ./%{deps} --verbose)))
4849

4950
(rule
5051
(alias runtest)
5152
(package multicoretests)
52-
(deps ref_stm_dom_tests.exe)
53+
(deps stm_tests_domain_ref.exe)
5354
(action (run ./%{deps} --verbose)))
5455

5556
(rule
5657
(alias runtest)
5758
(package multicoretests)
58-
(deps ref_stm_thread_tests.exe)
59+
(deps stm_tests_thread_ref.exe)
5960
(action (run ./%{deps} --verbose)))
6061

6162
(library
6263
(name CList)
6364
(modules CList))
6465

6566
(executable
66-
(name conclist_stm_tests)
67-
(modules conclist_stm_tests)
67+
(name stm_tests_conclist)
68+
(modules stm_tests_conclist)
6869
(libraries CList qcheck-stm.sequential qcheck-stm.domain)
6970
(preprocess (pps ppx_deriving.show)))
7071

7172
(rule
7273
(alias runtest)
7374
(package multicoretests)
74-
(deps conclist_stm_tests.exe)
75+
(deps stm_tests_conclist.exe)
7576
(action (run ./%{deps} --verbose)))
7677

7778

7879
;; Linearizability tests of ref and Clist
7980

8081

8182
(library
82-
(name lin_tests_common_dsl)
83-
(modules lin_tests_common_dsl)
83+
(name lin_tests_dsl_common)
84+
(modules lin_tests_dsl_common)
8485
(libraries lin CList))
8586

8687
(library
@@ -90,62 +91,68 @@
9091
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq)))
9192

9293
(executables
93-
(names domain_lin_tests_dsl thread_lin_tests_dsl)
94-
(modules domain_lin_tests_dsl thread_lin_tests_dsl)
94+
(names lin_tests_dsl_domain lin_tests_dsl_thread)
95+
(modules lin_tests_dsl_domain lin_tests_dsl_thread)
9596
(flags (:standard -w -27))
96-
(libraries lin_tests_common_dsl))
97+
(libraries lin_tests_dsl_common))
9798

9899
(executable
99-
(name effect_lin_tests_dsl)
100-
(modules effect_lin_tests_dsl)
100+
(name lin_tests_dsl_effect)
101+
(modules lin_tests_dsl_effect)
101102
(flags (:standard -w -27))
102-
(libraries lin_tests_common_dsl))
103+
(libraries lin_tests_dsl_common))
103104

104105
(rule
105106
(alias runtest)
106107
(package multicoretests)
107-
(deps domain_lin_tests_dsl.exe)
108+
(deps lin_tests_dsl_domain.exe)
108109
(action (run ./%{deps} --verbose)))
109110

110111
; (rule
111112
; (alias runtest)
112113
; (package multicoretests)
113-
; (deps thread_lin_tests_dsl.exe)
114+
; (deps lin_tests_dsl_thread.exe)
114115
; (action (run ./%{deps} --verbose)))
115116

116117
(rule
117118
(alias runtest)
118119
(package multicoretests)
119-
(deps effect_lin_tests_dsl.exe)
120+
(deps lin_tests_dsl_effect.exe)
120121
(action (run ./%{deps} --verbose)))
121122

122123
(executables
123-
(names domain_lin_tests thread_lin_tests)
124-
(modules domain_lin_tests thread_lin_tests)
124+
(names lin_tests_domain lin_tests_thread_ref lin_tests_thread_conclist)
125+
(modules lin_tests_domain lin_tests_thread_ref lin_tests_thread_conclist)
125126
(flags (:standard -w -27))
126127
(libraries lin_tests_common))
127128

128129
(executable
129-
(name effect_lin_tests)
130-
(modules effect_lin_tests)
130+
(name lin_tests_effect)
131+
(modules lin_tests_effect)
131132
(flags (:standard -w -27))
132133
(libraries lin_tests_common)
133134
(preprocess (pps ppx_deriving.show ppx_deriving.eq)))
134135

135136
; (rule
136137
; (alias runtest)
137138
; (package multicoretests)
138-
; (deps domain_lin_tests.exe)
139+
; (deps lin_tests_domain.exe)
139140
; (action (run ./%{deps} --verbose)))
140141

141142
(rule
142143
(alias runtest)
143144
(package multicoretests)
144-
(deps thread_lin_tests.exe)
145+
(deps lin_tests_thread_ref.exe)
146+
(action (run ./%{deps} --verbose)))
147+
148+
(rule
149+
(alias runtest)
150+
(package multicoretests)
151+
(deps lin_tests_thread_conclist.exe)
145152
(action (run ./%{deps} --verbose)))
146153

147154
; (rule
148155
; (alias runtest)
149156
; (package multicoretests)
150-
; (deps effect_lin_tests.exe)
157+
; (deps lin_tests_effect.exe)
151158
; (action (run ./%{deps} --verbose)))
File renamed without changes.
File renamed without changes.

src/neg_tests/domain_lin_tests_dsl.ml renamed to src/neg_tests/lin_tests_dsl_domain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
open Lin_tests_common_dsl
1+
open Lin_tests_dsl_common
22

33
(** This is a driver of the negative tests over the Domain module *)
44

src/neg_tests/effect_lin_tests_dsl.ml renamed to src/neg_tests/lin_tests_dsl_effect.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
open Lin_tests_common_dsl
1+
open Lin_tests_dsl_common
22
open Lin_api
33

44
(** This is a driver of the negative tests over the Effect module *)

src/neg_tests/thread_lin_tests_dsl.ml renamed to src/neg_tests/lin_tests_dsl_thread.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
open Lin_tests_common_dsl
1+
open Lin_tests_dsl_common
22

33
(** This is a driver of the negative tests over the Thread module *)
44

File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
open Lin_tests_common
2+
3+
(** This is a driver of the negative CList tests over the Thread module *)
4+
5+
;;
6+
QCheck_base_runner.run_tests_main
7+
(let count = 1000 in
8+
[CLT_int.lin_test `Thread ~count ~name:"Lin CList int test with Thread"; (* unboxed, hence no allocations to trigger context switch *)
9+
CLT_int64.lin_test `Thread ~count ~name:"Lin CList int64 test with Thread"]) (* not triggering context switch, unfortunately *)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
open Lin_tests_common
2+
3+
(** This is a driver of the negative ref tests over the Thread module *)
4+
5+
;;
6+
if Sys.backend_type = Sys.Bytecode
7+
then
8+
Printf.printf "Lin ref tests with Thread disabled under bytecode\n\n%!"
9+
else
10+
QCheck_base_runner.run_tests_main
11+
(let count = 1000 in
12+
[RT_int.lin_test `Thread ~count ~name:"Lin ref int test with Thread"; (* unboxed, hence no allocations to trigger context switch *)
13+
RT_int64.neg_lin_test `Thread ~count:15000 ~name:"Lin ref int64 test with Thread"])

src/neg_tests/ref_stm_thread_tests.ml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)