Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Lin DSL test renaming #408

Merged
merged 23 commits into from
Nov 8, 2023
Merged
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ end
module HT = Lin_domain.Make(HashtblSig)
;;
QCheck_base_runner.run_tests_main [
HT.lin_test `Domain ~count:1000 ~name:"Hashtbl DSL test";
HT.lin_test `Domain ~count:1000 ~name:"Lin Hashtbl test";
]
```

Expand All @@ -178,11 +178,11 @@ framework then performs a search for a sequential interleaving of the
same calls, and succeeds if it finds one.

Since `Hashtbl`s are not safe for parallelism, if you run
`dune exec doc/example/lin_tests_dsl.exe` the output can produce the
`dune exec doc/example/lin_tests.exe` the output can produce the
following output, where each tested command is annotated with its result:
```

Messages for test Hashtbl DSL test:
Messages for test Lin Hashtbl test:

Results incompatible with sequential execution

Expand All @@ -205,7 +205,7 @@ the last call should return `2`:
let res2 = Hashtbl.length t;;
```

See [src/atomic/lin_tests_dsl.ml](src/atomic/lin_tests_dsl.ml) for
See [src/atomic/lin_tests.ml](src/atomic/lin_tests.ml) for
another example of testing the `Atomic` module.


Expand Down
4 changes: 2 additions & 2 deletions doc/example/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;; A linearization test of the stdlib Hashtbl library

(executable
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(libraries qcheck-lin.domain))


Expand Down
2 changes: 1 addition & 1 deletion doc/example/lin_tests_dsl.ml → doc/example/lin_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ end
module HT = Lin_domain.Make(HashtblSig)
;;
QCheck_base_runner.run_tests_main [
HT.lin_test ~count:1000 ~name:"Hashtbl DSL test";
HT.lin_test ~count:1000 ~name:"Lin Hashtbl test";
]
4 changes: 2 additions & 2 deletions doc/paper-examples/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;; A linearization test of the stdlib Hashtbl library

(executable
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(libraries qcheck-lin.domain))


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ end
module HT = Lin_domain.Make(HashtblSig)
;;
QCheck_base_runner.run_tests_main [
HT.lin_test ~count:1000 ~name:"Hashtbl DSL test";
HT.lin_test ~count:1000 ~name:"Lin Hashtbl test";
]
2 changes: 1 addition & 1 deletion dune
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

; To change the test to repeat, change the source of the `copy`:
(rule
(copy src/io/lin_tests_dsl_domain.exe focusedtest.exe))
(copy src/io/lin_tests_domain.exe focusedtest.exe))

(rule
(alias focusedtest)
Expand Down
32 changes: 21 additions & 11 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Tests utilizing the parallel STM.ml capability:
- [bytes/stm_tests.ml](bytes/stm_tests.ml) contains sequential and
parallel tests of the `Bytes` module

- [domain/stm_tests_dls.ml](domain/stm_tests_dls.ml) contains sequential and
parallel tests of the `Domain.DLS` module

- [ephemeron/stm_tests.ml](ephemeron/stm_tests.ml) contains sequential and
parallel tests of the `Ephemeron` module

Expand All @@ -44,30 +47,37 @@ Tests utilizing the parallel STM.ml capability:

Tests utilizing the linearization tests of Lin.ml:

- [array/lin_internal_tests.ml](array/lin_internal_tests.ml) and [array/lin_tests_dsl.ml](array/lin_tests_dsl.ml)
- [array/lin_internal_tests.ml](array/lin_internal_tests.ml) and [array/lin_tests.ml](array/lin_tests.ml)
contain experimental `Lin.Internal` and `Lin`-tests of `Array`

- [atomic/lin_internal_tests.ml](atomic/lin_internal_tests.ml) and [atomic/lin_tests_dsl.ml](atomic/lin_tests_dsl.ml)
- [atomic/lin_internal_tests.ml](atomic/lin_internal_tests.ml) and [atomic/lin_tests.ml](atomic/lin_tests.ml)
contain experimental `Lin.Internal` and `Lin`-tests of `Atomic`

- [bigarray/lin_tests_dsl.ml](bigarray/lin_tests_dsl.ml) contains experimental `Lin`-tests of `Bigarray`
- [bigarray/lin_tests.ml](bigarray/lin_tests.ml) contains experimental `Lin`-tests of `Bigarray`

- [bytes/lin_tests.ml](bytes/lin_tests.ml) contains experimental `Lin`-tests of `Bytes`

- [bytes/lin_tests_dsl.ml](bytes/lin_tests_dsl.ml) contains experimental `Lin`-tests of `Bytes`
- [domain/lin_tests_dls.ml](domain/lin_tests_dls.ml) contains experimental `Lin`-tests of `Domain.DLS`

- [dynlink/lin_tests_dsl.ml](dynlink/lin_tests_dsl.ml) contains experimental `Lin`-tests of `Dynlink`
- [dynlink/lin_tests.ml](dynlink/lin_tests.ml) contains experimental `Lin`-tests of `Dynlink`

- [floatarray/lin_tests_dsl.ml](floatarray/lin_tests_dsl.ml) contains experimental `Lin`-tests of `Float.Array`
- [floatarray/lin_tests.ml](floatarray/lin_tests.ml) contains experimental `Lin`-tests of `Float.Array`

- [hashtbl/lin_internal_tests.ml](hashtbl/lin_internal_tests.ml) and [hashtbl/lin_tests_dsl.ml](hashtbl/lin_tests_dsl.ml)
- [hashtbl/lin_internal_tests.ml](hashtbl/lin_internal_tests.ml) and [hashtbl/lin_tests.ml](hashtbl/lin_tests.ml)
contain experimental `Lin.Internal` and `Lin`-tests of `Hashtbl`

- [lazy/lin_internal_tests.ml](lazy/lin_internal_tests.ml) and [lazy/lin_tests_dsl.ml](lazy/lin_tests_dsl.ml)
- [io/lin_internal_tests.ml](hashtbl/lin_internal_tests.ml),
[io/lin_tests_domain.ml](io/lin_tests_domain.ml), and
[io/lin_tests_thread.ml](io/lin_tests_thread.ml) contain experimental
`Lin.Internal` and `Lin`-tests of `In_channel` and `Out_channel`

- [lazy/lin_internal_tests.ml](lazy/lin_internal_tests.ml) and [lazy/lin_tests.ml](lazy/lin_tests.ml)
contain experimental `Lin.Internal` and `Lin`-tests of `Lazy`

- [queue/lin_internal_tests.ml](queue/lin_internal_tests.ml) and [queue/lin_tests_dsl.ml](queue/lin_tests_dsl.ml)
- [queue/lin_internal_tests.ml](queue/lin_internal_tests.ml) and [queue/lin_tests.ml](queue/lin_tests.ml)
contain experimental `Lin.Internal` and `Lin`-tests of `Queue`

- [stack/lin_internal_tests.ml](stack/lin_internal_tests.ml) and [stack/lin_tests_dsl.ml](stack/lin_tests_dsl.ml)
- [stack/lin_internal_tests.ml](stack/lin_internal_tests.ml) and [stack/lin_tests.ml](stack/lin_tests.ml)
contain experimental `Lin.Internal` and `Lin`-tests of `Stack`


Expand Down Expand Up @@ -97,7 +107,7 @@ check).

For `Lin.Internal` and `Lin`
- [neg_tests/lin_internal_tests_common.ml](neg_tests/lin_internal_tests_common.ml) and
- [neg_tests/lin_tests_dsl_common.ml](neg_tests/lin_tests_dsl_common.ml)
- [neg_tests/lin_tests_common.ml](neg_tests/lin_tests_common.ml)

contain "sanity check tests" for an unprotected global `ref` and a
buggy concurrent list over unboxed `int` and boxed `int64` types.
Expand Down
4 changes: 2 additions & 2 deletions src/array/dune
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
Expand Down
2 changes: 1 addition & 1 deletion src/array/lin_tests_dsl.ml → src/array/lin_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ end
module AT_domain = Lin_domain.Make(AConf)
;;
QCheck_base_runner.run_tests_main [
AT_domain.neg_lin_test ~count:1000 ~name:"Lin DSL Array test with Domain";
AT_domain.neg_lin_test ~count:1000 ~name:"Lin Array test with Domain";
]
4 changes: 2 additions & 2 deletions src/atomic/dune
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
Expand Down
2 changes: 1 addition & 1 deletion src/atomic/lin_tests_dsl.ml → src/atomic/lin_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ module Lin_atomic_domain = Lin_domain.Make (Atomic_spec)

let () =
QCheck_base_runner.run_tests_main
[ Lin_atomic_domain.lin_test ~count:1000 ~name:"Lin DSL Atomic test with Domain";
[ Lin_atomic_domain.lin_test ~count:1000 ~name:"Lin Atomic test with Domain";
]
4 changes: 2 additions & 2 deletions src/bigarray/dune
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ module BA1T = Lin_domain.Make(BA1Conf)

let _ =
QCheck_base_runner.run_tests_main [
BA1T.neg_lin_test ~count:5000 ~name:"Lin DSL Bigarray.Array1 (of ints) test with Domain";
BA1T.neg_lin_test ~count:5000 ~name:"Lin Bigarray.Array1 (of ints) test with Domain";
]
4 changes: 2 additions & 2 deletions src/bytes/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain qcheck-lin.thread)
(action (run %{test} --verbose))
Expand Down
4 changes: 2 additions & 2 deletions src/bytes/lin_tests_dsl.ml → src/bytes/lin_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ module BT_domain = Lin_domain.Make(BConf)
module BT_thread = Lin_thread.Make(BConf) [@alert "-experimental"]
;;
QCheck_base_runner.run_tests_main [
BT_domain.lin_test ~count:1000 ~name:"Lin DSL Bytes test with Domain";
BT_thread.lin_test ~count:1000 ~name:"Lin DSL Bytes test with Thread";
BT_domain.lin_test ~count:1000 ~name:"Lin Bytes test with Domain";
BT_thread.lin_test ~count:1000 ~name:"Lin Bytes test with Thread";
]
8 changes: 4 additions & 4 deletions src/domain/dune
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
)

(test
(name lin_tests_dsl_dls)
(modules lin_tests_dsl_dls)
(name lin_tests_dls)
(modules lin_tests_dls)
(package multicoretests)
(libraries qcheck-lin.domain)
; (action (run %{test} --verbose))
(action (echo "Skipping src/domain/%{test} from the test suite\n\n"))
)

(test
(name stm_tests_dsl_dls)
(modules stm_tests_dsl_dls)
(name stm_tests_dls)
(modules stm_tests_dls)
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(action (run %{test} --verbose))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ module DLST = Lin_domain.Make (struct
(*
let _ =
Domain.join (Domain.spawn (fun () -> QCheck_base_runner.run_tests ~verbose:true
[DLSN.neg_lin_test ~count:100 ~name:"Lin DSL Domain.DLS negative test with Domain"]))
[DLSN.neg_lin_test ~count:100 ~name:"Lin Domain.DLS negative test with Domain"]))
let _ =
Domain.join (Domain.spawn (fun () -> QCheck_base_runner.run_tests ~verbose:true
[DLST.lin_test ~count:75 ~name:"Lin DSL Domain.DLS test with Domain"]))
[DLST.lin_test ~count:75 ~name:"Lin Domain.DLS test with Domain"]))
*)
QCheck_base_runner.run_tests_main [
DLSN.neg_lin_test ~count:100 ~name:"Lin DSL Domain.DLS negative test with Domain";
DLST.lin_test ~count:75 ~name:"Lin DSL Domain.DLS test with Domain";
DLSN.neg_lin_test ~count:100 ~name:"Lin Domain.DLS negative test with Domain";
DLST.lin_test ~count:75 ~name:"Lin Domain.DLS test with Domain";
]

File renamed without changes.
4 changes: 2 additions & 2 deletions src/dynlink/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain dynlink libA libB)
(action (run %{test} --verbose))
Expand Down
4 changes: 2 additions & 2 deletions src/dynlink/lin_tests_dsl.ml → src/dynlink/lin_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module DynT = Lin_domain.Make(DynConf)

let _ =
if Sys.win32 then
Printf.printf "negative Lin DSL Dynlink test with Domain disabled under Windows\n\n%!"
Printf.printf "negative Lin Dynlink test with Domain disabled under Windows\n\n%!"
else
QCheck_base_runner.run_tests_main [
DynT.neg_lin_test ~count:100 ~name:"negative Lin DSL Dynlink test with Domain";
DynT.neg_lin_test ~count:100 ~name:"negative Lin Dynlink test with Domain";
]
4 changes: 2 additions & 2 deletions src/floatarray/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ module FAT = Lin_domain.Make(FAConf)

let _ =
QCheck_base_runner.run_tests_main [
FAT.neg_lin_test ~count:1000 ~name:"Lin DSL Float.Array test with Domain";
FAT.neg_lin_test ~count:1000 ~name:"Lin Float.Array test with Domain";
]
4 changes: 2 additions & 2 deletions src/hashtbl/dune
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
Expand Down
2 changes: 1 addition & 1 deletion src/hashtbl/lin_tests_dsl.ml → src/hashtbl/lin_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ end
module HT_domain = Lin_domain.Make(HConf)
;;
QCheck_base_runner.run_tests_main [
HT_domain.neg_lin_test ~count:1000 ~name:"Lin DSL Hashtbl test with Domain";
HT_domain.neg_lin_test ~count:1000 ~name:"Lin Hashtbl test with Domain";
]
8 changes: 4 additions & 4 deletions src/io/dune
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
)

(test
(name lin_tests_dsl_domain)
(modules lin_tests_dsl_domain)
(name lin_tests_domain)
(modules lin_tests_domain)
(package multicoretests)
;(flags (:standard -w -27))
(libraries qcheck-lin.domain lin_tests_spec_io)
Expand All @@ -29,8 +29,8 @@
)

(test
(name lin_tests_dsl_thread)
(modules lin_tests_dsl_thread)
(name lin_tests_thread)
(modules lin_tests_thread)
(package multicoretests)
;(flags (:standard -w -27))
(libraries qcheck-lin.thread lin_tests_spec_io)
Expand Down
2 changes: 1 addition & 1 deletion src/io/lin_internal_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module Out_channel_ops = struct
let equal_res = (=)

let init () =
let p,ch = Filename.open_temp_file "lin-dsl-" "" in
let p,ch = Filename.open_temp_file "lin-internal-" "" in
path := p;
ch

Expand Down
6 changes: 3 additions & 3 deletions src/io/lin_tests_dsl_domain.ml → src/io/lin_tests_domain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ module IC_domain = Lin_domain.Make(Lin_tests_spec_io.ICConf)
module OC_domain = Lin_domain.Make(Lin_tests_spec_io.OCConf)

let tests =
IC_domain.neg_lin_test ~count:1000 ~name:"Lin DSL In_channel test with Domain" ::
IC_domain.neg_lin_test ~count:1000 ~name:"Lin In_channel test with Domain" ::
if Sys.getenv_opt "OCAML_SYSTEM" = Some "macosx"
then (
Printf.printf "Lin DSL Out_channel test with Domain disabled under macOS\n\n%!";
Printf.printf "Lin Out_channel test with Domain disabled under macOS\n\n%!";
[]
) else [
OC_domain.neg_lin_test ~count:5000 ~name:"Lin DSL Out_channel test with Domain";
OC_domain.neg_lin_test ~count:5000 ~name:"Lin Out_channel test with Domain";
]

let _ = QCheck_base_runner.run_tests_main tests
2 changes: 1 addition & 1 deletion src/io/lin_tests_spec_io.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module OCConf : Lin.Spec = struct
let path = ref ""

let init () =
let p,ch = Filename.open_temp_file "lin-dsl-" "" in
let p,ch = Filename.open_temp_file "lin-" "" in
path := p;
ch

Expand Down
4 changes: 2 additions & 2 deletions src/io/lin_tests_dsl_thread.ml → src/io/lin_tests_thread.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ module OC_thread = Lin_thread.Make(Lin_tests_spec_io.OCConf) [@@alert "-experime

let _ =
QCheck_base_runner.run_tests_main [
IC_thread.neg_lin_test ~count:1000 ~name:"Lin DSL In_channel test with Thread";
OC_thread.neg_lin_test ~count:1000 ~name:"Lin DSL Out_channel test with Thread";
IC_thread.neg_lin_test ~count:1000 ~name:"Lin In_channel test with Thread";
OC_thread.neg_lin_test ~count:1000 ~name:"Lin Out_channel test with Thread";
]
4 changes: 2 additions & 2 deletions src/lazy/dune
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(libraries qcheck-lin.domain)
; (action (run %{test} --verbose))
Expand Down
Loading
Loading