-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
env_process: Tested package version check refactoring #4039
base: master
Are you sure you want to change the base?
env_process: Tested package version check refactoring #4039
Conversation
This is part of a larger patch series that will refactor env_process preprocess steps that verify tested package versions. In this patch, version_info is made a global variable of test_setup.requirement_checks so it is available in the scope in which package version checks are going to be rewritten. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
KVM (kernel) version is checked and compared to the required version, if there's one. That was done in the preprocess and postprocess functions in virttest.env_process. Write a Setuper subclass that implements that in the setup method and register the setuper in the env_process setup_manager. This is a patch from a larger patch series refactoring the env_process preprocess and postprocess functions. In each of these patches, a pre/post process step is identified and replaced with a Setuper subclass so the following can finally be met: - Only cleanup steps of successful setup steps are run to avoid possible environment corruption or hard to read errors. - Running setup/cleanup steps symmetrically during env pre/post process. - Reduce explicit pre/post process function code length. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
QEMU version is checked and compared to the required version, if there's one. That was done in the preprocess and postprocess functions in virttest.env_process. Write a Setuper subclass that implements that in the setup method and register the setuper in the env_process setup_manager. This is a patch from a larger patch series refactoring the env_process preprocess and postprocess functions. In each of these patches, a pre/post process step is identified and replaced with a Setuper subclass so the following can finally be met: - Only cleanup steps of successful setup steps are run to avoid possible environment corruption or hard to read errors. - Running setup/cleanup steps symmetrically during env pre/post process. - Reduce explicit pre/post process function code length. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
Bootloader version is checked and logged into the package version dict, That was done in the preprocess and postprocess functions in virttest.env_process. Write a Setuper subclass that implements that in the setup method and register the setuper in the env_process setup_manager. This is a patch from a larger patch series refactoring the env_process preprocess and postprocess functions. In each of these patches, a pre/post process step is identified and replaced with a Setuper subclass so the following can finally be met: - Only cleanup steps of successful setup steps are run to avoid possible environment corruption or hard to read errors. - Running setup/cleanup steps symmetrically during env pre/post process. - Reduce explicit pre/post process function code length. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
virtio_win version is checked and compared to the required version, if there's one. That was done in the preprocess and postprocess functions in virttest.env_process. Write a Setuper subclass that implements that in the setup method and register the setuper in the env_process setup_manager. This is a patch from a larger patch series refactoring the env_process preprocess and postprocess functions. In each of these patches, a pre/post process step is identified and replaced with a Setuper subclass so the following can finally be met: - Only cleanup steps of successful setup steps are run to avoid possible environment corruption or hard to read errors. - Running setup/cleanup steps symmetrically during env pre/post process. - Reduce explicit pre/post process function code length. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
libvirt version is checked and compared to the required version, if there's one. That was done in the preprocess and postprocess functions in virttest.env_process. Write a Setuper subclass that implements that in the setup method and register the setuper in the env_process setup_manager. This is a patch from a larger patch series refactoring the env_process preprocess and postprocess functions. In each of these patches, a pre/post process step is identified and replaced with a Setuper subclass so the following can finally be met: - Only cleanup steps of successful setup steps are run to avoid possible environment corruption or hard to read errors. - Running setup/cleanup steps symmetrically during env pre/post process. - Reduce explicit pre/post process function code length. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
After checking all test-relevant package versions, the dict carrying the information must be logged into the test data. That was done in the preprocess and postprocess functions in virttest.env_process. Write a Setuper subclass that implements that in the setup method and register the setuper in the env_process setup_manager. While on it, remove the requirement_checks import from env_process as all steps are now refactored into Setupers in requirement_checks. This is a patch from a larger patch series refactoring the env_process preprocess and postprocess functions. In each of these patches, a pre/post process step is identified and replaced with a Setuper subclass so the following can finally be met: - Only cleanup steps of successful setup steps are run to avoid possible environment corruption or hard to read errors. - Running setup/cleanup steps symmetrically during env pre/post process. - Reduce explicit pre/post process function code length. Signed-off-by: Beñat Gartzia Arruabarrena <bgartzia@redhat.com>
ba7ced3
to
6ea7c8f
Compare
Hey @YongxueHong, this one is larger than usual. As mentioned, it was so as not to change the public However, I pushed a new version (which results in the same code) that doesn't really change the API of If you'd prefer, I could split the PR into a bunch of them instead as usual. Just let me know. |
Hi @bgartzi |
Another bunch of patches regarding the
env_process
preprocess
andpostprocess
functionr refactoring patch series. In this one, those steps related to extracting, logging and checking required package versions are refactored.I usually send 1 patch per PR. However, I'm sending a bunch of them together this time. This is due to the
version_info
, a variable that lived inside thepreprocess
function and that most of the version-check related steps used. I'm doing so not to modify the public API of theenv_process
submodule.First
version_info
is made a global variable of the submodule, so both steps inside thepreprocess
and those being refactored can access it. Once all have been written intoSetuper
s, then theversion_info
variable is also migrated to thevirttest.test_setup.requirement_checks
submodule.