Skip to content

Don't consider Sys STM tests negative on ARM64 #361

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

Merged
merged 1 commit into from
Jun 7, 2023
Merged
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
10 changes: 7 additions & 3 deletions src/sys/stm_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -314,19 +314,23 @@ struct
| _,_ -> false
end

let uname_os () =
let ic = Unix.open_process_in "uname -s" in
let run_cmd cmd =
let ic = Unix.open_process_in cmd in
let os = In_channel.input_line ic in
ignore (Unix.close_process_in ic);
os

let uname_os () = run_cmd "uname -s"

let arch () = run_cmd "opam var arch"

module Sys_seq = STM_sequential.Make(SConf)
module Sys_dom = STM_domain.Make(SConf)

;;
QCheck_base_runner.run_tests_main [
Sys_seq.agree_test ~count:1000 ~name:"STM Sys test sequential";
if Sys.unix && uname_os () = Some "Linux"
if Sys.unix && (uname_os () = Some "Linux" || arch () = Some "arm64")
then Sys_dom.agree_test_par ~count:200 ~name:"STM Sys test parallel"
else Sys_dom.neg_agree_test_par ~count:1000 ~name:"STM Sys test parallel"
]