Skip to content

test(fs-io): reproduce read_file exception for missing files - #15639

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-xqkzompxqqsv
Aug 1, 2026
Merged

rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-xqkzompxqqsv

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

Description

Add an inline expect test for Fs_io.read_file with a nonexistent path. The test documents the current behavior: Unix_error ENOENT is raised instead of being returned as an error result.

Related Issue and Motivation

This isolates the current behavior before a follow-up correction.

Checklist

  • Tests added.
  • Change log entry is not applicable to this test-only change.
  • Documentation is not applicable to this test-only change.

@rgrinberg
rgrinberg merged commit 7cfe029 into ocaml:main Aug 1, 2026
27 of 29 checks passed
rgrinberg added a commit that referenced this pull request Aug 1, 2026
`Fs_io.read_file` returns a result, but opening a nonexistent file
currently raises `Unix_error` instead of returning it. Catch Unix errors
around descriptor-based file access so callers receive `Error`
consistently.

This updates the regression expectation introduced in #15639.

Signed-off-by: Rudi Grinberg <[email protected]>
@Alizter Alizter added this to the 3.25.0 milestone Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants