Skip to content

quicktest: split tests into SR specific and common ones - #665

Open
gthvn1 wants to merge 1 commit into
masterfrom
gtn-split-quicktest
Open

quicktest: split tests into SR specific and common ones#665
gthvn1 wants to merge 1 commit into
masterfrom
gtn-split-quicktest

Conversation

@gthvn1

@gthvn1 gthvn1 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Currently we are calling quicktest for all SRs. The problem is that it takes long time to run and some tests are not related to the type of the SR. This patch creates one new test that runs the common suites one, and we only run SR specific tests per SR.

@gthvn1

gthvn1 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

I'm currently testing it on my lab (that is why it is a draft).

Comment thread lib/sr.py
@gthvn1
gthvn1 force-pushed the gtn-split-quicktest branch from de11940 to ff851c8 Compare August 13, 2026 14:56
@gthvn1

gthvn1 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

I just pushed code for compatibility between versions of quicktest to show what I meant.

@gthvn1

gthvn1 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

And there is a PR to add -sr-only and -common-only parameters: xapi-project/xen-api#7227
Note: This PR is for the master (our base for 9.0). The code is a little bit different for lcm (our base for 8.3) so if we need it we will need to provide another patch (easy but just to let you know).

@gthvn1
gthvn1 force-pushed the gtn-split-quicktest branch from ff851c8 to 8ce9c22 Compare August 25, 2026 12:06
@gthvn1

gthvn1 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

xapi-project/xen-api#7227 has been merged. However, after review, a more generic mechanism was introduced in Quicktest that allows us to use tags. So to run tests that depend on -sr, you can now use -with-tag sr.

I have updated the PR accordingly. Note that this is currently only merged upstream (not in 8.3). However, the current patch selects specific tests using -run-only if the new option is unavailable. Also note that older Quicktest versions (such as those in 8.2) do not support -run-only, so there is a fallback that runs all tests except test_quicktest_common if no options are available.

@stormi

stormi commented Aug 25, 2026

Copy link
Copy Markdown
Member

@gthvn1 It's still a draft, and re-view was not re-requested. Is that on purpose?

@gthvn1

gthvn1 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@stormi , yes I was waiting a week to be sure that it passes the Citrix CI upstream and it is not reverted before asking new reviews.

@gthvn1
gthvn1 marked this pull request as ready for review September 1, 2026 14:56
@gthvn1
gthvn1 requested review from a team as code owners September 1, 2026 14:56
@gthvn1

gthvn1 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

PRs are merged in master and lcm. It will be in our 8.3 when we will rebase 26.1.22. So let's review it.

@glehmann glehmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A comment or commit description about which XCP-ng or xapi version is supposed to go to which scoping path would probably be useful in the future, when we'll stop supporting the older versions, and we'll want to remove the scoping mechanism

Comment thread lib/sr.py
NO_PARAM = enum.auto()

@functools.lru_cache(maxsize=None)
def _quicktest_scoping(hostname_or_ip: str) -> QuicktestScoping:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: the host can be passed directly as a parameter and used as host.ssh(…)

@Wescoeur Wescoeur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just regarding commit title: QT is redundant with quicktest. Also is it a common acronym? Otherwise I have the impression that we are talking about qt5 or qt6 when reading this word. 😅

Regarding the code: nothing to add.

@gthvn1

gthvn1 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

I will change the QT. It is an acronym but yes it depends on your background :)

@gthvn1
gthvn1 force-pushed the gtn-split-quicktest branch from 8ce9c22 to e0b45a0 Compare September 2, 2026 15:36
@gthvn1 gthvn1 changed the title quicktest: split QT into SR specific and common suites quicktest: split tests into SR specific and common ones Sep 2, 2026
Currently we are calling quicktest for all SRs. The problem is that it
takes long time to run and some tests are not related to the type of the
SR. This patch creates one new test that runs the common suites one,
and we only run SR specific tests per SR.

A new option has been added to Quicktest (-list-tags/-with-tags) that
allows to select tests. _quicktest_scoping() detects which the target
host supports and picks accordingly.

This option should be available in XAPI 26.18.0 for master and 26.1.23
for lcm.

Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@vates.tech>
@gthvn1
gthvn1 force-pushed the gtn-split-quicktest branch from e0b45a0 to 1699f2b Compare September 2, 2026 15:39
@gthvn1

gthvn1 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

A comment or commit description about which XCP-ng or xapi version is supposed to go

I have updated the commit message with both versions, XAPI master and lcm.

@gthvn1
gthvn1 requested a review from Wescoeur September 2, 2026 15:44
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.

5 participants