Skip to content

env_process: Refactor EGD setup #4090

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgartzi
Copy link
Contributor

@bgartzi bgartzi commented Mar 21, 2025

Replace the steps setting and cleaning EGD up into a Setuper that is registered into the setup_manager in env_process.

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.

This patch shouldn't introduce any regression or breaking change.
With --testcase=boot --rng_type=virtio_rng.rng_egd:

 (1/1) Host_RHEL.m9.u5.ovmf.virtio_rng.rng_egd.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.x86_64.io-github-autotest-qemu.boot.q35: STARTED
 (1/1) Host_RHEL.m9.u5.ovmf.virtio_rng.rng_egd.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.x86_64.io-github-autotest-qemu.boot.q35:  PASS (73.16 s)

ID: 2941

Replace the steps setting and cleaning EGD up into a Setuper that is
registered into the setup_manager in env_process.

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 <[email protected]>
@bgartzi
Copy link
Contributor Author

bgartzi commented Mar 21, 2025

@YongxueHong, yet another one. I'd also appreciate it if @ybduan could have a look into this.

Thanks a lot :)

Copy link
Contributor

@YongxueHong YongxueHong left a comment

Choose a reason for hiding this comment

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

LGTM.

@YongxueHong
Copy link
Contributor

@YongxueHong, yet another one. I'd also appreciate it if @ybduan could have a look into this.

Thanks a lot :)

Hi @ybduan
Could you help to review it? Thanks a lot.

@richtja
Copy link
Contributor

richtja commented Apr 29, 2025

Hi @ybduan, gentle ping here.

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.

3 participants