ocaml-multicore / multicoretests

PBT testsuite and libraries for testing multicore OCaml
https://ocaml-multicore.github.io/multicoretests/
BSD 2-Clause "Simplified" License
37 stars 16 forks source link

[ocaml5-issue] Output to closed Out_channel fails to raise Sys_error #432

Closed jmid closed 5 months ago

jmid commented 8 months ago

The revised Out_channel STM test in #431 revealed a regression on 5.2 and trunk/5.3 where a second output call no longer raises an exception:

Messages for test STM Out_channel test sequential:

  Results incompatible with model

   Close_noerr : Ok (())
   Output_string "\177q\183z" : Error (Sys_error("Bad file descriptor"))
   Output_string "\127\165\243\019\171\015c\031\003" : Ok (())

The issue is not limited to output_string. The other output operations output_byte, output_char, ... are also affected.

This has been reported upstream in https://github.com/ocaml/ocaml/issues/12898

jmid commented 8 months ago

An output following a seek is also affected: https://ocaml-multicoretests.ci.dev:8100/job/2024-01-12/133422-ci-ocluster-build-389bbf

Messages for test STM Out_channel test sequential:

  Results incompatible with model

   Close : Ok (())
   Seek 2L : Error (Sys_error("Bad file descriptor"))
   Output_string "Q\167\017" : Ok (())
jmid commented 5 months ago

Closing as this has been fixed upstream in ocaml/ocaml#12678 and included in 5.2.0~beta1