Testing: Dynamic enablement/disablement of backends#225
Draft
kurtmcmillan wants to merge 12 commits intodevelopfrom
Draft
Testing: Dynamic enablement/disablement of backends#225kurtmcmillan wants to merge 12 commits intodevelopfrom
kurtmcmillan wants to merge 12 commits intodevelopfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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