Skip to content

rocfile: Untangle rocFileIo(...) and Fallback backend tests.#88

Merged
derobins merged 25 commits into
developfrom
z/kumcmill/move-rocfileio-tests
Nov 26, 2025
Merged

rocfile: Untangle rocFileIo(...) and Fallback backend tests.#88
derobins merged 25 commits into
developfrom
z/kumcmill/move-rocfileio-tests

Conversation

@kurtmcmillan
Copy link
Copy Markdown
Collaborator

No description provided.

When a client issues an IO with an unregistered buffer, a temporary buffer
object is created. This test ensures the correct error value is returned if the
creation of the temporary buffer object throws a Hip::RuntimeError.
Ensure that rocFileIo returns the correct return value if a client issues an IO
with an unregistered buffer with an unsupported memory type.
RocFileFallbackValidation::fallback_io_throws_on_bounce_buffer_allocation_failure
ensures a Sys::RuntimeError is thrown on mmap failure.

RocFileWrite::fallback_write_throws_on_pwrite_exception ensures Fallback::io
throws on pwrite error.

RocFileRead::fallback_read_throws_on_pread_exception ensures Fallback::io
throws on pread error.
If the Fallback backend is the only backend available ensure that zero sized
IOs are passed through to pread/pwrite.
Backends should test for invalid arguments and throw std::invalid_argument.
RocFileWrite::fallback_write_throws_on_hipmemcpy_failure,
RocFileWrite::fallback_write_throws_on_hipstreamsynchronize_error, and
RocFileRead::fallback_read_throws_on_hipmemcpy_failure ensure Fallback::io
throws Hip::RuntimeError if the coresponding HIP call throws.
Moving these tests to test/rocfile.cpp as test/io.cpp will be moved to
test/fallback.cpp in a future commit.
This test is covered by FallbackWrite::fallback_write_overwite_entire_file.
@kurtmcmillan kurtmcmillan force-pushed the z/kumcmill/move-rocfileio-tests branch from c6bf2b8 to 22b8518 Compare November 24, 2025 22:45
@kurtmcmillan kurtmcmillan self-assigned this Nov 24, 2025
@kurtmcmillan kurtmcmillan marked this pull request as ready for review November 24, 2025 22:56
Comment thread rocfile/test/rocfile.cpp Outdated
Copy link
Copy Markdown
Collaborator

@riley-dixon riley-dixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only thing I could comment on is whether we should update the test names in rocfile/test/fallback.cpp from snake_case to UpperCamelCase to align with GTest recommendations, but not really a huge deal.

@derobins derobins merged commit a6c3390 into develop Nov 26, 2025
32 checks passed
@derobins derobins deleted the z/kumcmill/move-rocfileio-tests branch November 26, 2025 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants