Skip to content
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

Add Windows PV tools installer tests #262

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

dinhngtu
Copy link

@dinhngtu dinhngtu commented Nov 5, 2024

This PR adds tests for the new XCP-ng 9.x Windows PV Tools installer.
It tests various actions of the installer (install, uninstall, upgrade) under various conditions (with XCP-ng v8 tools, with Citrix tools, with Windows Update drivers, etc.)
It adds a dependency on 2 new ISO images, the structures of which are documented below:

guest-tools-win.iso
├───package
│   └───XenClean
│       └───x64
│           └───bin
└───testsign
other-guest-tools-win.iso
├───citrix-9.4.0
│   ├───XenBus
│   │   ├───x64
│   │   └───x86
│   ├───XenIface
│   │   ├───x64
│   │   └───x86
│   ├───XenNet
│   │   ├───x64
│   │   └───x86
│   ├───XenVbd
│   │   ├───x64
│   │   └───x86
│   └───XenVif
│       ├───x64
│       └───x86
├───xcp-ng-8.2.2.200
│   ├───xenbus
│   │   ├───x64
│   │   └───x86
│   ├───xeniface
│   │   ├───x64
│   │   └───x86
│   ├───xennet
│   │   ├───x64
│   │   └───x86
│   ├───xenvbd
│   │   ├───x64
│   │   └───x86
│   └───xenvif
│       ├───x64
│       └───x86
└───xcp-ng-9.0.9000
    ├───package
    │   └───XenClean
    │       └───x64
    │           └───bin
    └───testsign

I have run these tests on Windows Server 2016, 2019, 2022 and 2025. I used customized images with testsigning enabled.

Copy link
Member

@stormi stormi left a comment

Choose a reason for hiding this comment

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

This will be a nice addition to the tests. Here are my review comments.

jobs.py Show resolved Hide resolved
tests/guest-tools/win/__init__.py Outdated Show resolved Hide resolved
tests/guest-tools/win/__init__.py Outdated Show resolved Hide resolved
tests/guest-tools/win/__init__.py Outdated Show resolved Hide resolved
tests/guest-tools/win/__init__.py Outdated Show resolved Hide resolved
tests/guest-tools/win/test_guest_tools_win.py Outdated Show resolved Hide resolved
tests/guest-tools/win/test_guest_tools_win.py Outdated Show resolved Hide resolved
tests/guest-tools/win/test_guest_tools_win.py Outdated Show resolved Hide resolved
tests/guest-tools/win/test_guest_tools_win.py Outdated Show resolved Hide resolved
tests/guest-tools/win/test_guest_tools_win.py Outdated Show resolved Hide resolved
@dinhngtu dinhngtu force-pushed the tools-windows branch 2 times, most recently from 23f3981 to c71c263 Compare November 26, 2024 15:50
Copy link
Contributor

@benjamreis benjamreis left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@benjamreis benjamreis requested a review from stormi November 28, 2024 10:21
@dinhngtu
Copy link
Author

I'm doing some refactoring to make testing multiple guest tools/other tools versions a bit easier. Currently running final tests.

@dinhngtu dinhngtu force-pushed the tools-windows branch 2 times, most recently from 83d7e20 to 50e8dd4 Compare November 28, 2024 13:45
@dinhngtu
Copy link
Author

dinhngtu commented Nov 28, 2024

I've refactored the tests as following:

  • The ISO files of our test tools and other tools could be configured in data.py (see WIN_GUEST_TOOLS_ISOS and OTHER_GUEST_TOOLS_ISO).
  • Each ISO configuration now has a download parameter that lets the test use an included ISO file or download it from a HTTP location into a local ISO SR.
  • Each configuration in WIN_GUEST_TOOLS_ISOS specifies a ISO location, whether it requires testsigning, MSI file name, etc.
  • We can configure the contents of our other tools ISO file via OTHER_GUEST_TOOLS using a similar method.
  • All guest and other tools versions now share the same parameterized tests.
  • I've split guest-tools/win into several separate module files.
  • XenClean tests have been added.
  • The reinstall_early test has been removed due to changes in newer installers.
  • Some tests will only pass with the newest tools version built from source (due to xcp-ng/win-pv-drivers@b70bb37)

Copy link
Member

@stormi stormi left a comment

Choose a reason for hiding this comment

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

Looks good. Just a few minor comments.

I will delay my approval until we have setup the tests in our CI so that they run once merged on master.

lib/vm.py Outdated Show resolved Hide resolved
lib/vm.py Outdated Show resolved Hide resolved
data.py-dist Outdated Show resolved Hide resolved
jobs.py Outdated Show resolved Hide resolved
@dinhngtu dinhngtu force-pushed the tools-windows branch 2 times, most recently from dbb6877 to f7f0d97 Compare December 6, 2024 10:47
"tools-windows": {
"description": "tests our windows guest tools on a variety of VMs",
"requirements": [
"A pool >= 8.3. One host is enough.",
Copy link
Member

Choose a reason for hiding this comment

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

Does it work in 8.2?

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.

4 participants