Merge ~mwhudson/curtin:vmtest-fixes into curtin:master

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 5a32eb67a62ad1804516a80f35035090debdfb1f
Proposed branch: ~mwhudson/curtin:vmtest-fixes
Merge into: curtin:master
Diff against target: 234 lines (+13/-42)
10 files modified
examples/tests/multipath-lvm-part-wipe.yaml (+1/-1)
examples/tests/multipath.yaml (+1/-1)
examples/tests/partition-existing-raid.yaml (+2/-2)
examples/tests/preserve-bcache.yaml (+1/-0)
examples/tests/preserve-raid.yaml (+1/-1)
examples/tests/preserve.yaml (+3/-3)
examples/tests/uefi_basic.yaml (+1/-1)
examples/tests/uefi_reuse_esp.yaml (+2/-2)
tests/vmtests/__init__.py (+0/-23)
tests/vmtests/releases.py (+1/-8)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Dan Bungert Approve
Review via email: mp+415877@code.launchpad.net

Commit message

vmtests: assorted fixes

vmtests: drop assertion that clear-holders ran
vmtests: bump VM memory size to 2048 MiB for all tests
vmtests: fix parted invocation in partition-existing-raid.yaml
vmtests: boost the size of / in a few tests
insert sleep after creating bcache device in preserve-bcache.yaml

Description of the change

I looked through all the failures of the most recent vmtests run and this is most of what I found (I sent a separate MP for the one change I want to make to curtin itself).

