rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.16k stars 318 forks source link

add tests for libc::read #3720

Open safinaskar opened 4 days ago

RalfJung commented 2 days ago

Thanks! Could you please add a PR description explaining the goal of the PR? We already have tests of the file system APIs and if read did not initialize the buffer they would obviously fail.

It would be nice to have some tests that check the libc APIs (open/read/write/close) directly, basically a libc version of src/shims/unix/fs.rs -- see https://github.com/rust-lang/miri/issues/3179. If that is the goal of this PR then the filename and test content should be adjusted accordingly. Specifically, this should be added in tests/pass-dep/shims/libc-fs.rs (after checking that none of the existing tests there already covers this).

safinaskar commented 2 days ago

@RalfJung , okay. I will remove draft status, when I'm done

RalfJung commented 2 days ago

I am not sure if that generates a notification... please write @rustbot ready when it is ready.

@rustbot author

safinaskar commented 2 days ago

@RalfJung , okay