From 9b0d1a310c5d0718a620969a93c2816144850cea Mon Sep 17 00:00:00 2001 From: Jasper Berton Date: Tue, 24 Feb 2026 14:12:29 +0100 Subject: [PATCH 1/2] ci: Update fedora versions and align with other ovirt ci - Remove deprecated fedora 40 and add 42. - Update CI to align with how other workflows in oVirt are structured. Signed-off-by: Jasper Berton --- .github/workflows/ci.yml | 13 ++++++++----- .github/workflows/containers.yml | 2 +- containers/Makefile | 2 +- ...ora-40.containerfile => fedora-42.containerfile} | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) rename containers/{fedora-40.containerfile => fedora-42.containerfile} (96%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80373d60..f78ea4a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,11 @@ name: CI on: -- push -- pull_request + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: env: EXPORT_DIR: exported-artifacts jobs: @@ -22,10 +25,10 @@ jobs: env: py312 - distro: centos-10 env: py312 - - distro: fedora-40 - env: py312 - distro: fedora-41 env: py313 + - distro: fedora-42 + env: py313 container: image: quay.io/ovirt/ovirt-imageio-test:${{matrix.distro}} # Required to create loop devices. @@ -46,8 +49,8 @@ jobs: distro: - centos-9 - centos-10 - - fedora-40 - fedora-41 + - fedora-42 container: quay.io/ovirt/ovirt-imageio-test:${{matrix.distro}} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 81fda3c6..bae059f1 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro: [ centos-9, centos-10, fedora-40, fedora-41 ] + distro: [ centos-9, centos-10, fedora-41, fedora-42 ] steps: - uses: actions/checkout@v4 - name: Install dependencies diff --git a/containers/Makefile b/containers/Makefile index 511a27f2..677c0b08 100644 --- a/containers/Makefile +++ b/containers/Makefile @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later prefix := ovirt-imageio-test -targets := centos-9 centos-10 fedora-40 fedora-41 +targets := centos-9 centos-10 fedora-41 fedora-42 .PHONY: $(targets) push diff --git a/containers/fedora-40.containerfile b/containers/fedora-42.containerfile similarity index 96% rename from containers/fedora-40.containerfile rename to containers/fedora-42.containerfile index dc8924f9..43f2db63 100644 --- a/containers/fedora-40.containerfile +++ b/containers/fedora-42.containerfile @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Red Hat, Inc. # SPDX-License-Identifier: GPL-2.0-or-later -FROM registry.fedoraproject.org/fedora:40 +FROM registry.fedoraproject.org/fedora:42 # Runtime packages. RUN echo v1 \ From 0713fe7bd990eab6f6dcd3a73893acf9d1c15b62 Mon Sep 17 00:00:00 2001 From: Jasper Berton Date: Tue, 24 Feb 2026 14:14:38 +0100 Subject: [PATCH 2/2] test: Ensure pytest-timeout is available and skip qemu_nbd_test on centos - Skip test_block_device on CentOS due to the use pwrite_zeroes_alignment patch not being included on qemu-img, see https://gitlab.com/qemu-project/qemu/-/commit/d704a13d2c025779bc91d04e127427347ddcf3b3 for more information. - Ensure pytest-timeout is available during bench to avoid possible dependency errors. Signed-off-by: Jasper Berton --- test/qemu_nbd_test.py | 7 +++++++ test/testutil.py | 9 +++++++++ tox.ini | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test/qemu_nbd_test.py b/test/qemu_nbd_test.py index 2a4f2666..8b37786b 100644 --- a/test/qemu_nbd_test.py +++ b/test/qemu_nbd_test.py @@ -482,6 +482,13 @@ def test_block_signals(tmpdir): assert s.wait(0.2) is not None +@pytest.mark.skipif( + testutil.is_centos_9_or_10, + reason="Blocked until patch for qemu-img regarding" + "using pwrite_zeroes_alignment" + "when writing first sector is added to CentOS." + "see https://gitlab.com/qemu-project/qemu/-/commit/d704a13d", +) @pytest.mark.parametrize("fmt", ["raw", "qcow2"]) def test_block_device(tmpdir, user_block, fmt): qemu_img.create(user_block.path, fmt, size=1024**3) diff --git a/test/testutil.py b/test/testutil.py index 296be6bd..6b3310f6 100644 --- a/test/testutil.py +++ b/test/testutil.py @@ -68,3 +68,12 @@ def ipv6_enabled(): out = subprocess.check_output(["ip", "-6", "-j", "addr"]) addresses = json.loads(out) return len(addresses) > 0 + + +def is_centos_9_or_10(): + try: + with open("/etc/os-release") as f: + content = f.read() + return ("ID=\"centos\"" in content or "ID=centos" in content) + except OSError: + return False diff --git a/tox.ini b/tox.ini index bd12c300..eab70e02 100644 --- a/tox.ini +++ b/tox.ini @@ -19,8 +19,8 @@ deps = test,bench: pytest test,bench: userstorage>=0.5.3 test,bench: setuptools>=68.2.2 + test,bench: pytest-timeout test: pytest-cov - test: pytest-timeout commands_pre = # Since Python 3.12, setuptools is not installed by default. pip install setuptools>=68.2.2