tests: Try waiting after partition creation for XFS resize test

Resolves: RHEL-8009
This commit is contained in:
Vojtech Trefny 2024-06-27 14:28:49 +02:00
parent 21cc68be15
commit ca67ba9f4a
2 changed files with 67 additions and 1 deletions

View File

@ -0,0 +1,61 @@
From 5bd9eee844859f5cd5d9f4f1c8915dab931de12b Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 18 Jun 2024 14:47:39 +0200
Subject: [PATCH 1/2] tests: Try waiting after partition creation for XFS
resize test
The test randomly fails to find the newly created partition so
lets try waiting a bit with udev settle.
---
tests/storage_tests/formats_test/fs_test.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/storage_tests/formats_test/fs_test.py b/tests/storage_tests/formats_test/fs_test.py
index 1d42dc21..59c0f998 100644
--- a/tests/storage_tests/formats_test/fs_test.py
+++ b/tests/storage_tests/formats_test/fs_test.py
@@ -10,6 +10,7 @@ from blivet.errors import DeviceFormatError, FSError
from blivet.formats import get_format
from blivet.devices import PartitionDevice, DiskDevice
from blivet.flags import flags
+from blivet import udev
from .loopbackedtestcase import LoopBackedTestCase
@@ -107,6 +108,7 @@ class XFSTestCase(fstesting.FSAsRoot):
pend = pstart + int(Size(size) / disk.format.parted_device.sectorSize)
disk.format.add_partition(pstart, pend, parted.PARTITION_NORMAL)
disk.format.parted_disk.commit()
+ udev.settle()
part = disk.format.parted_disk.getPartitionBySector(pstart)
device = PartitionDevice(os.path.basename(part.path))
--
2.45.2
From 230cbb1d194333a00554b8afe09768f15972cf2f Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Thu, 7 Mar 2024 09:45:28 +0100
Subject: [PATCH 2/2] Fix util.detect_virt on Amazon
---
blivet/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/util.py b/blivet/util.py
index 3040ee5a..15d41b4f 100644
--- a/blivet/util.py
+++ b/blivet/util.py
@@ -1137,7 +1137,7 @@ def detect_virt():
except (safe_dbus.DBusCallError, safe_dbus.DBusPropertyError):
return False
else:
- return vm[0] in ('qemu', 'kvm', 'xen')
+ return vm[0] in ('qemu', 'kvm', 'xen', 'microsoft', 'amazon')
def natural_sort_key(device):
--
2.45.2

View File

@ -23,7 +23,7 @@ Version: 3.6.0
#%%global prerelease .b2 #%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 15%{?prerelease}%{?dist} Release: 16%{?prerelease}%{?dist}
Epoch: 1 Epoch: 1
License: LGPLv2+ License: LGPLv2+
%global realname blivet %global realname blivet
@ -55,6 +55,7 @@ Patch21: 0022-add-udev-builtin-path_id-property-to-zfcp-attached-S.patch
Patch22: 0023-Do-not-add-new-PVs-to-the-LVM-devices-file-if-it-doe.patch Patch22: 0023-Do-not-add-new-PVs-to-the-LVM-devices-file-if-it-doe.patch
Patch23: 0024-Added-support-for-PV-grow.patch Patch23: 0024-Added-support-for-PV-grow.patch
Patch24: 0025-Stratis-fixes-backport.patch Patch24: 0025-Stratis-fixes-backport.patch
Patch25: 0026-XFS-resize-test-fix.patch
# Versions of required components (done so we make sure the buildrequires # Versions of required components (done so we make sure the buildrequires
# match the requires versions of things). # match the requires versions of things).
@ -218,6 +219,10 @@ configuration.
%endif %endif
%changelog %changelog
* Thu Jun 27 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.6.0-16
- tests: Try waiting after partition creation for XFS resize test
Resolves: RHEL-8009
* Thu May 16 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.6.0-15 * Thu May 16 2024 Vojtech Trefny <vtrefny@redhat.com> - 3.6.0-15
- Backport fixes for Stratis support needed for storage role - Backport fixes for Stratis support needed for storage role
Resolves: RHEL-35382 Resolves: RHEL-35382