It probably makes sense to merge this by hand -- I don't want to squash merge it, and splitting each commit out into it's own MP sounds boring.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Dan Bungert (dbungert) :
review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/examples/tests/multipath-lvm-part-wipe.yaml b/examples/tests/multipath-lvm-part-wipe.yaml
2index cb18a08..8400d78 100644
3--- a/examples/tests/multipath-lvm-part-wipe.yaml
4+++ b/examples/tests/multipath-lvm-part-wipe.yaml
5@@ -113,7 +113,7 @@ storage:
6 - id: root_vg_lv1
7 type: lvm_partition
8 name: lv1_root
9- size: 2.5G
10+ size: 3.5G
11 volgroup: root_vg
12 - id: lv1_root_fs
13 type: format
14diff --git a/examples/tests/multipath.yaml b/examples/tests/multipath.yaml
15index 11838d1..a3b536f 100644
16--- a/examples/tests/multipath.yaml
17+++ b/examples/tests/multipath.yaml
18@@ -16,7 +16,7 @@ storage:
19 - id: sda1
20 type: partition
21 number: 1
22- size: 3GB
23+ size: 4GB
24 device: sda
25 flag: boot
26 wipe: superblock
27diff --git a/examples/tests/partition-existing-raid.yaml b/examples/tests/partition-existing-raid.yaml
28index 07cf8d2..6292fef 100644
29--- a/examples/tests/partition-existing-raid.yaml
30+++ b/examples/tests/partition-existing-raid.yaml
31@@ -15,7 +15,7 @@ bucket:
32 /dev/disk/by-id/virtio-disk-b-part1 /dev/disk/by-id/virtio-disk-c-part1
33 udevadm settle
34 parted /dev/md1 --script -- \
35- mklabel dos
36+ mklabel msdos
37 udevadm settle
38 mdadm --stop /dev/md1
39 udevadm settle
40@@ -51,7 +51,7 @@ storage:
41 id: id_disk0_part2
42 device: id_disk0
43 number: 2
44- size: 3G
45+ size: 4G
46 - type: partition
47 id: id_disk0_part3
48 device: id_disk0
49diff --git a/examples/tests/preserve-bcache.yaml b/examples/tests/preserve-bcache.yaml
50index f614f37..17ad52c 100644
51--- a/examples/tests/preserve-bcache.yaml
52+++ b/examples/tests/preserve-bcache.yaml
53@@ -10,6 +10,7 @@ bucket:
54 udevadm settle
55 make-bcache -C /dev/disk/by-id/virtio-disk-b \
56 -B /dev/disk/by-id/virtio-disk-a-part2 --writeback
57+ sleep 1
58 udevadm settle
59 mkfs.ext4 /dev/bcache0
60 mount /dev/bcache0 /mnt
61diff --git a/examples/tests/preserve-raid.yaml b/examples/tests/preserve-raid.yaml
62index 9e0489f..5c94032 100644
63--- a/examples/tests/preserve-raid.yaml
64+++ b/examples/tests/preserve-raid.yaml
65@@ -52,7 +52,7 @@ storage:
66 id: id_disk0_part2
67 device: id_disk0
68 number: 2
69- size: 3G
70+ size: 4G
71 - type: partition
72 id: id_disk0_part3
73 device: id_disk0
74diff --git a/examples/tests/preserve.yaml b/examples/tests/preserve.yaml
75index de8a975..9da2a0e 100644
76--- a/examples/tests/preserve.yaml
77+++ b/examples/tests/preserve.yaml
78@@ -6,8 +6,8 @@ bucket:
79 mklabel gpt \
80 mkpart primary ext4 2MiB 514MiB \
81 set 1 esp on \
82- mkpart primary ext4 1GiB 4GiB \
83- mkpart primary ext4 4GiB 7GiB
84+ mkpart primary ext4 1GiB 5GiB \
85+ mkpart primary ext4 6GiB 9GiB
86 udevadm settle
87 mkfs.ext4 /dev/disk/by-id/virtio-disk-a-part3
88 mount /dev/disk/by-id/virtio-disk-a-part3 /mnt
89@@ -36,7 +36,7 @@ storage:
90 id: id_disk0_part2
91 device: id_disk0
92 number: 2
93- size: 3G
94+ size: 4G
95 preserve: true
96 - type: partition
97 id: id_disk0_part3
98diff --git a/examples/tests/uefi_basic.yaml b/examples/tests/uefi_basic.yaml
99index 91a72ae..e6ad351 100644
100--- a/examples/tests/uefi_basic.yaml
101+++ b/examples/tests/uefi_basic.yaml
102@@ -31,7 +31,7 @@ storage:
103 - device: id_disk0
104 id: id_disk0_part2
105 number: 2
106- size: 3G
107+ size: 4G
108 type: partition
109 wipe: superblock
110 - fstype: fat32
111diff --git a/examples/tests/uefi_reuse_esp.yaml b/examples/tests/uefi_reuse_esp.yaml
112index 7ad7fdf..7095f91 100644
113--- a/examples/tests/uefi_reuse_esp.yaml
114+++ b/examples/tests/uefi_reuse_esp.yaml
115@@ -8,7 +8,7 @@ bucket:
116 mklabel gpt \
117 mkpart primary fat32 1MiB 513MiB \
118 set 1 esp on \
119- mkpart primary ext4 513MiB 3585MiB
120+ mkpart primary ext4 513MiB 4609MiB
121
122 udevadm settle
123 mkfs.vfat -I -n EFI -F 32 /dev/disk/by-id/virtio-disk-a-part1
124@@ -67,7 +67,7 @@ storage:
125 - device: id_disk0
126 id: id_disk0_part2
127 number: 2
128- size: 3G
129+ size: 4G
130 type: partition
131 preserve: true
132 - fstype: fat32
133diff --git a/tests/vmtests/__init__.py b/tests/vmtests/__init__.py
134index 60d7731..c5820f0 100644
135--- a/tests/vmtests/__init__.py
136+++ b/tests/vmtests/__init__.py
137@@ -1930,29 +1930,6 @@ class VMBaseClass(TestCase):
138 self.assertIn(kpackage, self.debian_packages)
139
140 @skip_if_flag('expected_failure')
141- def test_clear_holders_ran(self):
142- """ Test curtin install runs block-meta/clear-holders. """
143- if not self.has_storage_config():
144- raise SkipTest("This test does not use storage config.")
145-
146- install_logfile = 'root/curtin-install.log'
147- self.output_files_exist([install_logfile])
148- install_log = self.load_collect_file(install_logfile)
149-
150- # validate block-meta called clear-holders at least once
151- # We match both 'start' and 'finish' strings, so for each
152- # call we'll have 2 matches.
153- clear_holders_re = 'cmd-install/.*cmd-block-meta/clear-holders'
154- events = re.findall(clear_holders_re, install_log)
155- print('Matched clear-holder events:\n%s' % events)
156- self.assertGreaterEqual(len(events), 2)
157-
158- # dirty_disks mode runs an early block-meta command which
159- # also runs clear-holders
160- if self.dirty_disks is True:
161- self.assertGreaterEqual(len(events), 4)
162-
163- @skip_if_flag('expected_failure')
164 def test_kernel_img_conf(self):
165 """ Test curtin install kernel-img.conf correctly. """
166 if self.target_distro != 'ubuntu':
167diff --git a/tests/vmtests/releases.py b/tests/vmtests/releases.py
168index fa755b1..809a1a7 100644
169--- a/tests/vmtests/releases.py
170+++ b/tests/vmtests/releases.py
171@@ -7,7 +7,7 @@ class _ReleaseBase(object):
172 repo = "maas-daily"
173 arch = get_platform_arch()
174 target_arch = arch
175- mem = "1024"
176+ mem = "2048"
177
178
179 class _UbuntuBase(_ReleaseBase):
180@@ -72,7 +72,6 @@ class _UbuntuCore20FromFocalBase(_UbuntuCoreUbuntuBase):
181 release = "focal"
182 # release for target
183 target_release = "ubuntu-core-20"
184- mem = "2048"
185
186
187 class _Centos66FromXenialBase(_CentosFromUbuntuBase):
188@@ -148,7 +147,6 @@ class _XenialEdge(_XenialBase):
189 class _BionicBase(_UbuntuBase):
190 release = "bionic"
191 target_release = "bionic"
192- mem = "2048"
193 if _UbuntuBase.arch == "arm64":
194 subarch = "ga-18.04"
195
196@@ -164,7 +162,6 @@ class _DiscoBase(_UbuntuBase):
197 release = "disco"
198 target_release = "disco"
199 # squashfs is over 300MB, need more ram
200- mem = "2048"
201 if _UbuntuBase.arch == "arm64":
202 subarch = "ga-19.04"
203
204@@ -172,7 +169,6 @@ class _DiscoBase(_UbuntuBase):
205 class _EoanBase(_UbuntuBase):
206 release = "eoan"
207 target_release = "eoan"
208- mem = "2048"
209 if _UbuntuBase.arch == "arm64":
210 subarch = "ga-19.10"
211
212@@ -180,7 +176,6 @@ class _EoanBase(_UbuntuBase):
213 class _FocalBase(_UbuntuBase):
214 release = "focal"
215 target_release = "focal"
216- mem = "2048"
217 if _UbuntuBase.arch == "arm64":
218 subarch = "ga-20.04"
219
220@@ -188,7 +183,6 @@ class _FocalBase(_UbuntuBase):
221 class _HirsuteBase(_UbuntuBase):
222 release = "hirsute"
223 target_release = "hirsute"
224- mem = "2048"
225 if _UbuntuBase.arch == "arm64":
226 subarch = "ga-21.04"
227
228@@ -196,7 +190,6 @@ class _HirsuteBase(_UbuntuBase):
229 class _ImpishBase(_UbuntuBase):
230 release = "impish"
231 target_release = "impish"
232- mem = "2048"
233 if _UbuntuBase.arch == "arm64":
234 subarch = "ga-21.10"
235

Subscribers

People subscribed via source and target branches