Skip to content

Commit

Permalink
Merge pull request #441 from ocaml-multicore/reenable-closed-outch-er…
Browse files Browse the repository at this point in the history
…ror-check

Revert temporary acceptance in STM Out_channel test
  • Loading branch information
jmid authored Mar 27, 2024
2 parents 166b4a8 + 9b2593c commit 6d719d1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,13 @@ property can be done in two different ways:
Issues
======

Regression causing a Cygwin configure to fail (new, fixed, configure)
---------------------------------------------------------------------

A configure PR accidentally [introduced a regression causing a flexlink test to
fail for a Cygwin build](https://github.com/ocaml/ocaml/pull/13009)


Crash and hangs on MinGW (new, fixed, runtime)
----------------------------------------------

Expand Down
24 changes: 12 additions & 12 deletions src/io/stm_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -286,39 +286,39 @@ struct
| _ -> false)
| Output_char _c, Res ((Result (Unit,Exn),_), r) ->
(match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
| Closed, (Ok () | Error (Sys_error _)) -> true (* FIXME: temporarily accept Ok on closed channel *)
| Closed, Error (Sys_error _) -> true
| Open _, Ok () -> true
| _ -> false)
| Output_byte _i, Res ((Result (Unit,Exn),_), r) ->
(match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
| Closed, (Ok () | Error (Sys_error _)) -> true (* FIXME: temporarily accept Ok on closed channel *)
| Closed, Error (Sys_error _) -> true
| Open _, Ok () -> true
| _ -> false)
| Output_string _str, Res ((Result (Unit,Exn),_), r) ->
| Output_string str, Res ((Result (Unit,Exn),_), r) ->
(match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
| Closed, (Ok () | Error (Sys_error _)) -> true (* FIXME: temporarily accept Ok on closed channel *)
(*| Closed, Ok () -> str = ""*) (* accepting this is actually against the above spec *)
| Closed, Error (Sys_error _) -> true
| Closed, Ok () -> str = "" (* accepting this is actually against the above spec *)
| Open _, Ok () -> true
| _ -> false)
| Output_bytes _b, Res ((Result (Unit,Exn),_), r) ->
| Output_bytes b, Res ((Result (Unit,Exn),_), r) ->
(match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
| Closed, (Ok () | Error (Sys_error _)) -> true (* FIXME: temporarily accept Ok on closed channel *)
(*| Closed, Ok () -> b = Bytes.empty*) (* accepting this is actually against the above spec *)
| Closed, Error (Sys_error _) -> true
| Closed, Ok () -> b = Bytes.empty (* accepting this is actually against the above spec *)
| Open _, Ok () -> true
| _ -> false)
| Output (b,p,l), Res ((Result (Unit,Exn),_), r) ->
(match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
| Closed, (Ok () | Error (Sys_error _)) -> true (* FIXME: temporarily accept Ok on closed channel *)
(*| Closed, Ok () -> l = 0*) (* accepting this is actually against the above spec *)
| Closed, Error (Sys_error _) -> true
| Closed, Ok () -> l = 0 (* accepting this is actually against the above spec *)
| Open _, Ok () -> true
| (Open _|Closed), Error (Invalid_argument _) -> (*"output"*)
let bytes_len = Bytes.length b in
p < 0 || p >= bytes_len || l < 0 || p+l > bytes_len
| _, _ -> false)
| Output_substring (str,p,l), Res ((Result (Unit,Exn),_), r) ->
(match s,r with (* "Output functions raise a Sys_error exception when [...] applied to a closed output channel" *)
| Closed, (Ok () | Error (Sys_error _)) -> true (* FIXME: temporarily accept Ok on closed channel *)
(*| Closed, Ok () -> l = 0*) (* accepting this is actually against the above spec *)
| Closed, Error (Sys_error _) -> true
| Closed, Ok () -> l = 0 (* accepting this is actually against the above spec *)
| Open _, Ok () -> true
| (Open _|Closed), Error (Invalid_argument _) -> (*"output_substring"*)
let str_len = String.length str in
Expand Down

0 comments on commit 6d719d1

Please sign in to comment.