Skip to content

Fix the package scope of xfs_sr_on_hostA2 and xfs_sr_on_hostB1 - #547

Merged
stormi merged 3 commits into
masterfrom
stormi/fix-xfs-fixture-scope
Jun 9, 2026
Merged

Fix the package scope of xfs_sr_on_hostA2 and xfs_sr_on_hostB1#547
stormi merged 3 commits into
masterfrom
stormi/fix-xfs-fixture-scope

Conversation

@stormi

@stormi stormi commented May 20, 2026

Copy link
Copy Markdown
Member

It's the same old pytest bug, that requires importing package-scoped fixtures in the package's own conftest.py for the scope to be properly applied.

This caused the fixture to be left alive across multiple packages that required it, closer to a session scope than to a package scope.

I moved the affected fixtures, as well as the other package-scoped fixtures they depend on, to pkgfixtures.py, a file dedicated to storing package-level fixtures (instead of conftest.py) so that we don't accidentally forget to import them before using them.

@stormi
stormi requested a review from glehmann May 20, 2026 23:46
@glehmann

Copy link
Copy Markdown
Member

Looks good to me.
Why are you expecting XFS and ZFS tests to save yum state twice?

@stormi

stormi commented May 21, 2026

Copy link
Copy Markdown
Member Author

Looks good to me. Why are you expecting XFS and ZFS tests to save yum state twice?

My mistake, I missed that it happens on separate hosts.

@glehmann
glehmann force-pushed the stormi/fix-xfs-fixture-scope branch from 2d25168 to 260c844 Compare May 22, 2026 15:43
@stormi
stormi force-pushed the stormi/fix-xfs-fixture-scope branch from 260c844 to eae4e4d Compare May 26, 2026 17:01
@glehmann

glehmann commented Jun 2, 2026

Copy link
Copy Markdown
Member

I tested a previous version of this PR in combination with #544 and #558.
Works like a charm :)

Could you rebase this PR and mark it as not draft?

stormi and others added 3 commits June 8, 2026 13:02
It's the same old pytest bug, that requires importing package-scoped
fixtures in the package's own conftest.py for the scope to be properly
applied.

This caused the fixture to be left alive across multiple packages that
required it, closer to a session scope than to a package scope.

Package-scoped fixtures moved to pkgfixtures.py and imported in each
relevant package's conftest.py.

Signed-off-by: Samuel Verschelde <stormi-xcp@ylix.fr>
This reverts commit e58c592.

Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
This reverts commit 178bd4c.

Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
@stormi
stormi force-pushed the stormi/fix-xfs-fixture-scope branch from eae4e4d to acf1a43 Compare June 8, 2026 11:03
@stormi
stormi marked this pull request as ready for review June 8, 2026 11:04
@stormi
stormi requested review from a team as code owners June 8, 2026 11:04
@stormi

stormi commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

This PR is now ready for review. CC @glehmann @xcp-ng/storage.

@stormi
stormi removed the request for review from a team June 8, 2026 11:05
@stormi stormi changed the title WIP: Fix the package scope of xfs_sr_on_hostA2 and xfs_sr_on_hostB1 Fix the package scope of xfs_sr_on_hostA2 and xfs_sr_on_hostB1 Jun 8, 2026
@stormi
stormi merged commit b9956a3 into master Jun 9, 2026
11 checks passed
@stormi
stormi deleted the stormi/fix-xfs-fixture-scope branch June 9, 2026 16:02
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