Skip to content

Testing: Dynamic enablement/disablement of backends#225

Draft
kurtmcmillan wants to merge 12 commits intodevelopfrom
kumcmill/override-backend-enable
Draft

Testing: Dynamic enablement/disablement of backends#225
kurtmcmillan wants to merge 12 commits intodevelopfrom
kumcmill/override-backend-enable

Conversation

@kurtmcmillan
Copy link
Collaborator

@kurtmcmillan kurtmcmillan commented Mar 18, 2026

Motivation

Tests sometimes want to test a specific backend. Before this change backends were enabled by default and disabled using environment variables. Once the environment variables were parsed and the backends instantiated there was no way to modify which backends were enabled.

With this change all backends are always instantiated. Each backend checks its enablement when scoring and performing IO. Functions have been added to allow tests to dynamically change the enablement of each backend.

AIHIPFILE-157

This will make it easier to add tests when fallback scoring is updated to test
for fallback enablement.
Clone async tests to improve the name of test variants.

Before:
    HipFileIo.ReadToUnregisteredBufferAtOffset/4-byte object <00-00 00-00>
    HipFileIo.ReadToUnregisteredBufferAtOffset/4-byte object <01-00 00-00>

After:
    HipFileIo.ReadToUnregisteredBufferAtOffset/Fastpath
    HipFileIo.ReadToUnregisteredBufferAtOffset/Fallback
Backends now check for enablement when they score IO. If a backend is disabled
it will not accept IO.

Backends can be enabled/disabled at runtime. This was done for testing
purposes. To fully support this functionality all backends need to be
instantiated.
@kurtmcmillan kurtmcmillan self-assigned this Mar 18, 2026
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.

1 participant