Merge ~oddbloke/curtin/+git/curtin:ubuntu/devel into curtin:ubuntu/devel

Proposed by Dan Watkins
Status: Merged
Merged at revision: 7892b282fc4d81aed1037dcdadcae388a8efbdc0
Proposed branch: ~oddbloke/curtin/+git/curtin:ubuntu/devel
Merge into: curtin:ubuntu/devel
Diff against target: 2413 lines (+739/-486)
62 files modified
curtin/__init__.py (+1/-1)
curtin/block/__init__.py (+35/-2)
curtin/block/clear_holders.py (+21/-2)
curtin/block/multipath.py (+111/-0)
curtin/commands/curthooks.py (+14/-0)
curtin/config.py (+1/-1)
debian/changelog (+19/-0)
doc/topics/config.rst (+50/-0)
examples/tests/basic_scsi.yaml (+1/-1)
examples/tests/no-grub-file.yaml (+9/-0)
helpers/common (+13/-12)
pylintrc (+10/-0)
tests/unittests/helpers.py (+5/-0)
tests/unittests/test_apt_custom_sources_list.py (+4/-3)
tests/unittests/test_block.py (+33/-3)
tests/unittests/test_block_mdadm.py (+3/-7)
tests/unittests/test_block_multipath.py (+149/-0)
tests/vmtests/__init__.py (+5/-4)
tests/vmtests/releases.py (+7/-0)
tests/vmtests/test_apt_config_cmd.py (+6/-2)
tests/vmtests/test_apt_source.py (+2/-2)
tests/vmtests/test_basic.py (+12/-13)
tests/vmtests/test_basic_dasd.py (+6/-0)
tests/vmtests/test_bcache_basic.py (+4/-8)
tests/vmtests/test_bcache_bug1718699.py (+4/-0)
tests/vmtests/test_bcache_ceph.py (+4/-8)
tests/vmtests/test_bcache_partitions.py (+4/-0)
tests/vmtests/test_fs_battery.py (+4/-10)
tests/vmtests/test_install_umount.py (+1/-1)
tests/vmtests/test_iscsi.py (+4/-4)
tests/vmtests/test_journald_reporter.py (+4/-0)
tests/vmtests/test_lvm.py (+4/-8)
tests/vmtests/test_lvm_iscsi.py (+4/-4)
tests/vmtests/test_lvm_raid.py (+4/-0)
tests/vmtests/test_lvm_root.py (+1/-17)
tests/vmtests/test_mdadm_bcache.py (+34/-68)
tests/vmtests/test_mdadm_iscsi.py (+4/-4)
tests/vmtests/test_multipath.py (+6/-9)
tests/vmtests/test_network.py (+4/-23)
tests/vmtests/test_network_alias.py (+4/-23)
tests/vmtests/test_network_bonding.py (+4/-20)
tests/vmtests/test_network_bridging.py (+4/-0)
tests/vmtests/test_network_enisource.py (+0/-9)
tests/vmtests/test_network_ipv6.py (+4/-19)
tests/vmtests/test_network_ipv6_enisource.py (+0/-9)
tests/vmtests/test_network_ipv6_static.py (+4/-27)
tests/vmtests/test_network_ipv6_vlan.py (+4/-9)
tests/vmtests/test_network_mtu.py (+8/-32)
tests/vmtests/test_network_static.py (+4/-27)
tests/vmtests/test_network_static_routes.py (+5/-26)
tests/vmtests/test_network_vlan.py (+4/-8)
tests/vmtests/test_nvme.py (+9/-9)
tests/vmtests/test_old_apt_features.py (+3/-2)
tests/vmtests/test_pollinate_useragent.py (+4/-4)
tests/vmtests/test_raid5_bcache.py (+4/-21)
tests/vmtests/test_simple.py (+40/-4)
tests/vmtests/test_uefi_basic.py (+7/-16)
tests/vmtests/test_vmtests.py (+1/-1)
tests/vmtests/test_zfsroot.py (+8/-0)
tools/vmtest-system-setup (+1/-0)
tools/xkvm (+9/-2)
tox.ini (+1/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
curtin developers Pending
Review via email: mp+367779@code.launchpad.net

Commit message

Upstream snapshot of curtin for release into eoan

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:7892b282fc4d81aed1037dcdadcae388a8efbdc0
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~daniel-thewatkins/curtin/+git/curtin/+merge/367779/+edit-commit-message

https://jenkins.ubuntu.com/server/job/curtin-ci/1269/
Executed test runs:
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-arm64/1269
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-ppc64el/1269
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-s390x/1269
    SUCCESS: https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=torkoal/1269

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/curtin-ci/1269/rebuild

review: Needs Fixing (continuous-integration)
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/curtin/__init__.py b/curtin/__init__.py
2index d52e1c4..076c135 100644
3--- a/curtin/__init__.py
4+++ b/curtin/__init__.py
5@@ -32,6 +32,6 @@ FEATURES = [
6 'HAS_VERSION_MODULE',
7 ]
8
9-__version__ = "18.2"
10+__version__ = "19.1"
11
12 # vi: ts=4 expandtab syntax=python
13diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
14index 71882d4..f858b37 100644
15--- a/curtin/block/__init__.py
16+++ b/curtin/block/__init__.py
17@@ -10,8 +10,9 @@ import tempfile
18
19 from curtin import util
20 from curtin.block import lvm
21+from curtin.block import multipath
22 from curtin.log import LOG
23-from curtin.udev import udevadm_settle
24+from curtin.udev import udevadm_settle, udevadm_info
25
26
27 def get_dev_name_entry(devname):
28@@ -103,7 +104,15 @@ def partition_kname(disk_kname, partition_number):
29 """
30 Add number to disk_kname prepending a 'p' if needed
31 """
32- for dev_type in ['bcache', 'nvme', 'mmcblk', 'cciss', 'mpath', 'dm', 'md']:
33+ if disk_kname.startswith('dm-'):
34+ # device-mapper devices may create a new dm device for the partition,
35+ # e.g. multipath disk is at dm-2, new partition could be dm-11, but
36+ # linux will create a -partX symlink against the disk by-id name.
37+ devpath = '/dev/' + disk_kname
38+ disk_link = get_device_mapper_links(devpath, first=True)
39+ return '%s-part%s' % (disk_link, partition_number)
40+
41+ for dev_type in ['bcache', 'nvme', 'mmcblk', 'cciss', 'mpath', 'md']:
42 if disk_kname.startswith(dev_type):
43 partition_number = "p%s" % partition_number
44 break
45@@ -686,6 +695,21 @@ def disk_to_byid_path(kname):
46 return mapping.get(dev_path(kname))
47
48
49+def get_device_mapper_links(devpath, first=False):
50+ """ Return the best devlink to device at devpath. """
51+ info = udevadm_info(devpath)
52+ if 'DEVLINKS' not in info:
53+ raise ValueError('Device %s does not have device symlinks' % devpath)
54+ devlinks = [devlink for devlink in sorted(info['DEVLINKS']) if devlink]
55+ if not devlinks:
56+ raise ValueError('Unexpected DEVLINKS list contained empty values')
57+
58+ if first:
59+ return devlinks[0]
60+
61+ return devlinks
62+
63+
64 def lookup_disk(serial):
65 """
66 Search for a disk by its serial number using /dev/disk/by-id/
67@@ -705,7 +729,16 @@ def lookup_disk(serial):
68 # will be the partitions on the disk. Then use os.path.realpath to
69 # determine the path to the block device in /dev/
70 disks.sort(key=lambda x: len(x))
71+ LOG.debug('lookup_disks found: %s', disks)
72 path = os.path.realpath("/dev/disk/by-id/%s" % disks[0])
73+ LOG.debug('lookup_disks realpath(%s)=%s', disks[0], path)
74+ if multipath.is_mpath_device(path):
75+ LOG.debug('Detected multipath device, finding a members')
76+ info = udevadm_info(path)
77+ mpath_members = sorted(multipath.find_mpath_members(info['DM_NAME']))
78+ LOG.debug('mpath members: %s', mpath_members)
79+ if len(mpath_members):
80+ path = mpath_members[0]
81
82 if not os.path.exists(path):
83 raise ValueError("path '%s' to block device for disk with serial '%s' \
84diff --git a/curtin/block/clear_holders.py b/curtin/block/clear_holders.py
85index fb7fba4..4a099cd 100644
86--- a/curtin/block/clear_holders.py
87+++ b/curtin/block/clear_holders.py
88@@ -15,6 +15,7 @@ from curtin.swap import is_swap_device
89 from curtin.block import bcache
90 from curtin.block import lvm
91 from curtin.block import mdadm
92+from curtin.block import multipath
93 from curtin.block import zfs
94 from curtin.log import LOG
95
96@@ -294,6 +295,17 @@ def wipe_superblock(device):
97 device, attempt + 1, len(retries), wait)
98 time.sleep(wait)
99
100+ # multipath partitions are separate block devices (disks)
101+ if multipath.is_mpath_partition(blockdev):
102+ multipath.remove_partition(blockdev)
103+ # multipath devices must be hidden to utilize a single member (path)
104+ elif multipath.is_mpath_device(blockdev):
105+ mp_id = multipath.find_mpath_id(blockdev)
106+ if mp_id:
107+ multipath.remove_map(mp_id)
108+ else:
109+ raise RuntimeError('Failed to find multipath id for %s' % blockdev)
110+
111
112 def _wipe_superblock(blockdev, exclusive=True, strict=True):
113 """ No checks, just call wipe_volume """
114@@ -359,8 +371,15 @@ def identify_partition(device):
115 """
116 determine if specified device is a partition
117 """
118- path = os.path.join(block.sys_block_path(device), 'partition')
119- return os.path.exists(path)
120+ blockdev = block.sys_block_path(device)
121+ path = os.path.join(blockdev, 'partition')
122+ if os.path.exists(path):
123+ return True
124+
125+ if multipath.is_mpath_partition(blockdev):
126+ return True
127+
128+ return False
129
130
131 def shutdown_swap(path):
132diff --git a/curtin/block/multipath.py b/curtin/block/multipath.py
133new file mode 100644
134index 0000000..d1e8441
135--- /dev/null
136+++ b/curtin/block/multipath.py
137@@ -0,0 +1,111 @@
138+import os
139+
140+from curtin.log import LOG
141+from curtin import util
142+from curtin import udev
143+
144+SHOW_PATHS_FMT = ("device='%d' serial='%z' multipath='%m' host_wwpn='%N' "
145+ "target_wwnn='%n' host_wwpn='%R' target_wwpn='%r' "
146+ "host_adapter='%a'")
147+SHOW_MAPS_FMT = "name=%n multipath='%w' sysfs='%d' paths='%N'"
148+
149+
150+def _extract_mpath_data(cmd, show_verb):
151+ data, _err = util.subp(cmd, capture=True)
152+ result = []
153+ for line in data.splitlines():
154+ mp_dict = util.load_shell_content(line, add_empty=True)
155+ LOG.debug('Extracted multipath %s fields: %s', show_verb, mp_dict)
156+ if mp_dict:
157+ result.append(mp_dict)
158+
159+ return result
160+
161+
162+def show_paths():
163+ cmd = ['multipathd', 'show', 'paths', 'raw', 'format', SHOW_PATHS_FMT]
164+ return _extract_mpath_data(cmd, 'paths')
165+
166+
167+def show_maps():
168+ cmd = ['multipathd', 'show', 'maps', 'raw', 'format', SHOW_MAPS_FMT]
169+ return _extract_mpath_data(cmd, 'maps')
170+
171+
172+def is_mpath_device(devpath):
173+ info = udev.udevadm_info(devpath)
174+ if info.get('DM_UUID', '').startswith('mpath-'):
175+ return True
176+
177+ return False
178+
179+
180+def is_mpath_member(devpath):
181+ try:
182+ util.subp(['multipath', '-c', devpath], capture=True)
183+ return True
184+ except util.ProcessExecutionError:
185+ return False
186+
187+
188+def is_mpath_partition(devpath):
189+ if devpath.startswith('/dev/dm-'):
190+ if 'DM_PART' in udev.udevadm_info(devpath):
191+ LOG.debug("%s is multipath device partition", devpath)
192+ return True
193+
194+ return False
195+
196+
197+def mpath_partition_to_mpath_id(devpath):
198+ info = udev.udevadm_info(devpath)
199+ if 'DM_MPATH' in info:
200+ return info['DM_MPATH']
201+
202+ return None
203+
204+
205+def remove_partition(devpath, retries=10):
206+ LOG.debug('multipath: removing multipath partition: %s', devpath)
207+ for _ in range(0, retries):
208+ util.subp(['dmsetup', 'remove', devpath], rcs=[0, 1])
209+ udev.udevadm_settle()
210+ if not os.path.exists(devpath):
211+ return
212+
213+ util.wait_for_removal(devpath)
214+
215+
216+def remove_map(map_id, retries=10):
217+ LOG.debug('multipath: removing multipath map: %s', map_id)
218+ devpath = '/dev/mapper/%s' % map_id
219+ for _ in range(0, retries):
220+ util.subp(['multipath', '-f', map_id], rcs=[0, 1])
221+ udev.udevadm_settle()
222+ if not os.path.exists(devpath):
223+ return
224+
225+ util.wait_for_removal(devpath)
226+
227+
228+def find_mpath_members(multipath_id, paths=None):
229+ if not paths:
230+ paths = show_paths()
231+
232+ members = ['/dev/' + path['device']
233+ for path in paths if path['multipath'] == multipath_id]
234+ return members
235+
236+
237+def find_mpath_id(devpath, maps=None):
238+ if not maps:
239+ maps = show_maps()
240+
241+ for mpmap in maps:
242+ if '/dev/' + mpmap['sysfs'] == devpath:
243+ name = mpmap.get('name')
244+ if name:
245+ return name
246+ return mpmap['multipath']
247+
248+ return None
249diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
250index b6326fb..c4eed5b 100644
251--- a/curtin/commands/curthooks.py
252+++ b/curtin/commands/curthooks.py
253@@ -484,6 +484,20 @@ def setup_grub(cfg, target, osfamily=DISTROS.debian):
254 else:
255 env['REPLACE_GRUB_LINUX_DEFAULT'] = "1"
256
257+ probe_os = grubcfg.get('probe_additional_os', False)
258+ if probe_os not in (False, True):
259+ raise ValueError("Unexpected value %s for 'probe_additional_os'. "
260+ "Value must be boolean" % probe_os)
261+ env['DISABLE_OS_PROBER'] = "0" if probe_os else "1"
262+
263+ # if terminal is present in config, but unset, then don't
264+ grub_terminal = grubcfg.get('terminal', 'console')
265+ if not isinstance(grub_terminal, str):
266+ raise ValueError("Unexpected value %s for 'terminal'. "
267+ "Value must be a string" % grub_terminal)
268+ if not grub_terminal.lower() == "unmodified":
269+ env['GRUB_TERMINAL'] = grub_terminal
270+
271 if instdevs:
272 instdevs = [block.get_dev_name_entry(i)[1] for i in instdevs]
273 else:
274diff --git a/curtin/config.py b/curtin/config.py
275index 9649b10..2106b23 100644
276--- a/curtin/config.py
277+++ b/curtin/config.py
278@@ -76,7 +76,7 @@ def cmdarg2cfg(cmdarg, delim="/"):
279
280
281 def load_config_archive(content):
282- archive = yaml.load(content)
283+ archive = yaml.safe_load(content)
284 config = {}
285 for part in archive:
286 if isinstance(part, (str,)):
287diff --git a/debian/changelog b/debian/changelog
288index 4ac90f4..ec06324 100644
289--- a/debian/changelog
290+++ b/debian/changelog
291@@ -1,3 +1,22 @@
292+curtin (19.1-0ubuntu1) eoan; urgency=medium
293+
294+ * New upstream release.
295+ - release 19.1
296+ - vmtest: add missing skip_by_date on Eoan test_network_mtu
297+ - vmtest: remove skip_by_date on Disco Allindata test
298+ - block: support multipath devices in lookup and partition_kname
299+ (LP: #1813228)
300+ - grub: add grub config to control os_prober,terminal settings in target
301+ - vmtest: add eoan tests [Paride Legovini]
302+ - vmtest: add dependency on python3-jsonschema [Paride Legovini]
303+ - Pylint compatibility with Python 3.7 [Paride Legovini] (LP: #1828229)
304+ - vmtest: disable disco multipath test
305+ - vmtests: bump network mtu tests out a bit
306+ - Fix up yaml.load warnings
307+ - vmtest: disable trusty, it's dead jim
308+
309+ -- Daniel Watkins <oddbloke@ubuntu.com> Wed, 22 May 2019 10:26:52 -0400
310+
311 curtin (18.2-26-gd8e45d79-0ubuntu1) eoan; urgency=medium
312
313 * New upstream snapshot.
314diff --git a/doc/topics/config.rst b/doc/topics/config.rst
315index bad8fc2..b7cca43 100644
316--- a/doc/topics/config.rst
317+++ b/doc/topics/config.rst
318@@ -207,6 +207,27 @@ update the NVRAM settings to preserve the system configuration.
319 Users may want to force NVRAM to be updated such that the next boot
320 of the system will boot from the installed device.
321
322+**probe_additional_os**: *<boolean: default False>*
323+
324+This setting controls grub's os-prober functionality and Curtin will
325+disable this feature by default to prevent grub from searching for other
326+operating systems and adding them to the grub menu.
327+
328+When False, curtin writes "GRUB_DISABLE_OS_PROBER=true" to target system in
329+/etc/default/grub.d/50-curtin-settings.cfg. If True, curtin won't modify the
330+grub configuration value in the target system.
331+
332+**terminal**: *<['unmodified', 'console', ...]>*
333+
334+Configure target system grub option GRUB_TERMINAL ``terminal`` value
335+which is written to /etc/default/grub.d/50-curtin-settings.cfg. Curtin
336+does not attempt to validate this string, grub2 has many values that
337+it accepts and the list is platform dependent. If ``terminal`` is
338+not provided, Curtin will set the value to 'console'. If the ``terminal``
339+value is 'unmodified' then Curtin will not set any value at all and will
340+use Grub defaults.
341+
342+
343 **Example**::
344
345 grub:
346@@ -214,6 +235,35 @@ of the system will boot from the installed device.
347 - /dev/sda1
348 replace_linux_default: False
349 update_nvram: True
350+ terminal: serial
351+
352+**Default terminal value, GRUB_TERMINAL=console**::
353+
354+ grub:
355+ install_devices:
356+ - /dev/sda1
357+
358+**Don't set GRUB_TERMINAL in target**::
359+
360+ grub:
361+ install_devices:
362+ - /dev/sda1
363+ terminal: unmodified
364+
365+**Allow grub to probe for additional OSes**::
366+
367+ grub:
368+ install_devices:
369+ - /dev/sda1
370+ probe_additional_os: True
371+
372+**Avoid writting any settings to etc/default/grub.d/50-curtin-settings.cfg**::
373+
374+ grub:
375+ install_devices:
376+ - /dev/sda1
377+ probe_additional_os: True
378+ terminal: unmodified
379
380
381 http_proxy
382diff --git a/examples/tests/basic_scsi.yaml b/examples/tests/basic_scsi.yaml
383index aa62137..51f5236 100644
384--- a/examples/tests/basic_scsi.yaml
385+++ b/examples/tests/basic_scsi.yaml
386@@ -49,7 +49,7 @@ storage:
387 device: sda2_home
388 - id: sparedisk_id
389 type: disk
390- wwn: '0x080258d13ea95ae5'
391+ wwn: '0x2222222222222222'
392 name: sparedisk
393 wipe: superblock
394 - id: sparedisk_fat_fmt_id
395diff --git a/examples/tests/no-grub-file.yaml b/examples/tests/no-grub-file.yaml
396new file mode 100644
397index 0000000..d5ba698
398--- /dev/null
399+++ b/examples/tests/no-grub-file.yaml
400@@ -0,0 +1,9 @@
401+# This pushes curtin through a automatic installation
402+# where no storage configuration is necessary.
403+placeholder_simple_install: unused
404+
405+# configure curtin so it does not emit a grub config file
406+# in etc/default/grub/grub.d
407+grub:
408+ probe_additional_os: true
409+ terminal: unmodified
410diff --git a/helpers/common b/helpers/common
411index 34f0870..5928150 100644
412--- a/helpers/common
413+++ b/helpers/common
414@@ -779,13 +779,6 @@ install_grub() {
415 esac
416 debug 1 "carryover command line params '$newargs'"
417
418- case $os_family in
419- debian)
420- : > "$mp/$mygrub_cfg" ||
421- { error "Failed to write '$mygrub_cfg'"; return 1; }
422- ;;
423- esac
424-
425 if [ "${REPLACE_GRUB_LINUX_DEFAULT:-1}" != "0" ]; then
426 apply_grub_cmdline_linux_default "$mp" "$newargs" || {
427 error "Failed to apply grub cmdline."
428@@ -793,11 +786,19 @@ install_grub() {
429 }
430 fi
431
432- {
433- echo "# Curtin disable grub os prober that might find other OS installs."
434- echo "GRUB_DISABLE_OS_PROBER=true"
435- echo "GRUB_TERMINAL=console"
436- } >> "$mp/$mygrub_cfg"
437+ if [ "${DISABLE_OS_PROBER:-1}" == "1" ]; then
438+ {
439+ echo "# Curtin disable grub os prober that might find other OS installs."
440+ echo "GRUB_DISABLE_OS_PROBER=true"
441+ } >> "$mp/$mygrub_cfg"
442+ fi
443+
444+ if [ -n "${GRUB_TERMINAL}" ]; then
445+ {
446+ echo "# Curtin configured GRUB_TERMINAL value"
447+ echo "GRUB_TERMINAL=${GRUB_TERMINAL}"
448+ } >> "$mp/$mygrub_cfg"
449+ fi
450
451 local short="" bd="" grubdev grubdevs_new=""
452 grubdevs_new=()
453diff --git a/pylintrc b/pylintrc
454new file mode 100644
455index 0000000..d027f48
456--- /dev/null
457+++ b/pylintrc
458@@ -0,0 +1,10 @@
459+[MASTER]
460+# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
461+# number of processors available to use.
462+jobs=0
463+
464+[TYPECHECK]
465+# List of members which are set dynamically and missed by pylint inference
466+# system, and so shouldn't trigger E1101 when accessed. Python regular
467+# expressions are accepted.
468+generated-members=DISTROS.*
469diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py
470index 0869f1c..9514745 100644
471--- a/tests/unittests/helpers.py
472+++ b/tests/unittests/helpers.py
473@@ -121,4 +121,9 @@ def populate_dir(path, files):
474
475 return ret
476
477+
478+def raise_pexec_error(*args, **kwargs):
479+ raise util.ProcessExecutionError()
480+
481+
482 # vi: ts=4 expandtab syntax=python
483diff --git a/tests/unittests/test_apt_custom_sources_list.py b/tests/unittests/test_apt_custom_sources_list.py
484index d77c750..fb6eb0c 100644
485--- a/tests/unittests/test_apt_custom_sources_list.py
486+++ b/tests/unittests/test_apt_custom_sources_list.py
487@@ -5,16 +5,17 @@ Test templating of custom sources list
488 """
489 import logging
490 import os
491+import yaml
492
493 import mock
494 from mock import call
495 import textwrap
496-import yaml
497
498 from curtin import distro
499 from curtin import paths
500 from curtin import util
501 from curtin.commands import apt_config
502+from curtin.config import load_config
503 from .helpers import CiTestCase
504
505 LOG = logging.getLogger(__name__)
506@@ -233,7 +234,7 @@ class TestApplyPreserveSourcesList(CiTestCase):
507 m_get_pkg_ver.assert_has_calls(
508 [mock.call('cloud-init', target=self.tmp)])
509 self.assertEqual(
510- yaml.load(util.load_file(self.tmp_cfg)),
511+ load_config(self.tmp_cfg),
512 {'apt_preserve_sources_list': True})
513
514 @mock.patch("curtin.commands.apt_config.distro.get_package_version")
515@@ -253,7 +254,7 @@ class TestApplyPreserveSourcesList(CiTestCase):
516 m_get_pkg_ver.assert_has_calls(
517 [mock.call('cloud-init', target=self.tmp)])
518 self.assertEqual(
519- yaml.load(util.load_file(self.tmp_cfg)),
520+ load_config(self.tmp_cfg),
521 {'apt': {'preserve_sources_list': True}})
522
523 # vi: ts=4 expandtab syntax=python
524diff --git a/tests/unittests/test_block.py b/tests/unittests/test_block.py
525index e932392..c7ebdcc 100644
526--- a/tests/unittests/test_block.py
527+++ b/tests/unittests/test_block.py
528@@ -73,16 +73,18 @@ class TestBlock(CiTestCase):
529 res = block.get_blockdev_sector_size('/dev/vda2')
530 self.assertEqual(res, (4096, 4096))
531
532+ @mock.patch("curtin.block.multipath")
533 @mock.patch("curtin.block.os.path.realpath")
534 @mock.patch("curtin.block.os.path.exists")
535 @mock.patch("curtin.block.os.listdir")
536 def test_lookup_disk(self, mock_os_listdir, mock_os_path_exists,
537- mock_os_path_realpath):
538+ mock_os_path_realpath, mock_mpath):
539 serial = "SERIAL123"
540 mock_os_listdir.return_value = ["sda_%s-part1" % serial,
541 "sda_%s" % serial, "other"]
542 mock_os_path_exists.return_value = True
543 mock_os_path_realpath.return_value = "/dev/sda"
544+ mock_mpath.is_mpath_device.return_value = False
545
546 path = block.lookup_disk(serial)
547
548@@ -101,6 +103,30 @@ class TestBlock(CiTestCase):
549 mock_os_listdir.return_value = ["other"]
550 block.lookup_disk(serial)
551
552+ @mock.patch('curtin.block.udevadm_info')
553+ def test_get_device_mapper_links_returns_first_non_none(self, m_info):
554+ """ get_device_mapper_links returns first by sort entry in DEVLINKS."""
555+ devlinks = [self.random_string(), self.random_string()]
556+ m_info.return_value = {'DEVLINKS': devlinks}
557+ devpath = self.random_string()
558+ self.assertEqual(sorted(devlinks)[0],
559+ block.get_device_mapper_links(devpath, first=True))
560+
561+ @mock.patch('curtin.block.udevadm_info')
562+ def test_get_device_mapper_links_raises_valueerror_no_links(self, m_info):
563+ """ get_device_mapper_links raises ValueError if info has no links."""
564+ m_info.return_value = {self.random_string(): self.random_string()}
565+ with self.assertRaises(ValueError):
566+ block.get_device_mapper_links(self.random_string())
567+
568+ @mock.patch('curtin.block.udevadm_info')
569+ def test_get_device_mapper_links_raises_error_no_link_vals(self, m_info):
570+ """ get_device_mapper_links raises ValueError if all links are none"""
571+ devlinks = ['', '']
572+ m_info.return_value = {'DEVLINKS': devlinks}
573+ with self.assertRaises(ValueError):
574+ block.get_device_mapper_links(self.random_string())
575+
576 @mock.patch("curtin.block.get_dev_disk_byid")
577 def test_disk_to_byid_path(self, mock_byid):
578 """ disk_to_byid path returns a /dev/disk/by-id path """
579@@ -387,13 +413,17 @@ class TestWipeVolume(CiTestCase):
580
581 class TestBlockKnames(CiTestCase):
582 """Tests for some of the kname functions in block"""
583- def test_determine_partition_kname(self):
584+
585+ @mock.patch('curtin.block.get_device_mapper_links')
586+ def test_determine_partition_kname(self, m_mlink):
587+ dm0_link = '/dev/disk/by-id/dm-name-XXXX2406'
588+ m_mlink.return_value = dm0_link
589 part_knames = [(('sda', 1), 'sda1'),
590 (('vda', 1), 'vda1'),
591 (('nvme0n1', 1), 'nvme0n1p1'),
592 (('mmcblk0', 1), 'mmcblk0p1'),
593 (('cciss!c0d0', 1), 'cciss!c0d0p1'),
594- (('dm-0', 1), 'dm-0p1'),
595+ (('dm-0', 1), dm0_link + '-part1'),
596 (('md0', 1), 'md0p1'),
597 (('mpath1', 2), 'mpath1p2')]
598 for ((disk_kname, part_number), part_kname) in part_knames:
599diff --git a/tests/unittests/test_block_mdadm.py b/tests/unittests/test_block_mdadm.py
600index 72610aa..f9164b4 100644
601--- a/tests/unittests/test_block_mdadm.py
602+++ b/tests/unittests/test_block_mdadm.py
603@@ -4,15 +4,11 @@ from mock import call, patch
604 from curtin.block import dev_short
605 from curtin.block import mdadm
606 from curtin import util
607-from .helpers import CiTestCase
608+from .helpers import CiTestCase, raise_pexec_error
609 import os
610 import textwrap
611
612
613-def _raise_pexec_error(*args, **kwargs):
614- raise util.ProcessExecutionError()
615-
616-
617 class TestBlockMdadmAssemble(CiTestCase):
618
619 def setUp(self):
620@@ -76,7 +72,7 @@ class TestBlockMdadmAssemble(CiTestCase):
621
622 def test_mdadm_assemble_exec_error(self):
623 self.mock_util.ProcessExecutionError = util.ProcessExecutionError
624- self.mock_util.subp.side_effect = _raise_pexec_error
625+ self.mock_util.subp.side_effect = raise_pexec_error
626 with self.assertRaises(util.ProcessExecutionError):
627 mdadm.mdadm_assemble(scan=True, ignore_errors=False)
628 self.mock_util.subp.assert_called_with(
629@@ -306,7 +302,7 @@ class TestBlockMdadmExamine(CiTestCase):
630
631 def test_mdadm_examine_no_raid(self):
632 self.mock_util.ProcessExecutionError = util.ProcessExecutionError
633- self.mock_util.subp.side_effect = _raise_pexec_error
634+ self.mock_util.subp.side_effect = raise_pexec_error
635
636 device = "/dev/sda"
637 data = mdadm.mdadm_examine(device, export=False)
638diff --git a/tests/unittests/test_block_multipath.py b/tests/unittests/test_block_multipath.py
639new file mode 100644
640index 0000000..0964349
641--- /dev/null
642+++ b/tests/unittests/test_block_multipath.py
643@@ -0,0 +1,149 @@
644+import mock
645+
646+from curtin.block import multipath
647+from .helpers import CiTestCase, raise_pexec_error
648+
649+
650+class TestMultipath(CiTestCase):
651+
652+ def setUp(self):
653+ super(TestMultipath, self).setUp()
654+ self.add_patch('curtin.block.multipath.util.subp', 'm_subp')
655+ self.add_patch('curtin.block.multipath.udev', 'm_udev')
656+
657+ self.m_subp.return_value = ("", "")
658+
659+ def test_show_paths(self):
660+ self.m_subp.return_value = ("foo=bar wark=2", "")
661+ expected = ['multipathd', 'show', 'paths', 'raw', 'format',
662+ multipath.SHOW_PATHS_FMT]
663+ self.assertEqual([{'foo': 'bar', 'wark': '2'}],
664+ multipath.show_paths())
665+ self.m_subp.assert_called_with(expected, capture=True)
666+
667+ def test_show_maps(self):
668+ self.m_subp.return_value = ("foo=bar wark=2", "")
669+ expected = ['multipathd', 'show', 'maps', 'raw', 'format',
670+ multipath.SHOW_MAPS_FMT]
671+ self.assertEqual([{'foo': 'bar', 'wark': '2'}],
672+ multipath.show_maps())
673+ self.m_subp.assert_called_with(expected, capture=True)
674+
675+ def test_is_mpath_device_true(self):
676+ self.m_udev.udevadm_info.return_value = {'DM_UUID': 'mpath-mpatha-foo'}
677+ self.assertTrue(multipath.is_mpath_device(self.random_string()))
678+
679+ def test_is_mpath_device_false(self):
680+ self.m_udev.udevadm_info.return_value = {'DM_UUID': 'lvm-vg-foo-lv1'}
681+ self.assertFalse(multipath.is_mpath_device(self.random_string()))
682+
683+ def test_is_mpath_member_true(self):
684+ self.assertTrue(multipath.is_mpath_member(self.random_string()))
685+
686+ def test_is_mpath_member_false(self):
687+ self.m_subp.side_effect = raise_pexec_error
688+ self.assertFalse(multipath.is_mpath_member(self.random_string()))
689+
690+ def test_is_mpath_partition_true(self):
691+ dm_device = "/dev/dm-" + self.random_string()
692+ self.m_udev.udevadm_info.return_value = {'DM_PART': '1'}
693+ self.assertTrue(multipath.is_mpath_partition(dm_device))
694+
695+ def test_is_mpath_partition_false(self):
696+ self.assertFalse(multipath.is_mpath_partition(self.random_string()))
697+
698+ def test_mpath_partition_to_mpath_id(self):
699+ dev = self.random_string()
700+ mpath_id = self.random_string()
701+ self.m_udev.udevadm_info.return_value = {'DM_MPATH': mpath_id}
702+ self.assertEqual(mpath_id,
703+ multipath.mpath_partition_to_mpath_id(dev))
704+
705+ def test_mpath_partition_to_mpath_id_none(self):
706+ dev = self.random_string()
707+ self.m_udev.udevadm_info.return_value = {}
708+ self.assertEqual(None,
709+ multipath.mpath_partition_to_mpath_id(dev))
710+
711+ @mock.patch('curtin.block.multipath.os.path.exists')
712+ @mock.patch('curtin.block.multipath.util.wait_for_removal')
713+ def test_remove_partition(self, m_wait, m_exists):
714+ devpath = self.random_string()
715+ m_exists.side_effect = iter([True, True, False])
716+ multipath.remove_partition(devpath)
717+ expected = mock.call(['dmsetup', 'remove', devpath], rcs=[0, 1])
718+ self.m_subp.assert_has_calls([expected] * 3)
719+ m_wait.assert_not_called()
720+ self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
721+
722+ @mock.patch('curtin.block.multipath.os.path.exists')
723+ @mock.patch('curtin.block.multipath.util.wait_for_removal')
724+ def test_remove_partition_waits(self, m_wait, m_exists):
725+ devpath = self.random_string()
726+ m_exists.side_effect = iter([True, True, True])
727+ multipath.remove_partition(devpath, retries=3)
728+ expected = mock.call(['dmsetup', 'remove', devpath], rcs=[0, 1])
729+ self.m_subp.assert_has_calls([expected] * 3)
730+ self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
731+ self.assertEqual(1, m_wait.call_count)
732+
733+ @mock.patch('curtin.block.multipath.os.path.exists')
734+ @mock.patch('curtin.block.multipath.util.wait_for_removal')
735+ def test_remove_map(self, m_wait, m_exists):
736+ map_id = self.random_string()
737+ devpath = '/dev/mapper/%s' % map_id
738+ m_exists.side_effect = iter([True, True, False])
739+ multipath.remove_map(devpath)
740+ expected = mock.call(['multipath', '-f', devpath], rcs=[0, 1])
741+ self.m_subp.assert_has_calls([expected] * 3)
742+ m_wait.assert_not_called()
743+ self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
744+
745+ @mock.patch('curtin.block.multipath.os.path.exists')
746+ @mock.patch('curtin.block.multipath.util.wait_for_removal')
747+ def test_remove_map_wait(self, m_wait, m_exists):
748+ map_id = self.random_string()
749+ devpath = '/dev/mapper/%s' % map_id
750+ m_exists.side_effect = iter([True, True, True])
751+ multipath.remove_map(devpath, retries=3)
752+ expected = mock.call(['multipath', '-f', devpath], rcs=[0, 1])
753+ self.m_subp.assert_has_calls([expected] * 3)
754+ self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
755+ self.assertEqual(1, m_wait.call_count)
756+
757+ def test_find_mpath_members(self):
758+ mp_id = 'mpatha'
759+ paths = ['device=bar multipath=mpatha',
760+ 'device=wark multipath=mpatha']
761+ self.m_subp.return_value = ("\n".join(paths), "")
762+ self.assertEqual(sorted(['/dev/bar', '/dev/wark']),
763+ sorted(multipath.find_mpath_members(mp_id)))
764+
765+ def test_find_mpath_members_empty(self):
766+ mp_id = self.random_string()
767+ paths = ['device=bar multipath=mpatha',
768+ 'device=wark multipath=mpatha']
769+ self.m_subp.return_value = ("\n".join(paths), "")
770+ self.assertEqual([], multipath.find_mpath_members(mp_id))
771+
772+ def test_find_mpath_id(self):
773+ mp_id = 'mpatha'
774+ maps = ['sysfs=bar multipath=mpatha',
775+ 'sysfs=wark multipath=mpatha']
776+ self.m_subp.return_value = ("\n".join(maps), "")
777+ self.assertEqual(mp_id, multipath.find_mpath_id('/dev/bar'))
778+
779+ def test_find_mpath_id_name(self):
780+ maps = ['sysfs=bar multipath=mpatha name=friendly',
781+ 'sysfs=wark multipath=mpatha']
782+ self.m_subp.return_value = ("\n".join(maps), "")
783+ self.assertEqual('friendly', multipath.find_mpath_id('/dev/bar'))
784+
785+ def test_find_mpath_id_none(self):
786+ maps = ['sysfs=bar multipath=mpatha',
787+ 'sysfs=wark multipath=mpatha']
788+ self.m_subp.return_value = ("\n".join(maps), "")
789+ self.assertEqual(None, multipath.find_mpath_id('/dev/foo'))
790+
791+
792+# vi: ts=4 expandtab syntax=python
793diff --git a/tests/vmtests/__init__.py b/tests/vmtests/__init__.py
794index 5f4a17a..0cfcad3 100644
795--- a/tests/vmtests/__init__.py
796+++ b/tests/vmtests/__init__.py
797@@ -18,6 +18,7 @@ import yaml
798 import curtin.net as curtin_net
799 import curtin.util as util
800 from curtin.block import iscsi
801+from curtin.config import load_config
802
803 from .report_webhook_logger import CaptureReporting
804 from curtin.commands.install import INSTALL_PASS_MSG
805@@ -1612,7 +1613,7 @@ class VMBaseClass(TestCase):
806 logger.debug('test_dname_rules: checking disks: %s', disk_to_check)
807 self.output_files_exist(["udev_rules.d"])
808
809- cfg = yaml.load(self.load_collect_file("root/curtin-install-cfg.yaml"))
810+ cfg = load_config(self.collect_path("root/curtin-install-cfg.yaml"))
811 stgcfg = cfg.get("storage", {}).get("config", [])
812 disks = [ent for ent in stgcfg if (ent.get('type') == 'disk' and
813 'name' in ent)]
814@@ -1751,10 +1752,10 @@ class VMBaseClass(TestCase):
815 @classmethod
816 def get_class_storage_config(cls):
817 sc = cls.load_conf_file()
818- return yaml.load(sc).get('storage', {}).get('config', {})
819+ return yaml.safe_load(sc).get('storage', {}).get('config', {})
820
821 def get_storage_config(self):
822- cfg = yaml.load(self.load_collect_file("root/curtin-install-cfg.yaml"))
823+ cfg = load_config(self.collect_path("root/curtin-install-cfg.yaml"))
824 return cfg.get("storage", {}).get("config", [])
825
826 def has_storage_config(self):
827@@ -1992,7 +1993,7 @@ def generate_user_data(collect_scripts=None, apt_proxy=None,
828 capture=True)
829 # precises' cloud-init version has limited support for cloud-config-archive
830 # and expects cloud-config pieces to be appendable to a single file and
831- # yaml.load()'able. Resolve this by using yaml.dump() when generating
832+ # yaml.safe_load()'able. Resolve this by using yaml.dump() when generating
833 # a list of parts
834 parts = [{'type': 'text/cloud-config',
835 'content': yaml.dump(base_cloudconfig, indent=1)},
836diff --git a/tests/vmtests/releases.py b/tests/vmtests/releases.py
837index accd999..1a92412 100644
838--- a/tests/vmtests/releases.py
839+++ b/tests/vmtests/releases.py
840@@ -121,6 +121,12 @@ class _DiscoBase(_UbuntuBase):
841 mem = "2048"
842
843
844+class _EoanBase(_UbuntuBase):
845+ release = "eoan"
846+ target_release = "eoan"
847+ mem = "2048"
848+
849+
850 class _Releases(object):
851 trusty = _TrustyBase
852 precise = _PreciseBase
853@@ -137,6 +143,7 @@ class _Releases(object):
854 bionic = _BionicBase
855 cosmic = _CosmicBase
856 disco = _DiscoBase
857+ eoan = _EoanBase
858
859
860 class _CentosReleases(object):
861diff --git a/tests/vmtests/test_apt_config_cmd.py b/tests/vmtests/test_apt_config_cmd.py
862index 1296240..13325e5 100644
863--- a/tests/vmtests/test_apt_config_cmd.py
864+++ b/tests/vmtests/test_apt_config_cmd.py
865@@ -5,10 +5,10 @@
866 apt-config standalone command.
867 """
868 import textwrap
869-import yaml
870
871 from . import VMBaseClass
872 from .releases import base_vm_classes as relbase
873+from curtin.config import load_config
874
875
876 class TestAptConfigCMD(VMBaseClass):
877@@ -50,7 +50,7 @@ class TestAptConfigCMD(VMBaseClass):
878 # For earlier than xenial 'apt_preserve_sources_list' is expected
879 self.assertEqual(
880 {'apt': {'preserve_sources_list': True}},
881- yaml.load(self.load_collect_file("curtin-preserve-sources.cfg")))
882+ load_config(self.collect_path("curtin-preserve-sources.cfg")))
883
884
885 class XenialTestAptConfigCMDCMD(relbase.xenial, TestAptConfigCMD):
886@@ -71,4 +71,8 @@ class CosmicTestAptConfigCMDCMD(relbase.cosmic, TestAptConfigCMD):
887 class DiscoTestAptConfigCMDCMD(relbase.disco, TestAptConfigCMD):
888 __test__ = True
889
890+
891+class EoanTestAptConfigCMDCMD(relbase.eoan, TestAptConfigCMD):
892+ __test__ = True
893+
894 # vi: ts=4 expandtab syntax=python
895diff --git a/tests/vmtests/test_apt_source.py b/tests/vmtests/test_apt_source.py
896index 2cd7267..a090ffa 100644
897--- a/tests/vmtests/test_apt_source.py
898+++ b/tests/vmtests/test_apt_source.py
899@@ -4,13 +4,13 @@
900 Collection of tests for the apt configuration features
901 """
902 import textwrap
903-import yaml
904
905 from . import VMBaseClass
906 from .releases import base_vm_classes as relbase
907
908 from unittest import SkipTest
909 from curtin import util
910+from curtin.config import load_config
911
912
913 class TestAptSrcAbs(VMBaseClass):
914@@ -67,7 +67,7 @@ class TestAptSrcAbs(VMBaseClass):
915 # For earlier than xenial 'apt_preserve_sources_list' is expected
916 self.assertEqual(
917 {'apt': {'preserve_sources_list': True}},
918- yaml.load(self.load_collect_file("curtin-preserve-sources.cfg")))
919+ load_config(self.collect_path("curtin-preserve-sources.cfg")))
920
921 def test_source_files(self):
922 """test_source_files - Check generated .lists for correct content"""
923diff --git a/tests/vmtests/test_basic.py b/tests/vmtests/test_basic.py
924index a4a3018..92971b3 100644
925--- a/tests/vmtests/test_basic.py
926+++ b/tests/vmtests/test_basic.py
927@@ -17,7 +17,7 @@ class TestBasicAbs(VMBaseClass):
928 nr_cpus = 2
929 dirty_disks = True
930 conf_file = "examples/tests/basic.yaml"
931- extra_disks = ['128G', '128G', '4G', '4G']
932+ extra_disks = ['15G', '20G', '25G']
933 disk_to_check = [('btrfs_volume', 0),
934 ('main_disk_with_in---valid--dname', 0),
935 ('main_disk_with_in---valid--dname', 1),
936@@ -81,9 +81,6 @@ class TestBasicAbs(VMBaseClass):
937 return kname
938
939 def _test_ptable(self, blkid_output, expected):
940- if self.target_release == "trusty":
941- raise SkipTest("No PTTYPE blkid output on trusty")
942-
943 if not blkid_output:
944 raise RuntimeError('_test_ptable requires blkid output file')
945
946@@ -237,14 +234,6 @@ class Centos70XenialTestBasic(centos_relbase.centos70_xenial,
947 __test__ = True
948
949
950-class TrustyTestBasic(relbase.trusty, TestBasicAbs):
951- __test__ = True
952-
953-
954-class TrustyHWEXTestBasic(relbase.trusty_hwe_x, TrustyTestBasic):
955- __test__ = True
956-
957-
958 class XenialGAi386TestBasic(relbase.xenial_ga, TestBasicAbs):
959 __test__ = True
960 arch = 'i386'
961@@ -274,10 +263,14 @@ class DiscoTestBasic(relbase.disco, TestBasicAbs):
962 __test__ = True
963
964
965+class EoanTestBasic(relbase.eoan, TestBasicAbs):
966+ __test__ = True
967+
968+
969 class TestBasicScsiAbs(TestBasicAbs):
970 conf_file = "examples/tests/basic_scsi.yaml"
971 disk_driver = 'scsi-hd'
972- extra_disks = ['128G', '128G', '4G', '4G']
973+ extra_disks = ['15G', '20G', '25G']
974 extra_collect_scripts = [textwrap.dedent("""
975 cd OUTPUT_COLLECT_D
976 blkid -o export /dev/sda | cat >blkid_output_sda
977@@ -354,7 +347,13 @@ class CosmicTestScsiBasic(relbase.cosmic, TestBasicScsiAbs):
978 __test__ = True
979
980
981+@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
982 class DiscoTestScsiBasic(relbase.disco, TestBasicScsiAbs):
983 __test__ = True
984
985+
986+@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
987+class EoanTestScsiBasic(relbase.eoan, TestBasicScsiAbs):
988+ __test__ = True
989+
990 # vi: ts=4 expandtab syntax=python
991diff --git a/tests/vmtests/test_basic_dasd.py b/tests/vmtests/test_basic_dasd.py
992index 496faf9..763bc9c 100644
993--- a/tests/vmtests/test_basic_dasd.py
994+++ b/tests/vmtests/test_basic_dasd.py
995@@ -67,4 +67,10 @@ class DiscoTestBasicDasd(relbase.disco, TestBasicDasd):
996 self.output_files_exist(["netplan.yaml"])
997
998
999+class EoanTestBasicDasd(relbase.eoan, TestBasicDasd):
1000+ __test__ = True
1001+
1002+ def test_output_files_exist(self):
1003+ self.output_files_exist(["netplan.yaml"])
1004+
1005 # vi: ts=4 expandtab syntax=python
1006diff --git a/tests/vmtests/test_bcache_basic.py b/tests/vmtests/test_bcache_basic.py
1007index b6044d4..12ed8f6 100644
1008--- a/tests/vmtests/test_bcache_basic.py
1009+++ b/tests/vmtests/test_bcache_basic.py
1010@@ -48,14 +48,6 @@ class TestBcacheBasic(VMBaseClass):
1011 self.check_file_regex("proc_cmdline", r"root=UUID=")
1012
1013
1014-class TrustyBcacheBasic(relbase.trusty, TestBcacheBasic):
1015- __test__ = False # covered by test_raid5_bcache
1016-
1017-
1018-class TrustyHWEXBcacheBasic(relbase.trusty_hwe_x, TestBcacheBasic):
1019- __test__ = False # covered by test_raid5_bcache
1020-
1021-
1022 class XenialGABcacheBasic(relbase.xenial_ga, TestBcacheBasic):
1023 __test__ = True
1024
1025@@ -79,4 +71,8 @@ class CosmicBcacheBasic(relbase.cosmic, TestBcacheBasic):
1026 class DiscoBcacheBasic(relbase.disco, TestBcacheBasic):
1027 __test__ = True
1028
1029+
1030+class EoancacheBasic(relbase.eoan, TestBcacheBasic):
1031+ __test__ = True
1032+
1033 # vi: ts=4 expandtab syntax=python
1034diff --git a/tests/vmtests/test_bcache_bug1718699.py b/tests/vmtests/test_bcache_bug1718699.py
1035index 5410dc3..e6c66fc 100644
1036--- a/tests/vmtests/test_bcache_bug1718699.py
1037+++ b/tests/vmtests/test_bcache_bug1718699.py
1038@@ -26,4 +26,8 @@ class CosmicTestBcacheBug1718699(relbase.cosmic, TestBcacheBug1718699):
1039 class DiscoTestBcacheBug1718699(relbase.disco, TestBcacheBug1718699):
1040 __test__ = True
1041
1042+
1043+class EoanTestBcacheBug1718699(relbase.eoan, TestBcacheBug1718699):
1044+ __test__ = True
1045+
1046 # vi: ts=4 expandtab syntax=python
1047diff --git a/tests/vmtests/test_bcache_ceph.py b/tests/vmtests/test_bcache_ceph.py
1048index 30820bd..b8b1d9c 100644
1049--- a/tests/vmtests/test_bcache_ceph.py
1050+++ b/tests/vmtests/test_bcache_ceph.py
1051@@ -59,14 +59,6 @@ class TestBcacheCeph(VMBaseClass):
1052 self.load_collect_file("bcache_ls").splitlines())
1053
1054
1055-class TrustyTestBcacheCeph(relbase.trusty, TestBcacheCeph):
1056- __test__ = False # covered by test_raid5_bcache
1057-
1058-
1059-class TrustyHWEXTestBcacheCeph(relbase.trusty_hwe_x, TestBcacheCeph):
1060- __test__ = False # covered by test_raid5_bcache
1061-
1062-
1063 class XenialGATestBcacheCeph(relbase.xenial_ga, TestBcacheCeph):
1064 __test__ = True
1065
1066@@ -90,4 +82,8 @@ class CosmicTestBcacheCeph(relbase.cosmic, TestBcacheCeph):
1067 class DiscoTestBcacheCeph(relbase.disco, TestBcacheCeph):
1068 __test__ = True
1069
1070+
1071+class EoanTestBcacheCeph(relbase.eoan, TestBcacheCeph):
1072+ __test__ = True
1073+
1074 # vi: ts=4 expandtab syntax=python
1075diff --git a/tests/vmtests/test_bcache_partitions.py b/tests/vmtests/test_bcache_partitions.py
1076index ff86b51..46dbc88 100644
1077--- a/tests/vmtests/test_bcache_partitions.py
1078+++ b/tests/vmtests/test_bcache_partitions.py
1079@@ -32,4 +32,8 @@ class CosmicTestBcachePartitions(relbase.cosmic, TestBcachePartitions):
1080 class DiscoTestBcachePartitions(relbase.disco, TestBcachePartitions):
1081 __test__ = True
1082
1083+
1084+class EoanTestBcachePartitions(relbase.eoan, TestBcachePartitions):
1085+ __test__ = True
1086+
1087 # vi: ts=4 expandtab syntax=python
1088diff --git a/tests/vmtests/test_fs_battery.py b/tests/vmtests/test_fs_battery.py
1089index 347b62a..94850aa 100644
1090--- a/tests/vmtests/test_fs_battery.py
1091+++ b/tests/vmtests/test_fs_battery.py
1092@@ -124,8 +124,6 @@ class TestFsBattery(VMBaseClass):
1093
1094 # tools for these types do not support providing uuid.
1095 no_uuid_types = ['vfat', 'jfs', 'fat16', 'fat32', 'ntfs']
1096- if self.release in ('trusty'):
1097- no_uuid_types += ['btrfs', 'xfs']
1098
1099 for k, v in results.items():
1100 if v['type'] in no_uuid_types:
1101@@ -217,14 +215,6 @@ class Centos70XenialTestFsBattery(centos_relbase.centos70_xenial,
1102 self.assertEqual(sorted(expected), sorted(results))
1103
1104
1105-class TrustyTestFsBattery(relbase.trusty, TestFsBattery):
1106- __test__ = True
1107-
1108-
1109-class TrustyHWEXTestFsBattery(relbase.trusty_hwe_x, TestFsBattery):
1110- __test__ = True
1111-
1112-
1113 class XenialGATestFsBattery(relbase.xenial_ga, TestFsBattery):
1114 __test__ = True
1115
1116@@ -248,4 +238,8 @@ class CosmicTestFsBattery(relbase.cosmic, TestFsBattery):
1117 class DiscoTestFsBattery(relbase.disco, TestFsBattery):
1118 __test__ = True
1119
1120+
1121+class EoanTestFsBattery(relbase.eoan, TestFsBattery):
1122+ __test__ = True
1123+
1124 # vi: ts=4 expandtab syntax=python
1125diff --git a/tests/vmtests/test_install_umount.py b/tests/vmtests/test_install_umount.py
1126index 931cf55..566c4c1 100644
1127--- a/tests/vmtests/test_install_umount.py
1128+++ b/tests/vmtests/test_install_umount.py
1129@@ -28,7 +28,7 @@ class TestInstallUnmount(VMBaseClass):
1130 """Test that install ran with unmount: disabled"""
1131 collect_curtin_cfg = 'root/curtin-install-cfg.yaml'
1132 self.output_files_exist([collect_curtin_cfg])
1133- curtin_cfg = yaml.load(self.load_collect_file(collect_curtin_cfg))
1134+ curtin_cfg = yaml.safe_load(self.load_collect_file(collect_curtin_cfg))
1135
1136 # check that we have
1137 # install:
1138diff --git a/tests/vmtests/test_iscsi.py b/tests/vmtests/test_iscsi.py
1139index 2707d40..3fb2be9 100644
1140--- a/tests/vmtests/test_iscsi.py
1141+++ b/tests/vmtests/test_iscsi.py
1142@@ -55,10 +55,6 @@ class Centos70XenialTestIscsiBasic(centos_relbase.centos70_xenial,
1143 __test__ = True
1144
1145
1146-class TrustyTestIscsiBasic(relbase.trusty, TestBasicIscsiAbs):
1147- __test__ = True
1148-
1149-
1150 class XenialGATestIscsiBasic(relbase.xenial_ga, TestBasicIscsiAbs):
1151 __test__ = True
1152
1153@@ -82,4 +78,8 @@ class CosmicTestIscsiBasic(relbase.cosmic, TestBasicIscsiAbs):
1154 class DiscoTestIscsiBasic(relbase.disco, TestBasicIscsiAbs):
1155 __test__ = True
1156
1157+
1158+class EoanTestIscsiBasic(relbase.eoan, TestBasicIscsiAbs):
1159+ __test__ = True
1160+
1161 # vi: ts=4 expandtab syntax=python
1162diff --git a/tests/vmtests/test_journald_reporter.py b/tests/vmtests/test_journald_reporter.py
1163index 80af61e..71d331c 100644
1164--- a/tests/vmtests/test_journald_reporter.py
1165+++ b/tests/vmtests/test_journald_reporter.py
1166@@ -43,4 +43,8 @@ class CosmicTestJournaldReporter(relbase.cosmic, TestJournaldReporter):
1167 class DiscoTestJournaldReporter(relbase.disco, TestJournaldReporter):
1168 __test__ = True
1169
1170+
1171+class EoanTestJournaldReporter(relbase.eoan, TestJournaldReporter):
1172+ __test__ = True
1173+
1174 # vi: ts=4 expandtab syntax=python
1175diff --git a/tests/vmtests/test_lvm.py b/tests/vmtests/test_lvm.py
1176index fdb5314..d5a7328 100644
1177--- a/tests/vmtests/test_lvm.py
1178+++ b/tests/vmtests/test_lvm.py
1179@@ -47,14 +47,6 @@ class Centos70XenialTestLvm(centos_relbase.centos70_xenial, TestLvmAbs):
1180 __test__ = True
1181
1182
1183-class TrustyTestLvm(relbase.trusty, TestLvmAbs):
1184- __test__ = True
1185-
1186-
1187-class TrustyHWEXTestLvm(relbase.trusty_hwe_x, TestLvmAbs):
1188- __test__ = True
1189-
1190-
1191 class XenialGATestLvm(relbase.xenial_ga, TestLvmAbs):
1192 __test__ = True
1193
1194@@ -78,4 +70,8 @@ class CosmicTestLvm(relbase.cosmic, TestLvmAbs):
1195 class DiscoTestLvm(relbase.disco, TestLvmAbs):
1196 __test__ = True
1197
1198+
1199+class EoanTestLvm(relbase.eoan, TestLvmAbs):
1200+ __test__ = True
1201+
1202 # vi: ts=4 expandtab syntax=python
1203diff --git a/tests/vmtests/test_lvm_iscsi.py b/tests/vmtests/test_lvm_iscsi.py
1204index 6cdcab2..9e42163 100644
1205--- a/tests/vmtests/test_lvm_iscsi.py
1206+++ b/tests/vmtests/test_lvm_iscsi.py
1207@@ -62,10 +62,6 @@ class Centos70XenialTestLvmIscsi(centos_relbase.centos70_xenial,
1208 __test__ = True
1209
1210
1211-class TrustyTestIscsiLvm(relbase.trusty, TestLvmIscsiAbs):
1212- __test__ = True
1213-
1214-
1215 class XenialTestIscsiLvm(relbase.xenial, TestLvmIscsiAbs):
1216 __test__ = True
1217
1218@@ -93,4 +89,8 @@ class CosmicTestIscsiLvm(relbase.cosmic, TestLvmIscsiAbs):
1219 class DiscoTestIscsiLvm(relbase.disco, TestLvmIscsiAbs):
1220 __test__ = True
1221
1222+
1223+class EoanTestIscsiLvm(relbase.eoan, TestLvmIscsiAbs):
1224+ __test__ = True
1225+
1226 # vi: ts=4 expandtab syntax=python
1227diff --git a/tests/vmtests/test_lvm_raid.py b/tests/vmtests/test_lvm_raid.py
1228index d70f3ef..155bbb9 100644
1229--- a/tests/vmtests/test_lvm_raid.py
1230+++ b/tests/vmtests/test_lvm_raid.py
1231@@ -43,6 +43,10 @@ class TestLvmOverRaidAbs(TestMdadmAbs, TestLvmAbs):
1232 self.check_file_strippedline("pvs", "vg0=/dev/md1")
1233
1234
1235+class EoanTestLvmOverRaid(relbase.eoan, TestLvmOverRaidAbs):
1236+ __test__ = True
1237+
1238+
1239 class DiscoTestLvmOverRaid(relbase.disco, TestLvmOverRaidAbs):
1240 __test__ = True
1241
1242diff --git a/tests/vmtests/test_lvm_root.py b/tests/vmtests/test_lvm_root.py
1243index d726a45..33deeac 100644
1244--- a/tests/vmtests/test_lvm_root.py
1245+++ b/tests/vmtests/test_lvm_root.py
1246@@ -48,7 +48,7 @@ class TestLvmRootAbs(VMBaseClass):
1247 self.assertEqual(self.conf_replace['__ROOTFS_FORMAT__'],
1248 entry['fstype'])
1249 else:
1250- # no json output on trusty
1251+ # no json output on older releases
1252 self.output_files_exist(["lsblk.out"])
1253 lsblk_data = open(self.collect_path('lsblk.out')).readlines()
1254 print(lsblk_data)
1255@@ -77,22 +77,6 @@ class Centos70XenialTestLvmRootXfs(centos_relbase.centos70_xenial,
1256 }
1257
1258
1259-class TrustyTestLvmRootExt4(relbase.trusty, TestLvmRootAbs):
1260- __test__ = True
1261- conf_replace = {
1262- '__ROOTFS_FORMAT__': 'ext4',
1263- }
1264-
1265-
1266-class TrustyTestLvmRootXfs(relbase.trusty, TestLvmRootAbs):
1267- __test__ = True
1268- # xfs on trusty can't support uuid=
1269- fstab_expected = {}
1270- conf_replace = {
1271- '__ROOTFS_FORMAT__': 'xfs',
1272- }
1273-
1274-
1275 class XenialTestLvmRootExt4(relbase.xenial, TestLvmRootAbs):
1276 __test__ = True
1277 conf_replace = {
1278diff --git a/tests/vmtests/test_mdadm_bcache.py b/tests/vmtests/test_mdadm_bcache.py
1279index 7168465..6f8bea7 100644
1280--- a/tests/vmtests/test_mdadm_bcache.py
1281+++ b/tests/vmtests/test_mdadm_bcache.py
1282@@ -127,15 +127,6 @@ class TestMdadmBcacheAbs(TestMdadmAbs):
1283 self.test_dname(disk_to_check=self.bcache_dnames)
1284
1285
1286-@VMBaseClass.skip_by_date("1754581", fixby="2020-01-22", install=False)
1287-class TrustyTestMdadmBcache(relbase.trusty, TestMdadmBcacheAbs):
1288- __test__ = True
1289-
1290-
1291-class TrustyHWEXTestMdadmBcache(relbase.trusty_hwe_x, TestMdadmBcacheAbs):
1292- __test__ = True
1293-
1294-
1295 class XenialGATestMdadmBcache(relbase.xenial_ga, TestMdadmBcacheAbs):
1296 __test__ = True
1297
1298@@ -160,6 +151,10 @@ class DiscoTestMdadmBcache(relbase.disco, TestMdadmBcacheAbs):
1299 __test__ = True
1300
1301
1302+class EoanTestMdadmBcache(relbase.eoan, TestMdadmBcacheAbs):
1303+ __test__ = True
1304+
1305+
1306 class TestMirrorbootAbs(TestMdadmAbs):
1307 # alternative config for more complex setup
1308 conf_file = "examples/tests/mirrorboot.yaml"
1309@@ -176,15 +171,6 @@ class Centos70TestMirrorboot(centos_relbase.centos70_xenial,
1310 __test__ = True
1311
1312
1313-class TrustyTestMirrorboot(relbase.trusty, TestMirrorbootAbs):
1314- __test__ = True
1315-
1316-
1317-class TrustyHWEXTestMirrorboot(relbase.trusty_hwe_x, TestMirrorbootAbs):
1318- # This tests kernel upgrade in target
1319- __test__ = True
1320-
1321-
1322 class XenialGATestMirrorboot(relbase.xenial_ga, TestMirrorbootAbs):
1323 __test__ = True
1324
1325@@ -209,6 +195,10 @@ class DiscoTestMirrorboot(relbase.disco, TestMirrorbootAbs):
1326 __test__ = True
1327
1328
1329+class EoanTestMirrorboot(relbase.eoan, TestMirrorbootAbs):
1330+ __test__ = True
1331+
1332+
1333 class TestMirrorbootPartitionsAbs(TestMdadmAbs):
1334 # alternative config for more complex setup
1335 conf_file = "examples/tests/mirrorboot-msdos-partition.yaml"
1336@@ -224,17 +214,6 @@ class Centos70TestMirrorbootPartitions(centos_relbase.centos70_xenial,
1337 __test__ = True
1338
1339
1340-class TrustyTestMirrorbootPartitions(relbase.trusty,
1341- TestMirrorbootPartitionsAbs):
1342- __test__ = True
1343-
1344-
1345-class TrustyHWEXTestMirrorbootPartitions(relbase.trusty_hwe_x,
1346- TestMirrorbootPartitionsAbs):
1347- # This tests kernel upgrade in target
1348- __test__ = True
1349-
1350-
1351 class XenialGATestMirrorbootPartitions(relbase.xenial_ga,
1352 TestMirrorbootPartitionsAbs):
1353 __test__ = True
1354@@ -265,6 +244,11 @@ class DiscoTestMirrorbootPartitions(relbase.disco,
1355 __test__ = True
1356
1357
1358+class EoanTestMirrorbootPartitions(relbase.eoan,
1359+ TestMirrorbootPartitionsAbs):
1360+ __test__ = True
1361+
1362+
1363 class TestMirrorbootPartitionsUEFIAbs(TestMdadmAbs):
1364 # alternative config for more complex setup
1365 conf_file = "examples/tests/mirrorboot-uefi.yaml"
1366@@ -285,11 +269,6 @@ class Centos70TestMirrorbootPartitionsUEFI(centos_relbase.centos70_xenial,
1367 __test__ = True
1368
1369
1370-class TrustyTestMirrorbootPartitionsUEFI(relbase.trusty,
1371- TestMirrorbootPartitionsUEFIAbs):
1372- __test__ = True
1373-
1374-
1375 class XenialGATestMirrorbootPartitionsUEFI(relbase.xenial_ga,
1376 TestMirrorbootPartitionsUEFIAbs):
1377 __test__ = True
1378@@ -320,6 +299,11 @@ class DiscoTestMirrorbootPartitionsUEFI(relbase.disco,
1379 __test__ = True
1380
1381
1382+class EoanTestMirrorbootPartitionsUEFI(relbase.eoan,
1383+ TestMirrorbootPartitionsUEFIAbs):
1384+ __test__ = True
1385+
1386+
1387 class TestRaid5bootAbs(TestMdadmAbs):
1388 # alternative config for more complex setup
1389 conf_file = "examples/tests/raid5boot.yaml"
1390@@ -336,15 +320,6 @@ class Centos70TestRaid5boot(centos_relbase.centos70_xenial, TestRaid5bootAbs):
1391 __test__ = True
1392
1393
1394-class TrustyTestRaid5boot(relbase.trusty, TestRaid5bootAbs):
1395- __test__ = True
1396-
1397-
1398-class TrustyHWEXTestRaid5boot(relbase.trusty_hwe_x, TestRaid5bootAbs):
1399- # This tests kernel upgrade in target
1400- __test__ = True
1401-
1402-
1403 class XenialGATestRaid5boot(relbase.xenial_ga, TestRaid5bootAbs):
1404 __test__ = True
1405
1406@@ -369,6 +344,10 @@ class DiscoTestRaid5boot(relbase.disco, TestRaid5bootAbs):
1407 __test__ = True
1408
1409
1410+class EoanTestRaid5boot(relbase.eoan, TestRaid5bootAbs):
1411+ __test__ = True
1412+
1413+
1414 class TestRaid6bootAbs(TestMdadmAbs):
1415 # alternative config for more complex setup
1416 conf_file = "examples/tests/raid6boot.yaml"
1417@@ -401,14 +380,6 @@ class Centos70TestRaid6boot(centos_relbase.centos70_xenial, TestRaid6bootAbs):
1418 __test__ = True
1419
1420
1421-class TrustyTestRaid6boot(relbase.trusty, TestRaid6bootAbs):
1422- __test__ = True
1423-
1424-
1425-class TrustyHWEXTestRaid6boot(relbase.trusty_hwe_x, TestRaid6bootAbs):
1426- __test__ = True
1427-
1428-
1429 class XenialGATestRaid6boot(relbase.xenial_ga, TestRaid6bootAbs):
1430 __test__ = True
1431
1432@@ -433,6 +404,10 @@ class DiscoTestRaid6boot(relbase.disco, TestRaid6bootAbs):
1433 __test__ = True
1434
1435
1436+class EoanTestRaid6boot(relbase.eoan, TestRaid6bootAbs):
1437+ __test__ = True
1438+
1439+
1440 class TestRaid10bootAbs(TestMdadmAbs):
1441 # alternative config for more complex setup
1442 conf_file = "examples/tests/raid10boot.yaml"
1443@@ -451,14 +426,6 @@ class Centos70TestRaid10boot(centos_relbase.centos70_xenial,
1444 __test__ = True
1445
1446
1447-class TrustyTestRaid10boot(relbase.trusty, TestRaid10bootAbs):
1448- __test__ = True
1449-
1450-
1451-class TrustyHWEXTestRaid10boot(relbase.trusty_hwe_x, TestRaid10bootAbs):
1452- __test__ = True
1453-
1454-
1455 class XenialGATestRaid10boot(relbase.xenial_ga, TestRaid10bootAbs):
1456 __test__ = True
1457
1458@@ -483,6 +450,10 @@ class DiscoTestRaid10boot(relbase.disco, TestRaid10bootAbs):
1459 __test__ = True
1460
1461
1462+class EoanTestRaid10boot(relbase.eoan, TestRaid10bootAbs):
1463+ __test__ = True
1464+
1465+
1466 class TestAllindataAbs(TestMdadmAbs):
1467 # more complex, needs more time
1468 # alternative config for more complex setup
1469@@ -559,14 +530,6 @@ class TestAllindataAbs(TestMdadmAbs):
1470 self.check_file_regex("xfs_info", r"^meta-data=/dev/mapper/dmcrypt0")
1471
1472
1473-class TrustyTestAllindata(relbase.trusty, TestAllindataAbs):
1474- __test__ = False # luks=no does not disable mounting of device
1475-
1476-
1477-class TrustyHWEXTestAllindata(relbase.trusty_hwe_x, TestAllindataAbs):
1478- __test__ = False # lukes=no does not disable mounting of device
1479-
1480-
1481 class XenialGATestAllindata(relbase.xenial_ga, TestAllindataAbs):
1482 __test__ = True
1483
1484@@ -587,8 +550,11 @@ class CosmicTestAllindata(relbase.cosmic, TestAllindataAbs):
1485 __test__ = True
1486
1487
1488-@VMBaseClass.skip_by_date("1818876", fixby="2019-04-22", install=False)
1489 class DiscoTestAllindata(relbase.disco, TestAllindataAbs):
1490 __test__ = True
1491
1492+
1493+class EoanTestAllindata(relbase.eoan, TestAllindataAbs):
1494+ __test__ = True
1495+
1496 # vi: ts=4 expandtab syntax=python
1497diff --git a/tests/vmtests/test_mdadm_iscsi.py b/tests/vmtests/test_mdadm_iscsi.py
1498index b43855d..fa8d88f 100644
1499--- a/tests/vmtests/test_mdadm_iscsi.py
1500+++ b/tests/vmtests/test_mdadm_iscsi.py
1501@@ -34,10 +34,6 @@ class Centos70TestIscsiMdadm(centos_relbase.centos70_xenial,
1502 __test__ = True
1503
1504
1505-class TrustyTestIscsiMdadm(relbase.trusty, TestMdadmIscsiAbs):
1506- __test__ = True
1507-
1508-
1509 class XenialGATestIscsiMdadm(relbase.xenial_ga, TestMdadmIscsiAbs):
1510 __test__ = True
1511
1512@@ -61,4 +57,8 @@ class CosmicTestIscsiMdadm(relbase.cosmic, TestMdadmIscsiAbs):
1513 class DiscoTestIscsiMdadm(relbase.disco, TestMdadmIscsiAbs):
1514 __test__ = True
1515
1516+
1517+class EoanTestIscsiMdadm(relbase.eoan, TestMdadmIscsiAbs):
1518+ __test__ = True
1519+
1520 # vi: ts=4 expandtab syntax=python
1521diff --git a/tests/vmtests/test_multipath.py b/tests/vmtests/test_multipath.py
1522index a22bc0f..7711198 100644
1523--- a/tests/vmtests/test_multipath.py
1524+++ b/tests/vmtests/test_multipath.py
1525@@ -64,15 +64,6 @@ class Centos70TestMultipathBasic(centos_relbase.centos70_xenial,
1526 __test__ = True
1527
1528
1529-class TrustyTestMultipathBasic(relbase.trusty, TestMultipathBasicAbs):
1530- __test__ = True
1531-
1532-
1533-class TrustyHWEXTestMultipathBasic(relbase.trusty_hwe_x,
1534- TestMultipathBasicAbs):
1535- __test__ = True
1536-
1537-
1538 class XenialGATestMultipathBasic(relbase.xenial_ga, TestMultipathBasicAbs):
1539 __test__ = True
1540
1541@@ -93,7 +84,13 @@ class CosmicTestMultipathBasic(relbase.cosmic, TestMultipathBasicAbs):
1542 __test__ = True
1543
1544
1545+@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
1546 class DiscoTestMultipathBasic(relbase.disco, TestMultipathBasicAbs):
1547 __test__ = True
1548
1549+
1550+@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
1551+class EoanTestMultipathBasic(relbase.eoan, TestMultipathBasicAbs):
1552+ __test__ = True
1553+
1554 # vi: ts=4 expandtab syntax=python
1555diff --git a/tests/vmtests/test_network.py b/tests/vmtests/test_network.py
1556index 1b0e41c..2c3b73c 100644
1557--- a/tests/vmtests/test_network.py
1558+++ b/tests/vmtests/test_network.py
1559@@ -440,29 +440,6 @@ class CentosTestNetworkBasicAbs(TestNetworkBaseTestsAbs):
1560 pass
1561
1562
1563-class TrustyTestNetworkBasic(relbase.trusty, TestNetworkBasicAbs):
1564- __test__ = True
1565-
1566-
1567-class TrustyHWEUTestNetworkBasic(relbase.trusty_hwe_u, TrustyTestNetworkBasic):
1568- # Working, off by default to safe test suite runtime, covered by bonding
1569- __test__ = False
1570-
1571-
1572-class TrustyHWEVTestNetworkBasic(relbase.trusty_hwe_v, TrustyTestNetworkBasic):
1573- # Working, off by default to safe test suite runtime, covered by bonding
1574- __test__ = False
1575-
1576-
1577-class TrustyHWEWTestNetworkBasic(relbase.trusty_hwe_w, TrustyTestNetworkBasic):
1578- # Working, off by default to safe test suite runtime, covered by bonding
1579- __test__ = False
1580-
1581-
1582-class TrustyHWEXTestNetworkBasic(relbase.trusty_hwe_x, TrustyTestNetworkBasic):
1583- __test__ = True
1584-
1585-
1586 class XenialTestNetworkBasic(relbase.xenial, TestNetworkBasicAbs):
1587 __test__ = True
1588
1589@@ -479,6 +456,10 @@ class DiscoTestNetworkBasic(relbase.disco, TestNetworkBasicAbs):
1590 __test__ = True
1591
1592
1593+class EoanTestNetworkBasic(relbase.eoan, TestNetworkBasicAbs):
1594+ __test__ = True
1595+
1596+
1597 class Centos66TestNetworkBasic(centos_relbase.centos66_xenial,
1598 CentosTestNetworkBasicAbs):
1599 __test__ = True
1600diff --git a/tests/vmtests/test_network_alias.py b/tests/vmtests/test_network_alias.py
1601index b2c4ed7..fb4fb2c 100644
1602--- a/tests/vmtests/test_network_alias.py
1603+++ b/tests/vmtests/test_network_alias.py
1604@@ -44,29 +44,6 @@ class Centos70TestNetworkAlias(centos_relbase.centos70_xenial,
1605 __test__ = True
1606
1607
1608-class TrustyTestNetworkAlias(relbase.trusty, TestNetworkAliasAbs):
1609- __test__ = True
1610-
1611-
1612-class TrustyHWEUTestNetworkAlias(relbase.trusty_hwe_u, TrustyTestNetworkAlias):
1613- # Working, off by default to safe test suite runtime, covered by bonding
1614- __test__ = False
1615-
1616-
1617-class TrustyHWEVTestNetworkAlias(relbase.trusty_hwe_v, TrustyTestNetworkAlias):
1618- # Working, off by default to safe test suite runtime, covered by bonding
1619- __test__ = False
1620-
1621-
1622-class TrustyHWEWTestNetworkAlias(relbase.trusty_hwe_w, TrustyTestNetworkAlias):
1623- # Working, off by default to safe test suite runtime, covered by bonding
1624- __test__ = False
1625-
1626-
1627-class TrustyHWEXTestNetworkAlias(relbase.trusty_hwe_x, TrustyTestNetworkAlias):
1628- __test__ = True
1629-
1630-
1631 class XenialTestNetworkAlias(relbase.xenial, TestNetworkAliasAbs):
1632 __test__ = True
1633
1634@@ -82,4 +59,8 @@ class CosmicTestNetworkAlias(relbase.cosmic, TestNetworkAliasAbs):
1635 class DiscoTestNetworkAlias(relbase.disco, TestNetworkAliasAbs):
1636 __test__ = True
1637
1638+
1639+class EoanTestNetworkAlias(relbase.eoan, TestNetworkAliasAbs):
1640+ __test__ = True
1641+
1642 # vi: ts=4 expandtab syntax=python
1643diff --git a/tests/vmtests/test_network_bonding.py b/tests/vmtests/test_network_bonding.py
1644index fe3abe9..a66591a 100644
1645--- a/tests/vmtests/test_network_bonding.py
1646+++ b/tests/vmtests/test_network_bonding.py
1647@@ -49,26 +49,6 @@ class CentosTestNetworkBondingAbs(TestNetworkBondingAbs):
1648 pass
1649
1650
1651-class TrustyTestBonding(relbase.trusty, TestNetworkBondingAbs):
1652- __test__ = False
1653-
1654-
1655-class TrustyHWEVTestBonding(relbase.trusty_hwe_v, TrustyTestBonding):
1656- # Working, but off by default to save test suite runtime
1657- # oldest/newest HWE-* covered above/below
1658- __test__ = False
1659-
1660-
1661-class TrustyHWEWTestBonding(relbase.trusty_hwe_w, TrustyTestBonding):
1662- # Working, but off by default to save test suite runtime
1663- # oldest/newest HWE-* covered above/below
1664- __test__ = False
1665-
1666-
1667-class TrustyHWEXTestBonding(relbase.trusty_hwe_x, TrustyTestBonding):
1668- __test__ = True
1669-
1670-
1671 class XenialTestBonding(relbase.xenial, TestNetworkBondingAbs):
1672 __test__ = True
1673
1674@@ -85,6 +65,10 @@ class DiscoTestBonding(relbase.disco, TestNetworkBondingAbs):
1675 __test__ = True
1676
1677
1678+class EoanTestBonding(relbase.eoan, TestNetworkBondingAbs):
1679+ __test__ = True
1680+
1681+
1682 class Centos66TestNetworkBonding(centos_relbase.centos66_xenial,
1683 CentosTestNetworkBondingAbs):
1684 __test__ = True
1685diff --git a/tests/vmtests/test_network_bridging.py b/tests/vmtests/test_network_bridging.py
1686index 8576d60..b3ec287 100644
1687--- a/tests/vmtests/test_network_bridging.py
1688+++ b/tests/vmtests/test_network_bridging.py
1689@@ -243,4 +243,8 @@ class CosmicTestBridging(relbase.cosmic, TestBridgeNetworkAbs):
1690 class DiscoTestBridging(relbase.disco, TestBridgeNetworkAbs):
1691 __test__ = True
1692
1693+
1694+class EoanTestBridging(relbase.eoan, TestBridgeNetworkAbs):
1695+ __test__ = True
1696+
1697 # vi: ts=4 expandtab syntax=python
1698diff --git a/tests/vmtests/test_network_enisource.py b/tests/vmtests/test_network_enisource.py
1699index 48baecf..476275c 100644
1700--- a/tests/vmtests/test_network_enisource.py
1701+++ b/tests/vmtests/test_network_enisource.py
1702@@ -82,15 +82,6 @@ class TestNetworkENISource(TestNetworkBaseTestsAbs):
1703 self.assertEqual(_nocidr(expected_address), _nocidr(actual_address))
1704
1705
1706-class TrustyTestNetworkENISource(relbase.trusty, TestNetworkENISource):
1707- __test__ = True
1708-
1709-
1710-class TrustyHWEXTestNetworkENISource(relbase.trusty_hwe_x,
1711- TestNetworkENISource):
1712- __test__ = True
1713-
1714-
1715 class XenialTestNetworkENISource(relbase.xenial, TestNetworkENISource):
1716 __test__ = True
1717
1718diff --git a/tests/vmtests/test_network_ipv6.py b/tests/vmtests/test_network_ipv6.py
1719index 42adb20..9b6acc9 100644
1720--- a/tests/vmtests/test_network_ipv6.py
1721+++ b/tests/vmtests/test_network_ipv6.py
1722@@ -45,25 +45,6 @@ class CentosTestNetworkIPV6Abs(TestNetworkIPV6Abs):
1723 pass
1724
1725
1726-class TrustyTestNetworkIPV6(relbase.trusty, TestNetworkIPV6Abs):
1727- __test__ = True
1728-
1729-
1730-class TrustyHWEVTestNetworkIPV6(relbase.trusty_hwe_v, TrustyTestNetworkIPV6):
1731- # Working, off by default to safe test suite runtime, covered by bonding
1732- __test__ = False
1733-
1734-
1735-class TrustyHWEWTestNetworkIPV6(relbase.trusty_hwe_w, TrustyTestNetworkIPV6):
1736- # Working, off by default to safe test suite runtime, covered by bonding
1737- __test__ = False
1738-
1739-
1740-class TrustyHWEXTestNetworkIPV6(relbase.trusty_hwe_x, TrustyTestNetworkIPV6):
1741- # Working, off by default to safe test suite runtime, covered by bonding
1742- __test__ = False
1743-
1744-
1745 class XenialTestNetworkIPV6(relbase.xenial, TestNetworkIPV6Abs):
1746 __test__ = True
1747
1748@@ -80,6 +61,10 @@ class DiscoTestNetworkIPV6(relbase.disco, TestNetworkIPV6Abs):
1749 __test__ = True
1750
1751
1752+class EoanTestNetworkIPV6(relbase.eoan, TestNetworkIPV6Abs):
1753+ __test__ = True
1754+
1755+
1756 class Centos66TestNetworkIPV6(centos_relbase.centos66_xenial,
1757 CentosTestNetworkIPV6Abs):
1758 __test__ = True
1759diff --git a/tests/vmtests/test_network_ipv6_enisource.py b/tests/vmtests/test_network_ipv6_enisource.py
1760index 0c92039..bd03bdd 100644
1761--- a/tests/vmtests/test_network_ipv6_enisource.py
1762+++ b/tests/vmtests/test_network_ipv6_enisource.py
1763@@ -14,15 +14,6 @@ class TestNetworkIPV6ENISource(TestNetworkENISource):
1764 pass
1765
1766
1767-class TrustyTestNetworkIPV6ENISource(relbase.trusty, TestNetworkIPV6ENISource):
1768- __test__ = True
1769-
1770-
1771-class TrustyHWEXTestNetworkIPV6ENISource(relbase.trusty_hwe_x,
1772- TestNetworkIPV6ENISource):
1773- __test__ = True
1774-
1775-
1776 class XenialTestNetworkIPV6ENISource(relbase.xenial, TestNetworkIPV6ENISource):
1777 __test__ = True
1778
1779diff --git a/tests/vmtests/test_network_ipv6_static.py b/tests/vmtests/test_network_ipv6_static.py
1780index bbd90c9..b79b9e4 100644
1781--- a/tests/vmtests/test_network_ipv6_static.py
1782+++ b/tests/vmtests/test_network_ipv6_static.py
1783@@ -15,33 +15,6 @@ class CentosTestNetworkIPV6StaticAbs(CentosTestNetworkStaticAbs):
1784 conf_file = "examples/tests/basic_network_static_ipv6.yaml"
1785
1786
1787-class TrustyTestNetworkIPV6Static(relbase.trusty, TestNetworkIPV6StaticAbs):
1788- __test__ = True
1789-
1790-
1791-class TrustyHWEUTestNetworkIPV6Static(relbase.trusty_hwe_u,
1792- TestNetworkIPV6StaticAbs):
1793- # unsupported kernel, 2016-08
1794- __test__ = False
1795-
1796-
1797-class TrustyHWEVTestNetworkIPV6Static(relbase.trusty_hwe_v,
1798- TestNetworkIPV6StaticAbs):
1799- # unsupported kernel, 2016-08
1800- __test__ = False
1801-
1802-
1803-class TrustyHWEWTestNetworkIPV6Static(relbase.trusty_hwe_w,
1804- TestNetworkIPV6StaticAbs):
1805- # unsupported kernel, 2016-08
1806- __test__ = False
1807-
1808-
1809-class TrustyHWEXTestNetworkIPV6Static(relbase.trusty_hwe_x,
1810- TestNetworkIPV6StaticAbs):
1811- __test__ = True
1812-
1813-
1814 class XenialTestNetworkIPV6Static(relbase.xenial, TestNetworkIPV6StaticAbs):
1815 __test__ = True
1816
1817@@ -58,6 +31,10 @@ class DiscoTestNetworkIPV6Static(relbase.disco, TestNetworkIPV6StaticAbs):
1818 __test__ = True
1819
1820
1821+class EoanTestNetworkIPV6Static(relbase.eoan, TestNetworkIPV6StaticAbs):
1822+ __test__ = True
1823+
1824+
1825 class Centos66TestNetworkIPV6Static(centos_relbase.centos66_xenial,
1826 CentosTestNetworkIPV6StaticAbs):
1827 __test__ = True
1828diff --git a/tests/vmtests/test_network_ipv6_vlan.py b/tests/vmtests/test_network_ipv6_vlan.py
1829index 7401d2c..138ea6a 100644
1830--- a/tests/vmtests/test_network_ipv6_vlan.py
1831+++ b/tests/vmtests/test_network_ipv6_vlan.py
1832@@ -14,15 +14,6 @@ class CentosTestNetworkIPV6VlanAbs(CentosTestNetworkVlanAbs):
1833 conf_file = "examples/tests/vlan_network_ipv6.yaml"
1834
1835
1836-class TrustyTestNetworkIPV6Vlan(relbase.trusty, TestNetworkIPV6VlanAbs):
1837- __test__ = True
1838-
1839-
1840-class TrustyHWEXTestNetworkIPV6Vlan(relbase.trusty_hwe_x,
1841- TestNetworkIPV6VlanAbs):
1842- __test__ = True
1843-
1844-
1845 class XenialTestNetworkIPV6Vlan(relbase.xenial, TestNetworkIPV6VlanAbs):
1846 __test__ = True
1847
1848@@ -39,6 +30,10 @@ class DiscoTestNetworkIPV6Vlan(relbase.disco, TestNetworkIPV6VlanAbs):
1849 __test__ = True
1850
1851
1852+class EoanTestNetworkIPV6Vlan(relbase.eoan, TestNetworkIPV6VlanAbs):
1853+ __test__ = True
1854+
1855+
1856 class Centos66TestNetworkIPV6Vlan(centos_relbase.centos66_xenial,
1857 CentosTestNetworkIPV6VlanAbs):
1858 __test__ = True
1859diff --git a/tests/vmtests/test_network_mtu.py b/tests/vmtests/test_network_mtu.py
1860index affa6aa..30cc2c8 100644
1861--- a/tests/vmtests/test_network_mtu.py
1862+++ b/tests/vmtests/test_network_mtu.py
1863@@ -161,54 +161,30 @@ class CentosTestNetworkMtuAbs(TestNetworkMtuAbs):
1864 pass
1865
1866
1867-class TrustyTestNetworkMtu(relbase.trusty, TestNetworkMtuAbs):
1868- __test__ = True
1869-
1870- # FIXME: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809714
1871- # fixed in newer ifupdown than is in trusty
1872- def test_ipv6_mtu_smaller_than_ipv4_non_default(self):
1873- # trusty ifupdown uses device mtu to change v6 mtu
1874- pass
1875-
1876-
1877-class TrustyHWEUTestNetworkMtu(relbase.trusty_hwe_u, TrustyTestNetworkMtu):
1878- # unsupported kernel, 2016-08
1879- __test__ = False
1880-
1881-
1882-class TrustyHWEVTestNetworkMtu(relbase.trusty_hwe_v, TrustyTestNetworkMtu):
1883- # unsupported kernel, 2016-08
1884- __test__ = False
1885-
1886-
1887-class TrustyHWEWTestNetworkMtu(relbase.trusty_hwe_w, TrustyTestNetworkMtu):
1888- # unsupported kernel, 2016-08
1889- __test__ = False
1890-
1891-
1892-class TrustyHWEXTestNetworkMtu(relbase.trusty_hwe_x, TrustyTestNetworkMtu):
1893- __test__ = True
1894-
1895-
1896 class TestNetworkMtu(relbase.xenial, TestNetworkMtuAbs):
1897 __test__ = True
1898
1899
1900-@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-05-02")
1901+@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
1902 class BionicTestNetworkMtu(relbase.bionic, TestNetworkMtuAbs):
1903 __test__ = True
1904
1905
1906-@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-05-02")
1907+@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
1908 class CosmicTestNetworkMtu(relbase.cosmic, TestNetworkMtuAbs):
1909 __test__ = True
1910
1911
1912-@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-05-02")
1913+@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
1914 class DiscoTestNetworkMtu(relbase.disco, TestNetworkMtuAbs):
1915 __test__ = True
1916
1917
1918+@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
1919+class EoanTestNetworkMtu(relbase.eoan, TestNetworkMtuAbs):
1920+ __test__ = True
1921+
1922+
1923 class Centos66TestNetworkMtu(centos_relbase.centos66_xenial,
1924 CentosTestNetworkMtuAbs):
1925 __test__ = True
1926diff --git a/tests/vmtests/test_network_static.py b/tests/vmtests/test_network_static.py
1927index 6820c33..9706a2d 100644
1928--- a/tests/vmtests/test_network_static.py
1929+++ b/tests/vmtests/test_network_static.py
1930@@ -20,33 +20,6 @@ class CentosTestNetworkStaticAbs(TestNetworkStaticAbs):
1931 pass
1932
1933
1934-class TrustyTestNetworkStatic(relbase.trusty, TestNetworkStaticAbs):
1935- __test__ = True
1936-
1937-
1938-class TrustyHWEUTestNetworkStatic(relbase.trusty_hwe_u,
1939- TrustyTestNetworkStatic):
1940- # Working, off by default to safe test suite runtime, covered by bonding
1941- __test__ = False
1942-
1943-
1944-class TrustyHWEVTestNetworkStatic(relbase.trusty_hwe_v,
1945- TrustyTestNetworkStatic):
1946- # Working, off by default to safe test suite runtime, covered by bonding
1947- __test__ = False
1948-
1949-
1950-class TrustyHWEWTestNetworkStatic(relbase.trusty_hwe_w,
1951- TrustyTestNetworkStatic):
1952- # Working, off by default to safe test suite runtime, covered by bonding
1953- __test__ = False
1954-
1955-
1956-class TrustyHWEXTestNetworkStatic(relbase.trusty_hwe_x,
1957- TrustyTestNetworkStatic):
1958- __test__ = True
1959-
1960-
1961 class XenialTestNetworkStatic(relbase.xenial, TestNetworkStaticAbs):
1962 __test__ = True
1963
1964@@ -63,6 +36,10 @@ class DiscoTestNetworkStatic(relbase.disco, TestNetworkStaticAbs):
1965 __test__ = True
1966
1967
1968+class EoanTestNetworkStatic(relbase.eoan, TestNetworkStaticAbs):
1969+ __test__ = True
1970+
1971+
1972 class Centos66TestNetworkStatic(centos_relbase.centos66_xenial,
1973 CentosTestNetworkStaticAbs):
1974 __test__ = True
1975diff --git a/tests/vmtests/test_network_static_routes.py b/tests/vmtests/test_network_static_routes.py
1976index 405a730..b441bc9 100644
1977--- a/tests/vmtests/test_network_static_routes.py
1978+++ b/tests/vmtests/test_network_static_routes.py
1979@@ -18,32 +18,6 @@ class CentosTestNetworkStaticRoutesAbs(CentosTestNetworkBasicAbs):
1980 conf_file = "examples/tests/network_static_routes.yaml"
1981
1982
1983-class TrustyTestNetworkStaticRoutes(relbase.trusty,
1984- TestNetworkStaticRoutesAbs):
1985- __test__ = True
1986-
1987-
1988-class TrustyHWEUTestNetworkStaticRoutes(relbase.trusty_hwe_u,
1989- TrustyTestNetworkStaticRoutes):
1990- # Working, off by default to save test suite runtime, covered by
1991- # TrustyTestNetworkStaticRoutes
1992- __test__ = False
1993-
1994-
1995-class TrustyHWEVTestNetworkStaticRoutes(relbase.trusty_hwe_v,
1996- TrustyTestNetworkStaticRoutes):
1997- # Working, off by default to save test suite runtime, covered by
1998- # TrustyTestNetworkStaticRoutes
1999- __test__ = False
2000-
2001-
2002-class TrustyHWEWTestNetworkStaticRoutes(relbase.trusty_hwe_w,
2003- TrustyTestNetworkStaticRoutes):
2004- # Working, off by default to save test suite runtime, covered by
2005- # TrustyTestNetworkStaticRoutes
2006- __test__ = False
2007-
2008-
2009 class XenialTestNetworkStaticRoutes(relbase.xenial,
2010 TestNetworkStaticRoutesAbs):
2011 __test__ = True
2012@@ -64,6 +38,11 @@ class DiscoTestNetworkStaticRoutes(relbase.disco,
2013 __test__ = True
2014
2015
2016+class EoanTestNetworkStaticRoutes(relbase.eoan,
2017+ TestNetworkStaticRoutesAbs):
2018+ __test__ = True
2019+
2020+
2021 class Centos66TestNetworkStaticRoutes(centos_relbase.centos66_xenial,
2022 CentosTestNetworkStaticRoutesAbs):
2023 __test__ = False
2024diff --git a/tests/vmtests/test_network_vlan.py b/tests/vmtests/test_network_vlan.py
2025index 904f8c2..88e3d35 100644
2026--- a/tests/vmtests/test_network_vlan.py
2027+++ b/tests/vmtests/test_network_vlan.py
2028@@ -68,14 +68,6 @@ class CentosTestNetworkVlanAbs(TestNetworkVlanAbs):
2029 pass
2030
2031
2032-class TrustyTestNetworkVlan(relbase.trusty, TestNetworkVlanAbs):
2033- __test__ = True
2034-
2035-
2036-class TrustyHWEXTestNetworkVlan(relbase.trusty_hwe_x, TestNetworkVlanAbs):
2037- __test__ = True
2038-
2039-
2040 class XenialTestNetworkVlan(relbase.xenial, TestNetworkVlanAbs):
2041 __test__ = True
2042
2043@@ -92,6 +84,10 @@ class DiscoTestNetworkVlan(relbase.disco, TestNetworkVlanAbs):
2044 __test__ = True
2045
2046
2047+class EoanTestNetworkVlan(relbase.eoan, TestNetworkVlanAbs):
2048+ __test__ = True
2049+
2050+
2051 class Centos66TestNetworkVlan(centos_relbase.centos66_xenial,
2052 CentosTestNetworkVlanAbs):
2053 __test__ = True
2054diff --git a/tests/vmtests/test_nvme.py b/tests/vmtests/test_nvme.py
2055index 60d9d86..730057e 100644
2056--- a/tests/vmtests/test_nvme.py
2057+++ b/tests/vmtests/test_nvme.py
2058@@ -57,14 +57,6 @@ class Centos70TestNvme(centos70_xenial, TestNvmeAbs):
2059 __test__ = True
2060
2061
2062-class TrustyTestNvme(relbase.trusty, TestNvmeAbs):
2063- __test__ = True
2064-
2065-
2066-class TrustyHWEXTestNvme(relbase.trusty_hwe_x, TestNvmeAbs):
2067- __test__ = True
2068-
2069-
2070 class XenialGATestNvme(relbase.xenial_ga, TestNvmeAbs):
2071 __test__ = True
2072
2073@@ -85,7 +77,11 @@ class CosmicTestNvme(relbase.cosmic, TestNvmeAbs):
2074 __test__ = True
2075
2076
2077-class DiscoTestNvme(relbase.cosmic, TestNvmeAbs):
2078+class DiscoTestNvme(relbase.disco, TestNvmeAbs):
2079+ __test__ = True
2080+
2081+
2082+class EoanTestNvme(relbase.eoan, TestNvmeAbs):
2083 __test__ = True
2084
2085
2086@@ -158,4 +154,8 @@ class CosmicTestNvmeBcache(relbase.cosmic, TestNvmeBcacheAbs):
2087 class DiscoTestNvmeBcache(relbase.disco, TestNvmeBcacheAbs):
2088 __test__ = True
2089
2090+
2091+class EoanTestNvmeBcache(relbase.eoan, TestNvmeBcacheAbs):
2092+ __test__ = True
2093+
2094 # vi: ts=4 expandtab syntax=python
2095diff --git a/tests/vmtests/test_old_apt_features.py b/tests/vmtests/test_old_apt_features.py
2096index ec3765c..a114bf4 100644
2097--- a/tests/vmtests/test_old_apt_features.py
2098+++ b/tests/vmtests/test_old_apt_features.py
2099@@ -5,12 +5,13 @@
2100 """
2101 import re
2102 import textwrap
2103-import yaml
2104+
2105
2106 from . import VMBaseClass
2107 from .releases import base_vm_classes as relbase
2108
2109 from curtin import util
2110+from curtin.config import load_config
2111
2112
2113 def sources_to_dict(lines):
2114@@ -75,7 +76,7 @@ class TestOldAptAbs(VMBaseClass):
2115 # For earlier than xenial 'apt_preserve_sources_list' is expected
2116 self.assertEqual(
2117 {'apt': {'preserve_sources_list': True}},
2118- yaml.load(self.load_collect_file("curtin-preserve-sources.cfg")))
2119+ load_config(self.collect_path("curtin-preserve-sources.cfg")))
2120
2121 def test_debconf(self):
2122 """test_debconf - Check if debconf is in place"""
2123diff --git a/tests/vmtests/test_pollinate_useragent.py b/tests/vmtests/test_pollinate_useragent.py
2124index c1c6c36..d9d9d9d 100644
2125--- a/tests/vmtests/test_pollinate_useragent.py
2126+++ b/tests/vmtests/test_pollinate_useragent.py
2127@@ -53,10 +53,6 @@ class TestPollinateUserAgent(VMBaseClass):
2128 self.assertEqual(ua_val, hit.group())
2129
2130
2131-class TrustyTestPollinateUserAgent(relbase.trusty, TestPollinateUserAgent):
2132- __test__ = True
2133-
2134-
2135 class XenialTestPollinateUserAgent(relbase.xenial, TestPollinateUserAgent):
2136 __test__ = True
2137
2138@@ -72,4 +68,8 @@ class CosmicTestPollinateUserAgent(relbase.cosmic, TestPollinateUserAgent):
2139 class DiscoTestPollinateUserAgent(relbase.disco, TestPollinateUserAgent):
2140 __test__ = True
2141
2142+
2143+class EoanTestPollinateUserAgent(relbase.eoan, TestPollinateUserAgent):
2144+ __test__ = True
2145+
2146 # vi: ts=4 expandtab syntax=python
2147diff --git a/tests/vmtests/test_raid5_bcache.py b/tests/vmtests/test_raid5_bcache.py
2148index 347b607..67a794d 100644
2149--- a/tests/vmtests/test_raid5_bcache.py
2150+++ b/tests/vmtests/test_raid5_bcache.py
2151@@ -67,27 +67,6 @@ class TestMdadmBcacheAbs(TestMdadmAbs):
2152 self.check_file_regex("bcache_cache_mode", r"\[writeback\]")
2153
2154
2155-@VMBaseClass.skip_by_date("1820754", fixby="2020-03-18", install=False)
2156-class TrustyTestRaid5Bcache(relbase.trusty, TestMdadmBcacheAbs):
2157- __test__ = True
2158-
2159-
2160-class TrustyHWEUTestRaid5Bcache(relbase.trusty_hwe_u, TrustyTestRaid5Bcache):
2161- __test__ = False
2162-
2163-
2164-class TrustyHWEVTestRaid5Bcache(relbase.trusty_hwe_v, TrustyTestRaid5Bcache):
2165- __test__ = False
2166-
2167-
2168-class TrustyHWEWTestRaid5Bcache(relbase.trusty_hwe_w, TrustyTestRaid5Bcache):
2169- __test__ = False
2170-
2171-
2172-class TrustyHWEXTestRaid5Bcache(relbase.trusty_hwe_x, TrustyTestRaid5Bcache):
2173- __test__ = True
2174-
2175-
2176 class XenialGATestRaid5Bcache(relbase.xenial_ga, TestMdadmBcacheAbs):
2177 __test__ = True
2178
2179@@ -111,4 +90,8 @@ class CosmicTestRaid5Bcache(relbase.cosmic, TestMdadmBcacheAbs):
2180 class DiscoTestRaid5Bcache(relbase.disco, TestMdadmBcacheAbs):
2181 __test__ = True
2182
2183+
2184+class EoanTestRaid5Bcache(relbase.eoan, TestMdadmBcacheAbs):
2185+ __test__ = True
2186+
2187 # vi: ts=4 expandtab syntax=python
2188diff --git a/tests/vmtests/test_simple.py b/tests/vmtests/test_simple.py
2189index 625f841..bfac4e9 100644
2190--- a/tests/vmtests/test_simple.py
2191+++ b/tests/vmtests/test_simple.py
2192@@ -4,6 +4,7 @@ from . import VMBaseClass
2193 from .releases import base_vm_classes as relbase
2194 from .releases import centos_base_vm_classes as centos_relbase
2195
2196+import os
2197 import textwrap
2198
2199
2200@@ -24,10 +25,6 @@ class Centos70TestSimple(centos_relbase.centos70_xenial, TestSimple):
2201 __test__ = True
2202
2203
2204-class TrustyTestSimple(relbase.trusty, TestSimple):
2205- __test__ = True
2206-
2207-
2208 class XenialTestSimple(relbase.xenial, TestSimple):
2209 __test__ = True
2210
2211@@ -53,6 +50,13 @@ class DiscoTestSimple(relbase.disco, TestSimple):
2212 self.output_files_exist(["netplan.yaml"])
2213
2214
2215+class EoanTestSimple(relbase.eoan, TestSimple):
2216+ __test__ = True
2217+
2218+ def test_output_files_exist(self):
2219+ self.output_files_exist(["netplan.yaml"])
2220+
2221+
2222 class TestSimpleStorage(VMBaseClass):
2223 """ Test curtin runs clear-holders when mode=simple with storage cfg. """
2224 conf_file = "examples/tests/simple-storage.yaml"
2225@@ -109,4 +113,36 @@ class DiscoTestSimpleStorage(relbase.disco, TestSimpleStorage):
2226 self.output_files_exist(["netplan.yaml"])
2227
2228
2229+class EoanTestSimpleStorage(relbase.eoan, TestSimpleStorage):
2230+ __test__ = True
2231+
2232+ def test_output_files_exist(self):
2233+ self.output_files_exist(["netplan.yaml"])
2234+
2235+
2236+class TestGrubNoDefaults(VMBaseClass):
2237+ """ Test that curtin does not emit any grub configuration files. """
2238+ conf_file = "examples/tests/no-grub-file.yaml"
2239+ extra_disks = []
2240+ extra_nics = []
2241+ extra_collect_scripts = [textwrap.dedent("""
2242+ cd OUTPUT_COLLECT_D
2243+ cp /etc/netplan/50-cloud-init.yaml netplan.yaml
2244+
2245+ exit 0
2246+ """)]
2247+
2248+ def test_no_grub_file_created(self):
2249+ """ Curtin did not write a grub configuration file. """
2250+ grub_d_path = self.collect_path('etc_default_grub_d')
2251+ grub_d_files = os.listdir(grub_d_path)
2252+ self.assertNotIn('50-curtin-settings.cfg', grub_d_files)
2253+
2254+
2255+class DiscoTestGrubNoDefaults(relbase.disco, TestGrubNoDefaults):
2256+ __test__ = True
2257+
2258+ def test_output_files_exist(self):
2259+ self.output_files_exist(["netplan.yaml"])
2260+
2261 # vi: ts=4 expandtab syntax=python
2262diff --git a/tests/vmtests/test_uefi_basic.py b/tests/vmtests/test_uefi_basic.py
2263index f210e7e..51696c2 100644
2264--- a/tests/vmtests/test_uefi_basic.py
2265+++ b/tests/vmtests/test_uefi_basic.py
2266@@ -89,14 +89,6 @@ class PreciseHWETUefiTestBasic(relbase.precise_hwe_t, PreciseUefiTestBasic):
2267 __test__ = False
2268
2269
2270-class TrustyUefiTestBasic(relbase.trusty, TestBasicAbs):
2271- __test__ = True
2272-
2273-
2274-class TrustyHWEXUefiTestBasic(relbase.trusty_hwe_x, TestBasicAbs):
2275- __test__ = True
2276-
2277-
2278 class XenialGAUefiTestBasic(relbase.xenial_ga, TestBasicAbs):
2279 __test__ = True
2280
2281@@ -121,17 +113,11 @@ class DiscoUefiTestBasic(relbase.disco, TestBasicAbs):
2282 __test__ = True
2283
2284
2285-class Centos70UefiTestBasic4k(centos_relbase.centos70_xenial, TestBasicAbs):
2286+class EoanUefiTestBasic(relbase.eoan, TestBasicAbs):
2287 __test__ = True
2288- disk_block_size = 4096
2289
2290
2291-class TrustyUefiTestBasic4k(relbase.trusty, TestBasicAbs):
2292- __test__ = True
2293- disk_block_size = 4096
2294-
2295-
2296-class TrustyHWEXUefiTestBasic4k(relbase.trusty_hwe_x, TestBasicAbs):
2297+class Centos70UefiTestBasic4k(centos_relbase.centos70_xenial, TestBasicAbs):
2298 __test__ = True
2299 disk_block_size = 4096
2300
2301@@ -155,4 +141,9 @@ class DiscoUefiTestBasic4k(relbase.disco, TestBasicAbs):
2302 __test__ = True
2303 disk_block_size = 4096
2304
2305+
2306+class EoanUefiTestBasic4k(relbase.eoan, TestBasicAbs):
2307+ __test__ = True
2308+ disk_block_size = 4096
2309+
2310 # vi: ts=4 expandtab syntax=python
2311diff --git a/tests/vmtests/test_vmtests.py b/tests/vmtests/test_vmtests.py
2312index 44cd8dc..5e395f0 100644
2313--- a/tests/vmtests/test_vmtests.py
2314+++ b/tests/vmtests/test_vmtests.py
2315@@ -17,7 +17,7 @@ class PsuedoBase(PsuedoVMBaseClass):
2316 pass
2317
2318
2319-class PsuedoTestAllPass(relbase.trusty, PsuedoBase):
2320+class PsuedoTestAllPass(relbase.bionic, PsuedoBase):
2321 __test__ = True
2322 # These boot_results would cause first_boot failure
2323 # boot_results = {
2324diff --git a/tests/vmtests/test_zfsroot.py b/tests/vmtests/test_zfsroot.py
2325index 473c9e3..7ab4f96 100644
2326--- a/tests/vmtests/test_zfsroot.py
2327+++ b/tests/vmtests/test_zfsroot.py
2328@@ -94,6 +94,10 @@ class DiscoTestZfsRoot(relbase.disco, TestZfsRootAbs):
2329 __test__ = True
2330
2331
2332+class EoanTestZfsRoot(relbase.eoan, TestZfsRootAbs):
2333+ __test__ = True
2334+
2335+
2336 class TestZfsRootFsTypeAbs(TestZfsRootAbs):
2337 conf_file = "examples/tests/basic-zfsroot.yaml"
2338
2339@@ -118,3 +122,7 @@ class CosmicTestZfsRootFsType(relbase.cosmic, TestZfsRootFsTypeAbs):
2340
2341 class DiscoTestZfsRootFsType(relbase.disco, TestZfsRootFsTypeAbs):
2342 __test__ = True
2343+
2344+
2345+class EoanTestZfsRootFsType(relbase.eoan, TestZfsRootFsTypeAbs):
2346+ __test__ = True
2347diff --git a/tools/vmtest-system-setup b/tools/vmtest-system-setup
2348index bc790cb..b9185db 100755
2349--- a/tools/vmtest-system-setup
2350+++ b/tools/vmtest-system-setup
2351@@ -16,6 +16,7 @@ DEPS=(
2352 make
2353 net-tools
2354 python3
2355+ python3-jsonschema
2356 python3-nose
2357 python3-simplestreams
2358 python3-yaml
2359diff --git a/tools/xkvm b/tools/xkvm
2360index e65bf76..9135ac1 100755
2361--- a/tools/xkvm
2362+++ b/tools/xkvm
2363@@ -429,7 +429,7 @@ main() {
2364 bios_opts=( "${_RET[@]}" )
2365
2366 local out="" fmt="" bus="" unit="" index="" serial="" driver="" devopts=""
2367- local busorindex="" driveopts="" cur="" val="" file=""
2368+ local busorindex="" driveopts="" cur="" val="" file="" wwn=""
2369 for((i=0;i<${#diskdevs[@]};i++)); do
2370 cur=${diskdevs[$i]}
2371 IFS=","; set -- $cur; IFS="$oifs"
2372@@ -441,6 +441,7 @@ main() {
2373 unit=""
2374 index=""
2375 serial=""
2376+ wwn=""
2377 for tok in "$@"; do
2378 [ "${tok#*=}" = "${tok}" -a -f "${tok}" -a -z "$file" ] && file="$tok"
2379 val=${tok#*=}
2380@@ -454,6 +455,7 @@ main() {
2381 file=*) file=$val;;
2382 fmt=*|format=*) fmt=$val;;
2383 serial=*) serial=$val;;
2384+ wwn=*) wwn=$val;;
2385 bus=*) bus=$val;;
2386 unit=*) unit=$val;;
2387 index=*) index=$val;;
2388@@ -471,7 +473,12 @@ main() {
2389 driver="$def_disk_driver"
2390 fi
2391 if [ -z "$serial" ]; then
2392- serial="${file##*/}"
2393+ # use filename as serial if not provided a wwn
2394+ if [ -n "$wwn" ]; then
2395+ serial="$wwn"
2396+ else
2397+ serial="${file##*/}"
2398+ fi
2399 fi
2400
2401 # make sure we add either bus= or index=
2402diff --git a/tox.ini b/tox.ini
2403index 8e5faf2..3a8e40e 100644
2404--- a/tox.ini
2405+++ b/tox.ini
2406@@ -50,7 +50,7 @@ commands = {envpython} -m flake8 {posargs:curtin tests/}
2407 # set basepython because tox 1.6 (trusty) does not support generated environments
2408 basepython = python3
2409 deps = {[testenv]deps}
2410- pylint==1.8.1
2411+ pylint==2.3.1
2412 git+https://git.launchpad.net/simplestreams
2413 commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests}
2414

Subscribers

People subscribed via source and target branches