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
diff --git a/curtin/__init__.py b/curtin/__init__.py
index d52e1c4..076c135 100644
--- a/curtin/__init__.py
+++ b/curtin/__init__.py
@@ -32,6 +32,6 @@ FEATURES = [
32 'HAS_VERSION_MODULE',32 'HAS_VERSION_MODULE',
33]33]
3434
35__version__ = "18.2"35__version__ = "19.1"
3636
37# vi: ts=4 expandtab syntax=python37# vi: ts=4 expandtab syntax=python
diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
index 71882d4..f858b37 100644
--- a/curtin/block/__init__.py
+++ b/curtin/block/__init__.py
@@ -10,8 +10,9 @@ import tempfile
1010
11from curtin import util11from curtin import util
12from curtin.block import lvm12from curtin.block import lvm
13from curtin.block import multipath
13from curtin.log import LOG14from curtin.log import LOG
14from curtin.udev import udevadm_settle15from curtin.udev import udevadm_settle, udevadm_info
1516
1617
17def get_dev_name_entry(devname):18def get_dev_name_entry(devname):
@@ -103,7 +104,15 @@ def partition_kname(disk_kname, partition_number):
103 """104 """
104 Add number to disk_kname prepending a 'p' if needed105 Add number to disk_kname prepending a 'p' if needed
105 """106 """
106 for dev_type in ['bcache', 'nvme', 'mmcblk', 'cciss', 'mpath', 'dm', 'md']:107 if disk_kname.startswith('dm-'):
108 # device-mapper devices may create a new dm device for the partition,
109 # e.g. multipath disk is at dm-2, new partition could be dm-11, but
110 # linux will create a -partX symlink against the disk by-id name.
111 devpath = '/dev/' + disk_kname
112 disk_link = get_device_mapper_links(devpath, first=True)
113 return '%s-part%s' % (disk_link, partition_number)
114
115 for dev_type in ['bcache', 'nvme', 'mmcblk', 'cciss', 'mpath', 'md']:
107 if disk_kname.startswith(dev_type):116 if disk_kname.startswith(dev_type):
108 partition_number = "p%s" % partition_number117 partition_number = "p%s" % partition_number
109 break118 break
@@ -686,6 +695,21 @@ def disk_to_byid_path(kname):
686 return mapping.get(dev_path(kname))695 return mapping.get(dev_path(kname))
687696
688697
698def get_device_mapper_links(devpath, first=False):
699 """ Return the best devlink to device at devpath. """
700 info = udevadm_info(devpath)
701 if 'DEVLINKS' not in info:
702 raise ValueError('Device %s does not have device symlinks' % devpath)
703 devlinks = [devlink for devlink in sorted(info['DEVLINKS']) if devlink]
704 if not devlinks:
705 raise ValueError('Unexpected DEVLINKS list contained empty values')
706
707 if first:
708 return devlinks[0]
709
710 return devlinks
711
712
689def lookup_disk(serial):713def lookup_disk(serial):
690 """714 """
691 Search for a disk by its serial number using /dev/disk/by-id/715 Search for a disk by its serial number using /dev/disk/by-id/
@@ -705,7 +729,16 @@ def lookup_disk(serial):
705 # will be the partitions on the disk. Then use os.path.realpath to729 # will be the partitions on the disk. Then use os.path.realpath to
706 # determine the path to the block device in /dev/730 # determine the path to the block device in /dev/
707 disks.sort(key=lambda x: len(x))731 disks.sort(key=lambda x: len(x))
732 LOG.debug('lookup_disks found: %s', disks)
708 path = os.path.realpath("/dev/disk/by-id/%s" % disks[0])733 path = os.path.realpath("/dev/disk/by-id/%s" % disks[0])
734 LOG.debug('lookup_disks realpath(%s)=%s', disks[0], path)
735 if multipath.is_mpath_device(path):
736 LOG.debug('Detected multipath device, finding a members')
737 info = udevadm_info(path)
738 mpath_members = sorted(multipath.find_mpath_members(info['DM_NAME']))
739 LOG.debug('mpath members: %s', mpath_members)
740 if len(mpath_members):
741 path = mpath_members[0]
709742
710 if not os.path.exists(path):743 if not os.path.exists(path):
711 raise ValueError("path '%s' to block device for disk with serial '%s' \744 raise ValueError("path '%s' to block device for disk with serial '%s' \
diff --git a/curtin/block/clear_holders.py b/curtin/block/clear_holders.py
index fb7fba4..4a099cd 100644
--- a/curtin/block/clear_holders.py
+++ b/curtin/block/clear_holders.py
@@ -15,6 +15,7 @@ from curtin.swap import is_swap_device
15from curtin.block import bcache15from curtin.block import bcache
16from curtin.block import lvm16from curtin.block import lvm
17from curtin.block import mdadm17from curtin.block import mdadm
18from curtin.block import multipath
18from curtin.block import zfs19from curtin.block import zfs
19from curtin.log import LOG20from curtin.log import LOG
2021
@@ -294,6 +295,17 @@ def wipe_superblock(device):
294 device, attempt + 1, len(retries), wait)295 device, attempt + 1, len(retries), wait)
295 time.sleep(wait)296 time.sleep(wait)
296297
298 # multipath partitions are separate block devices (disks)
299 if multipath.is_mpath_partition(blockdev):
300 multipath.remove_partition(blockdev)
301 # multipath devices must be hidden to utilize a single member (path)
302 elif multipath.is_mpath_device(blockdev):
303 mp_id = multipath.find_mpath_id(blockdev)
304 if mp_id:
305 multipath.remove_map(mp_id)
306 else:
307 raise RuntimeError('Failed to find multipath id for %s' % blockdev)
308
297309
298def _wipe_superblock(blockdev, exclusive=True, strict=True):310def _wipe_superblock(blockdev, exclusive=True, strict=True):
299 """ No checks, just call wipe_volume """311 """ No checks, just call wipe_volume """
@@ -359,8 +371,15 @@ def identify_partition(device):
359 """371 """
360 determine if specified device is a partition372 determine if specified device is a partition
361 """373 """
362 path = os.path.join(block.sys_block_path(device), 'partition')374 blockdev = block.sys_block_path(device)
363 return os.path.exists(path)375 path = os.path.join(blockdev, 'partition')
376 if os.path.exists(path):
377 return True
378
379 if multipath.is_mpath_partition(blockdev):
380 return True
381
382 return False
364383
365384
366def shutdown_swap(path):385def shutdown_swap(path):
diff --git a/curtin/block/multipath.py b/curtin/block/multipath.py
367new file mode 100644386new file mode 100644
index 0000000..d1e8441
--- /dev/null
+++ b/curtin/block/multipath.py
@@ -0,0 +1,111 @@
1import os
2
3from curtin.log import LOG
4from curtin import util
5from curtin import udev
6
7SHOW_PATHS_FMT = ("device='%d' serial='%z' multipath='%m' host_wwpn='%N' "
8 "target_wwnn='%n' host_wwpn='%R' target_wwpn='%r' "
9 "host_adapter='%a'")
10SHOW_MAPS_FMT = "name=%n multipath='%w' sysfs='%d' paths='%N'"
11
12
13def _extract_mpath_data(cmd, show_verb):
14 data, _err = util.subp(cmd, capture=True)
15 result = []
16 for line in data.splitlines():
17 mp_dict = util.load_shell_content(line, add_empty=True)
18 LOG.debug('Extracted multipath %s fields: %s', show_verb, mp_dict)
19 if mp_dict:
20 result.append(mp_dict)
21
22 return result
23
24
25def show_paths():
26 cmd = ['multipathd', 'show', 'paths', 'raw', 'format', SHOW_PATHS_FMT]
27 return _extract_mpath_data(cmd, 'paths')
28
29
30def show_maps():
31 cmd = ['multipathd', 'show', 'maps', 'raw', 'format', SHOW_MAPS_FMT]
32 return _extract_mpath_data(cmd, 'maps')
33
34
35def is_mpath_device(devpath):
36 info = udev.udevadm_info(devpath)
37 if info.get('DM_UUID', '').startswith('mpath-'):
38 return True
39
40 return False
41
42
43def is_mpath_member(devpath):
44 try:
45 util.subp(['multipath', '-c', devpath], capture=True)
46 return True
47 except util.ProcessExecutionError:
48 return False
49
50
51def is_mpath_partition(devpath):
52 if devpath.startswith('/dev/dm-'):
53 if 'DM_PART' in udev.udevadm_info(devpath):
54 LOG.debug("%s is multipath device partition", devpath)
55 return True
56
57 return False
58
59
60def mpath_partition_to_mpath_id(devpath):
61 info = udev.udevadm_info(devpath)
62 if 'DM_MPATH' in info:
63 return info['DM_MPATH']
64
65 return None
66
67
68def remove_partition(devpath, retries=10):
69 LOG.debug('multipath: removing multipath partition: %s', devpath)
70 for _ in range(0, retries):
71 util.subp(['dmsetup', 'remove', devpath], rcs=[0, 1])
72 udev.udevadm_settle()
73 if not os.path.exists(devpath):
74 return
75
76 util.wait_for_removal(devpath)
77
78
79def remove_map(map_id, retries=10):
80 LOG.debug('multipath: removing multipath map: %s', map_id)
81 devpath = '/dev/mapper/%s' % map_id
82 for _ in range(0, retries):
83 util.subp(['multipath', '-f', map_id], rcs=[0, 1])
84 udev.udevadm_settle()
85 if not os.path.exists(devpath):
86 return
87
88 util.wait_for_removal(devpath)
89
90
91def find_mpath_members(multipath_id, paths=None):
92 if not paths:
93 paths = show_paths()
94
95 members = ['/dev/' + path['device']
96 for path in paths if path['multipath'] == multipath_id]
97 return members
98
99
100def find_mpath_id(devpath, maps=None):
101 if not maps:
102 maps = show_maps()
103
104 for mpmap in maps:
105 if '/dev/' + mpmap['sysfs'] == devpath:
106 name = mpmap.get('name')
107 if name:
108 return name
109 return mpmap['multipath']
110
111 return None
diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
index b6326fb..c4eed5b 100644
--- a/curtin/commands/curthooks.py
+++ b/curtin/commands/curthooks.py
@@ -484,6 +484,20 @@ def setup_grub(cfg, target, osfamily=DISTROS.debian):
484 else:484 else:
485 env['REPLACE_GRUB_LINUX_DEFAULT'] = "1"485 env['REPLACE_GRUB_LINUX_DEFAULT'] = "1"
486486
487 probe_os = grubcfg.get('probe_additional_os', False)
488 if probe_os not in (False, True):
489 raise ValueError("Unexpected value %s for 'probe_additional_os'. "
490 "Value must be boolean" % probe_os)
491 env['DISABLE_OS_PROBER'] = "0" if probe_os else "1"
492
493 # if terminal is present in config, but unset, then don't
494 grub_terminal = grubcfg.get('terminal', 'console')
495 if not isinstance(grub_terminal, str):
496 raise ValueError("Unexpected value %s for 'terminal'. "
497 "Value must be a string" % grub_terminal)
498 if not grub_terminal.lower() == "unmodified":
499 env['GRUB_TERMINAL'] = grub_terminal
500
487 if instdevs:501 if instdevs:
488 instdevs = [block.get_dev_name_entry(i)[1] for i in instdevs]502 instdevs = [block.get_dev_name_entry(i)[1] for i in instdevs]
489 else:503 else:
diff --git a/curtin/config.py b/curtin/config.py
index 9649b10..2106b23 100644
--- a/curtin/config.py
+++ b/curtin/config.py
@@ -76,7 +76,7 @@ def cmdarg2cfg(cmdarg, delim="/"):
7676
7777
78def load_config_archive(content):78def load_config_archive(content):
79 archive = yaml.load(content)79 archive = yaml.safe_load(content)
80 config = {}80 config = {}
81 for part in archive:81 for part in archive:
82 if isinstance(part, (str,)):82 if isinstance(part, (str,)):
diff --git a/debian/changelog b/debian/changelog
index 4ac90f4..ec06324 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
1curtin (19.1-0ubuntu1) eoan; urgency=medium
2
3 * New upstream release.
4 - release 19.1
5 - vmtest: add missing skip_by_date on Eoan test_network_mtu
6 - vmtest: remove skip_by_date on Disco Allindata test
7 - block: support multipath devices in lookup and partition_kname
8 (LP: #1813228)
9 - grub: add grub config to control os_prober,terminal settings in target
10 - vmtest: add eoan tests [Paride Legovini]
11 - vmtest: add dependency on python3-jsonschema [Paride Legovini]
12 - Pylint compatibility with Python 3.7 [Paride Legovini] (LP: #1828229)
13 - vmtest: disable disco multipath test
14 - vmtests: bump network mtu tests out a bit
15 - Fix up yaml.load warnings
16 - vmtest: disable trusty, it's dead jim
17
18 -- Daniel Watkins <oddbloke@ubuntu.com> Wed, 22 May 2019 10:26:52 -0400
19
1curtin (18.2-26-gd8e45d79-0ubuntu1) eoan; urgency=medium20curtin (18.2-26-gd8e45d79-0ubuntu1) eoan; urgency=medium
221
3 * New upstream snapshot.22 * New upstream snapshot.
diff --git a/doc/topics/config.rst b/doc/topics/config.rst
index bad8fc2..b7cca43 100644
--- a/doc/topics/config.rst
+++ b/doc/topics/config.rst
@@ -207,6 +207,27 @@ update the NVRAM settings to preserve the system configuration.
207Users may want to force NVRAM to be updated such that the next boot207Users may want to force NVRAM to be updated such that the next boot
208of the system will boot from the installed device.208of the system will boot from the installed device.
209209
210**probe_additional_os**: *<boolean: default False>*
211
212This setting controls grub's os-prober functionality and Curtin will
213disable this feature by default to prevent grub from searching for other
214operating systems and adding them to the grub menu.
215
216When False, curtin writes "GRUB_DISABLE_OS_PROBER=true" to target system in
217/etc/default/grub.d/50-curtin-settings.cfg. If True, curtin won't modify the
218grub configuration value in the target system.
219
220**terminal**: *<['unmodified', 'console', ...]>*
221
222Configure target system grub option GRUB_TERMINAL ``terminal`` value
223which is written to /etc/default/grub.d/50-curtin-settings.cfg. Curtin
224does not attempt to validate this string, grub2 has many values that
225it accepts and the list is platform dependent. If ``terminal`` is
226not provided, Curtin will set the value to 'console'. If the ``terminal``
227value is 'unmodified' then Curtin will not set any value at all and will
228use Grub defaults.
229
230
210**Example**::231**Example**::
211232
212 grub:233 grub:
@@ -214,6 +235,35 @@ of the system will boot from the installed device.
214 - /dev/sda1235 - /dev/sda1
215 replace_linux_default: False236 replace_linux_default: False
216 update_nvram: True237 update_nvram: True
238 terminal: serial
239
240**Default terminal value, GRUB_TERMINAL=console**::
241
242 grub:
243 install_devices:
244 - /dev/sda1
245
246**Don't set GRUB_TERMINAL in target**::
247
248 grub:
249 install_devices:
250 - /dev/sda1
251 terminal: unmodified
252
253**Allow grub to probe for additional OSes**::
254
255 grub:
256 install_devices:
257 - /dev/sda1
258 probe_additional_os: True
259
260**Avoid writting any settings to etc/default/grub.d/50-curtin-settings.cfg**::
261
262 grub:
263 install_devices:
264 - /dev/sda1
265 probe_additional_os: True
266 terminal: unmodified
217267
218268
219http_proxy269http_proxy
diff --git a/examples/tests/basic_scsi.yaml b/examples/tests/basic_scsi.yaml
index aa62137..51f5236 100644
--- a/examples/tests/basic_scsi.yaml
+++ b/examples/tests/basic_scsi.yaml
@@ -49,7 +49,7 @@ storage:
49 device: sda2_home49 device: sda2_home
50 - id: sparedisk_id50 - id: sparedisk_id
51 type: disk51 type: disk
52 wwn: '0x080258d13ea95ae5'52 wwn: '0x2222222222222222'
53 name: sparedisk53 name: sparedisk
54 wipe: superblock54 wipe: superblock
55 - id: sparedisk_fat_fmt_id55 - id: sparedisk_fat_fmt_id
diff --git a/examples/tests/no-grub-file.yaml b/examples/tests/no-grub-file.yaml
56new file mode 10064456new file mode 100644
index 0000000..d5ba698
--- /dev/null
+++ b/examples/tests/no-grub-file.yaml
@@ -0,0 +1,9 @@
1# This pushes curtin through a automatic installation
2# where no storage configuration is necessary.
3placeholder_simple_install: unused
4
5# configure curtin so it does not emit a grub config file
6# in etc/default/grub/grub.d
7grub:
8 probe_additional_os: true
9 terminal: unmodified
diff --git a/helpers/common b/helpers/common
index 34f0870..5928150 100644
--- a/helpers/common
+++ b/helpers/common
@@ -779,13 +779,6 @@ install_grub() {
779 esac779 esac
780 debug 1 "carryover command line params '$newargs'"780 debug 1 "carryover command line params '$newargs'"
781781
782 case $os_family in
783 debian)
784 : > "$mp/$mygrub_cfg" ||
785 { error "Failed to write '$mygrub_cfg'"; return 1; }
786 ;;
787 esac
788
789 if [ "${REPLACE_GRUB_LINUX_DEFAULT:-1}" != "0" ]; then782 if [ "${REPLACE_GRUB_LINUX_DEFAULT:-1}" != "0" ]; then
790 apply_grub_cmdline_linux_default "$mp" "$newargs" || {783 apply_grub_cmdline_linux_default "$mp" "$newargs" || {
791 error "Failed to apply grub cmdline."784 error "Failed to apply grub cmdline."
@@ -793,11 +786,19 @@ install_grub() {
793 }786 }
794 fi787 fi
795788
796 {789 if [ "${DISABLE_OS_PROBER:-1}" == "1" ]; then
797 echo "# Curtin disable grub os prober that might find other OS installs."790 {
798 echo "GRUB_DISABLE_OS_PROBER=true"791 echo "# Curtin disable grub os prober that might find other OS installs."
799 echo "GRUB_TERMINAL=console"792 echo "GRUB_DISABLE_OS_PROBER=true"
800 } >> "$mp/$mygrub_cfg"793 } >> "$mp/$mygrub_cfg"
794 fi
795
796 if [ -n "${GRUB_TERMINAL}" ]; then
797 {
798 echo "# Curtin configured GRUB_TERMINAL value"
799 echo "GRUB_TERMINAL=${GRUB_TERMINAL}"
800 } >> "$mp/$mygrub_cfg"
801 fi
801802
802 local short="" bd="" grubdev grubdevs_new=""803 local short="" bd="" grubdev grubdevs_new=""
803 grubdevs_new=()804 grubdevs_new=()
diff --git a/pylintrc b/pylintrc
804new file mode 100644805new file mode 100644
index 0000000..d027f48
--- /dev/null
+++ b/pylintrc
@@ -0,0 +1,10 @@
1[MASTER]
2# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
3# number of processors available to use.
4jobs=0
5
6[TYPECHECK]
7# List of members which are set dynamically and missed by pylint inference
8# system, and so shouldn't trigger E1101 when accessed. Python regular
9# expressions are accepted.
10generated-members=DISTROS.*
diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py
index 0869f1c..9514745 100644
--- a/tests/unittests/helpers.py
+++ b/tests/unittests/helpers.py
@@ -121,4 +121,9 @@ def populate_dir(path, files):
121121
122 return ret122 return ret
123123
124
125def raise_pexec_error(*args, **kwargs):
126 raise util.ProcessExecutionError()
127
128
124# vi: ts=4 expandtab syntax=python129# vi: ts=4 expandtab syntax=python
diff --git a/tests/unittests/test_apt_custom_sources_list.py b/tests/unittests/test_apt_custom_sources_list.py
index d77c750..fb6eb0c 100644
--- a/tests/unittests/test_apt_custom_sources_list.py
+++ b/tests/unittests/test_apt_custom_sources_list.py
@@ -5,16 +5,17 @@ Test templating of custom sources list
5"""5"""
6import logging6import logging
7import os7import os
8import yaml
89
9import mock10import mock
10from mock import call11from mock import call
11import textwrap12import textwrap
12import yaml
1313
14from curtin import distro14from curtin import distro
15from curtin import paths15from curtin import paths
16from curtin import util16from curtin import util
17from curtin.commands import apt_config17from curtin.commands import apt_config
18from curtin.config import load_config
18from .helpers import CiTestCase19from .helpers import CiTestCase
1920
20LOG = logging.getLogger(__name__)21LOG = logging.getLogger(__name__)
@@ -233,7 +234,7 @@ class TestApplyPreserveSourcesList(CiTestCase):
233 m_get_pkg_ver.assert_has_calls(234 m_get_pkg_ver.assert_has_calls(
234 [mock.call('cloud-init', target=self.tmp)])235 [mock.call('cloud-init', target=self.tmp)])
235 self.assertEqual(236 self.assertEqual(
236 yaml.load(util.load_file(self.tmp_cfg)),237 load_config(self.tmp_cfg),
237 {'apt_preserve_sources_list': True})238 {'apt_preserve_sources_list': True})
238239
239 @mock.patch("curtin.commands.apt_config.distro.get_package_version")240 @mock.patch("curtin.commands.apt_config.distro.get_package_version")
@@ -253,7 +254,7 @@ class TestApplyPreserveSourcesList(CiTestCase):
253 m_get_pkg_ver.assert_has_calls(254 m_get_pkg_ver.assert_has_calls(
254 [mock.call('cloud-init', target=self.tmp)])255 [mock.call('cloud-init', target=self.tmp)])
255 self.assertEqual(256 self.assertEqual(
256 yaml.load(util.load_file(self.tmp_cfg)),257 load_config(self.tmp_cfg),
257 {'apt': {'preserve_sources_list': True}})258 {'apt': {'preserve_sources_list': True}})
258259
259# vi: ts=4 expandtab syntax=python260# vi: ts=4 expandtab syntax=python
diff --git a/tests/unittests/test_block.py b/tests/unittests/test_block.py
index e932392..c7ebdcc 100644
--- a/tests/unittests/test_block.py
+++ b/tests/unittests/test_block.py
@@ -73,16 +73,18 @@ class TestBlock(CiTestCase):
73 res = block.get_blockdev_sector_size('/dev/vda2')73 res = block.get_blockdev_sector_size('/dev/vda2')
74 self.assertEqual(res, (4096, 4096))74 self.assertEqual(res, (4096, 4096))
7575
76 @mock.patch("curtin.block.multipath")
76 @mock.patch("curtin.block.os.path.realpath")77 @mock.patch("curtin.block.os.path.realpath")
77 @mock.patch("curtin.block.os.path.exists")78 @mock.patch("curtin.block.os.path.exists")
78 @mock.patch("curtin.block.os.listdir")79 @mock.patch("curtin.block.os.listdir")
79 def test_lookup_disk(self, mock_os_listdir, mock_os_path_exists,80 def test_lookup_disk(self, mock_os_listdir, mock_os_path_exists,
80 mock_os_path_realpath):81 mock_os_path_realpath, mock_mpath):
81 serial = "SERIAL123"82 serial = "SERIAL123"
82 mock_os_listdir.return_value = ["sda_%s-part1" % serial,83 mock_os_listdir.return_value = ["sda_%s-part1" % serial,
83 "sda_%s" % serial, "other"]84 "sda_%s" % serial, "other"]
84 mock_os_path_exists.return_value = True85 mock_os_path_exists.return_value = True
85 mock_os_path_realpath.return_value = "/dev/sda"86 mock_os_path_realpath.return_value = "/dev/sda"
87 mock_mpath.is_mpath_device.return_value = False
8688
87 path = block.lookup_disk(serial)89 path = block.lookup_disk(serial)
8890
@@ -101,6 +103,30 @@ class TestBlock(CiTestCase):
101 mock_os_listdir.return_value = ["other"]103 mock_os_listdir.return_value = ["other"]
102 block.lookup_disk(serial)104 block.lookup_disk(serial)
103105
106 @mock.patch('curtin.block.udevadm_info')
107 def test_get_device_mapper_links_returns_first_non_none(self, m_info):
108 """ get_device_mapper_links returns first by sort entry in DEVLINKS."""
109 devlinks = [self.random_string(), self.random_string()]
110 m_info.return_value = {'DEVLINKS': devlinks}
111 devpath = self.random_string()
112 self.assertEqual(sorted(devlinks)[0],
113 block.get_device_mapper_links(devpath, first=True))
114
115 @mock.patch('curtin.block.udevadm_info')
116 def test_get_device_mapper_links_raises_valueerror_no_links(self, m_info):
117 """ get_device_mapper_links raises ValueError if info has no links."""
118 m_info.return_value = {self.random_string(): self.random_string()}
119 with self.assertRaises(ValueError):
120 block.get_device_mapper_links(self.random_string())
121
122 @mock.patch('curtin.block.udevadm_info')
123 def test_get_device_mapper_links_raises_error_no_link_vals(self, m_info):
124 """ get_device_mapper_links raises ValueError if all links are none"""
125 devlinks = ['', '']
126 m_info.return_value = {'DEVLINKS': devlinks}
127 with self.assertRaises(ValueError):
128 block.get_device_mapper_links(self.random_string())
129
104 @mock.patch("curtin.block.get_dev_disk_byid")130 @mock.patch("curtin.block.get_dev_disk_byid")
105 def test_disk_to_byid_path(self, mock_byid):131 def test_disk_to_byid_path(self, mock_byid):
106 """ disk_to_byid path returns a /dev/disk/by-id path """132 """ disk_to_byid path returns a /dev/disk/by-id path """
@@ -387,13 +413,17 @@ class TestWipeVolume(CiTestCase):
387413
388class TestBlockKnames(CiTestCase):414class TestBlockKnames(CiTestCase):
389 """Tests for some of the kname functions in block"""415 """Tests for some of the kname functions in block"""
390 def test_determine_partition_kname(self):416
417 @mock.patch('curtin.block.get_device_mapper_links')
418 def test_determine_partition_kname(self, m_mlink):
419 dm0_link = '/dev/disk/by-id/dm-name-XXXX2406'
420 m_mlink.return_value = dm0_link
391 part_knames = [(('sda', 1), 'sda1'),421 part_knames = [(('sda', 1), 'sda1'),
392 (('vda', 1), 'vda1'),422 (('vda', 1), 'vda1'),
393 (('nvme0n1', 1), 'nvme0n1p1'),423 (('nvme0n1', 1), 'nvme0n1p1'),
394 (('mmcblk0', 1), 'mmcblk0p1'),424 (('mmcblk0', 1), 'mmcblk0p1'),
395 (('cciss!c0d0', 1), 'cciss!c0d0p1'),425 (('cciss!c0d0', 1), 'cciss!c0d0p1'),
396 (('dm-0', 1), 'dm-0p1'),426 (('dm-0', 1), dm0_link + '-part1'),
397 (('md0', 1), 'md0p1'),427 (('md0', 1), 'md0p1'),
398 (('mpath1', 2), 'mpath1p2')]428 (('mpath1', 2), 'mpath1p2')]
399 for ((disk_kname, part_number), part_kname) in part_knames:429 for ((disk_kname, part_number), part_kname) in part_knames:
diff --git a/tests/unittests/test_block_mdadm.py b/tests/unittests/test_block_mdadm.py
index 72610aa..f9164b4 100644
--- a/tests/unittests/test_block_mdadm.py
+++ b/tests/unittests/test_block_mdadm.py
@@ -4,15 +4,11 @@ from mock import call, patch
4from curtin.block import dev_short4from curtin.block import dev_short
5from curtin.block import mdadm5from curtin.block import mdadm
6from curtin import util6from curtin import util
7from .helpers import CiTestCase7from .helpers import CiTestCase, raise_pexec_error
8import os8import os
9import textwrap9import textwrap
1010
1111
12def _raise_pexec_error(*args, **kwargs):
13 raise util.ProcessExecutionError()
14
15
16class TestBlockMdadmAssemble(CiTestCase):12class TestBlockMdadmAssemble(CiTestCase):
1713
18 def setUp(self):14 def setUp(self):
@@ -76,7 +72,7 @@ class TestBlockMdadmAssemble(CiTestCase):
7672
77 def test_mdadm_assemble_exec_error(self):73 def test_mdadm_assemble_exec_error(self):
78 self.mock_util.ProcessExecutionError = util.ProcessExecutionError74 self.mock_util.ProcessExecutionError = util.ProcessExecutionError
79 self.mock_util.subp.side_effect = _raise_pexec_error75 self.mock_util.subp.side_effect = raise_pexec_error
80 with self.assertRaises(util.ProcessExecutionError):76 with self.assertRaises(util.ProcessExecutionError):
81 mdadm.mdadm_assemble(scan=True, ignore_errors=False)77 mdadm.mdadm_assemble(scan=True, ignore_errors=False)
82 self.mock_util.subp.assert_called_with(78 self.mock_util.subp.assert_called_with(
@@ -306,7 +302,7 @@ class TestBlockMdadmExamine(CiTestCase):
306302
307 def test_mdadm_examine_no_raid(self):303 def test_mdadm_examine_no_raid(self):
308 self.mock_util.ProcessExecutionError = util.ProcessExecutionError304 self.mock_util.ProcessExecutionError = util.ProcessExecutionError
309 self.mock_util.subp.side_effect = _raise_pexec_error305 self.mock_util.subp.side_effect = raise_pexec_error
310306
311 device = "/dev/sda"307 device = "/dev/sda"
312 data = mdadm.mdadm_examine(device, export=False)308 data = mdadm.mdadm_examine(device, export=False)
diff --git a/tests/unittests/test_block_multipath.py b/tests/unittests/test_block_multipath.py
313new file mode 100644309new file mode 100644
index 0000000..0964349
--- /dev/null
+++ b/tests/unittests/test_block_multipath.py
@@ -0,0 +1,149 @@
1import mock
2
3from curtin.block import multipath
4from .helpers import CiTestCase, raise_pexec_error
5
6
7class TestMultipath(CiTestCase):
8
9 def setUp(self):
10 super(TestMultipath, self).setUp()
11 self.add_patch('curtin.block.multipath.util.subp', 'm_subp')
12 self.add_patch('curtin.block.multipath.udev', 'm_udev')
13
14 self.m_subp.return_value = ("", "")
15
16 def test_show_paths(self):
17 self.m_subp.return_value = ("foo=bar wark=2", "")
18 expected = ['multipathd', 'show', 'paths', 'raw', 'format',
19 multipath.SHOW_PATHS_FMT]
20 self.assertEqual([{'foo': 'bar', 'wark': '2'}],
21 multipath.show_paths())
22 self.m_subp.assert_called_with(expected, capture=True)
23
24 def test_show_maps(self):
25 self.m_subp.return_value = ("foo=bar wark=2", "")
26 expected = ['multipathd', 'show', 'maps', 'raw', 'format',
27 multipath.SHOW_MAPS_FMT]
28 self.assertEqual([{'foo': 'bar', 'wark': '2'}],
29 multipath.show_maps())
30 self.m_subp.assert_called_with(expected, capture=True)
31
32 def test_is_mpath_device_true(self):
33 self.m_udev.udevadm_info.return_value = {'DM_UUID': 'mpath-mpatha-foo'}
34 self.assertTrue(multipath.is_mpath_device(self.random_string()))
35
36 def test_is_mpath_device_false(self):
37 self.m_udev.udevadm_info.return_value = {'DM_UUID': 'lvm-vg-foo-lv1'}
38 self.assertFalse(multipath.is_mpath_device(self.random_string()))
39
40 def test_is_mpath_member_true(self):
41 self.assertTrue(multipath.is_mpath_member(self.random_string()))
42
43 def test_is_mpath_member_false(self):
44 self.m_subp.side_effect = raise_pexec_error
45 self.assertFalse(multipath.is_mpath_member(self.random_string()))
46
47 def test_is_mpath_partition_true(self):
48 dm_device = "/dev/dm-" + self.random_string()
49 self.m_udev.udevadm_info.return_value = {'DM_PART': '1'}
50 self.assertTrue(multipath.is_mpath_partition(dm_device))
51
52 def test_is_mpath_partition_false(self):
53 self.assertFalse(multipath.is_mpath_partition(self.random_string()))
54
55 def test_mpath_partition_to_mpath_id(self):
56 dev = self.random_string()
57 mpath_id = self.random_string()
58 self.m_udev.udevadm_info.return_value = {'DM_MPATH': mpath_id}
59 self.assertEqual(mpath_id,
60 multipath.mpath_partition_to_mpath_id(dev))
61
62 def test_mpath_partition_to_mpath_id_none(self):
63 dev = self.random_string()
64 self.m_udev.udevadm_info.return_value = {}
65 self.assertEqual(None,
66 multipath.mpath_partition_to_mpath_id(dev))
67
68 @mock.patch('curtin.block.multipath.os.path.exists')
69 @mock.patch('curtin.block.multipath.util.wait_for_removal')
70 def test_remove_partition(self, m_wait, m_exists):
71 devpath = self.random_string()
72 m_exists.side_effect = iter([True, True, False])
73 multipath.remove_partition(devpath)
74 expected = mock.call(['dmsetup', 'remove', devpath], rcs=[0, 1])
75 self.m_subp.assert_has_calls([expected] * 3)
76 m_wait.assert_not_called()
77 self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
78
79 @mock.patch('curtin.block.multipath.os.path.exists')
80 @mock.patch('curtin.block.multipath.util.wait_for_removal')
81 def test_remove_partition_waits(self, m_wait, m_exists):
82 devpath = self.random_string()
83 m_exists.side_effect = iter([True, True, True])
84 multipath.remove_partition(devpath, retries=3)
85 expected = mock.call(['dmsetup', 'remove', devpath], rcs=[0, 1])
86 self.m_subp.assert_has_calls([expected] * 3)
87 self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
88 self.assertEqual(1, m_wait.call_count)
89
90 @mock.patch('curtin.block.multipath.os.path.exists')
91 @mock.patch('curtin.block.multipath.util.wait_for_removal')
92 def test_remove_map(self, m_wait, m_exists):
93 map_id = self.random_string()
94 devpath = '/dev/mapper/%s' % map_id
95 m_exists.side_effect = iter([True, True, False])
96 multipath.remove_map(devpath)
97 expected = mock.call(['multipath', '-f', devpath], rcs=[0, 1])
98 self.m_subp.assert_has_calls([expected] * 3)
99 m_wait.assert_not_called()
100 self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
101
102 @mock.patch('curtin.block.multipath.os.path.exists')
103 @mock.patch('curtin.block.multipath.util.wait_for_removal')
104 def test_remove_map_wait(self, m_wait, m_exists):
105 map_id = self.random_string()
106 devpath = '/dev/mapper/%s' % map_id
107 m_exists.side_effect = iter([True, True, True])
108 multipath.remove_map(devpath, retries=3)
109 expected = mock.call(['multipath', '-f', devpath], rcs=[0, 1])
110 self.m_subp.assert_has_calls([expected] * 3)
111 self.assertEqual(3, self.m_udev.udevadm_settle.call_count)
112 self.assertEqual(1, m_wait.call_count)
113
114 def test_find_mpath_members(self):
115 mp_id = 'mpatha'
116 paths = ['device=bar multipath=mpatha',
117 'device=wark multipath=mpatha']
118 self.m_subp.return_value = ("\n".join(paths), "")
119 self.assertEqual(sorted(['/dev/bar', '/dev/wark']),
120 sorted(multipath.find_mpath_members(mp_id)))
121
122 def test_find_mpath_members_empty(self):
123 mp_id = self.random_string()
124 paths = ['device=bar multipath=mpatha',
125 'device=wark multipath=mpatha']
126 self.m_subp.return_value = ("\n".join(paths), "")
127 self.assertEqual([], multipath.find_mpath_members(mp_id))
128
129 def test_find_mpath_id(self):
130 mp_id = 'mpatha'
131 maps = ['sysfs=bar multipath=mpatha',
132 'sysfs=wark multipath=mpatha']
133 self.m_subp.return_value = ("\n".join(maps), "")
134 self.assertEqual(mp_id, multipath.find_mpath_id('/dev/bar'))
135
136 def test_find_mpath_id_name(self):
137 maps = ['sysfs=bar multipath=mpatha name=friendly',
138 'sysfs=wark multipath=mpatha']
139 self.m_subp.return_value = ("\n".join(maps), "")
140 self.assertEqual('friendly', multipath.find_mpath_id('/dev/bar'))
141
142 def test_find_mpath_id_none(self):
143 maps = ['sysfs=bar multipath=mpatha',
144 'sysfs=wark multipath=mpatha']
145 self.m_subp.return_value = ("\n".join(maps), "")
146 self.assertEqual(None, multipath.find_mpath_id('/dev/foo'))
147
148
149# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/__init__.py b/tests/vmtests/__init__.py
index 5f4a17a..0cfcad3 100644
--- a/tests/vmtests/__init__.py
+++ b/tests/vmtests/__init__.py
@@ -18,6 +18,7 @@ import yaml
18import curtin.net as curtin_net18import curtin.net as curtin_net
19import curtin.util as util19import curtin.util as util
20from curtin.block import iscsi20from curtin.block import iscsi
21from curtin.config import load_config
2122
22from .report_webhook_logger import CaptureReporting23from .report_webhook_logger import CaptureReporting
23from curtin.commands.install import INSTALL_PASS_MSG24from curtin.commands.install import INSTALL_PASS_MSG
@@ -1612,7 +1613,7 @@ class VMBaseClass(TestCase):
1612 logger.debug('test_dname_rules: checking disks: %s', disk_to_check)1613 logger.debug('test_dname_rules: checking disks: %s', disk_to_check)
1613 self.output_files_exist(["udev_rules.d"])1614 self.output_files_exist(["udev_rules.d"])
16141615
1615 cfg = yaml.load(self.load_collect_file("root/curtin-install-cfg.yaml"))1616 cfg = load_config(self.collect_path("root/curtin-install-cfg.yaml"))
1616 stgcfg = cfg.get("storage", {}).get("config", [])1617 stgcfg = cfg.get("storage", {}).get("config", [])
1617 disks = [ent for ent in stgcfg if (ent.get('type') == 'disk' and1618 disks = [ent for ent in stgcfg if (ent.get('type') == 'disk' and
1618 'name' in ent)]1619 'name' in ent)]
@@ -1751,10 +1752,10 @@ class VMBaseClass(TestCase):
1751 @classmethod1752 @classmethod
1752 def get_class_storage_config(cls):1753 def get_class_storage_config(cls):
1753 sc = cls.load_conf_file()1754 sc = cls.load_conf_file()
1754 return yaml.load(sc).get('storage', {}).get('config', {})1755 return yaml.safe_load(sc).get('storage', {}).get('config', {})
17551756
1756 def get_storage_config(self):1757 def get_storage_config(self):
1757 cfg = yaml.load(self.load_collect_file("root/curtin-install-cfg.yaml"))1758 cfg = load_config(self.collect_path("root/curtin-install-cfg.yaml"))
1758 return cfg.get("storage", {}).get("config", [])1759 return cfg.get("storage", {}).get("config", [])
17591760
1760 def has_storage_config(self):1761 def has_storage_config(self):
@@ -1992,7 +1993,7 @@ def generate_user_data(collect_scripts=None, apt_proxy=None,
1992 capture=True)1993 capture=True)
1993 # precises' cloud-init version has limited support for cloud-config-archive1994 # precises' cloud-init version has limited support for cloud-config-archive
1994 # and expects cloud-config pieces to be appendable to a single file and1995 # and expects cloud-config pieces to be appendable to a single file and
1995 # yaml.load()'able. Resolve this by using yaml.dump() when generating1996 # yaml.safe_load()'able. Resolve this by using yaml.dump() when generating
1996 # a list of parts1997 # a list of parts
1997 parts = [{'type': 'text/cloud-config',1998 parts = [{'type': 'text/cloud-config',
1998 'content': yaml.dump(base_cloudconfig, indent=1)},1999 'content': yaml.dump(base_cloudconfig, indent=1)},
diff --git a/tests/vmtests/releases.py b/tests/vmtests/releases.py
index accd999..1a92412 100644
--- a/tests/vmtests/releases.py
+++ b/tests/vmtests/releases.py
@@ -121,6 +121,12 @@ class _DiscoBase(_UbuntuBase):
121 mem = "2048"121 mem = "2048"
122122
123123
124class _EoanBase(_UbuntuBase):
125 release = "eoan"
126 target_release = "eoan"
127 mem = "2048"
128
129
124class _Releases(object):130class _Releases(object):
125 trusty = _TrustyBase131 trusty = _TrustyBase
126 precise = _PreciseBase132 precise = _PreciseBase
@@ -137,6 +143,7 @@ class _Releases(object):
137 bionic = _BionicBase143 bionic = _BionicBase
138 cosmic = _CosmicBase144 cosmic = _CosmicBase
139 disco = _DiscoBase145 disco = _DiscoBase
146 eoan = _EoanBase
140147
141148
142class _CentosReleases(object):149class _CentosReleases(object):
diff --git a/tests/vmtests/test_apt_config_cmd.py b/tests/vmtests/test_apt_config_cmd.py
index 1296240..13325e5 100644
--- a/tests/vmtests/test_apt_config_cmd.py
+++ b/tests/vmtests/test_apt_config_cmd.py
@@ -5,10 +5,10 @@
5 apt-config standalone command.5 apt-config standalone command.
6"""6"""
7import textwrap7import textwrap
8import yaml
98
10from . import VMBaseClass9from . import VMBaseClass
11from .releases import base_vm_classes as relbase10from .releases import base_vm_classes as relbase
11from curtin.config import load_config
1212
1313
14class TestAptConfigCMD(VMBaseClass):14class TestAptConfigCMD(VMBaseClass):
@@ -50,7 +50,7 @@ class TestAptConfigCMD(VMBaseClass):
50 # For earlier than xenial 'apt_preserve_sources_list' is expected50 # For earlier than xenial 'apt_preserve_sources_list' is expected
51 self.assertEqual(51 self.assertEqual(
52 {'apt': {'preserve_sources_list': True}},52 {'apt': {'preserve_sources_list': True}},
53 yaml.load(self.load_collect_file("curtin-preserve-sources.cfg")))53 load_config(self.collect_path("curtin-preserve-sources.cfg")))
5454
5555
56class XenialTestAptConfigCMDCMD(relbase.xenial, TestAptConfigCMD):56class XenialTestAptConfigCMDCMD(relbase.xenial, TestAptConfigCMD):
@@ -71,4 +71,8 @@ class CosmicTestAptConfigCMDCMD(relbase.cosmic, TestAptConfigCMD):
71class DiscoTestAptConfigCMDCMD(relbase.disco, TestAptConfigCMD):71class DiscoTestAptConfigCMDCMD(relbase.disco, TestAptConfigCMD):
72 __test__ = True72 __test__ = True
7373
74
75class EoanTestAptConfigCMDCMD(relbase.eoan, TestAptConfigCMD):
76 __test__ = True
77
74# vi: ts=4 expandtab syntax=python78# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_apt_source.py b/tests/vmtests/test_apt_source.py
index 2cd7267..a090ffa 100644
--- a/tests/vmtests/test_apt_source.py
+++ b/tests/vmtests/test_apt_source.py
@@ -4,13 +4,13 @@
4 Collection of tests for the apt configuration features4 Collection of tests for the apt configuration features
5"""5"""
6import textwrap6import textwrap
7import yaml
87
9from . import VMBaseClass8from . import VMBaseClass
10from .releases import base_vm_classes as relbase9from .releases import base_vm_classes as relbase
1110
12from unittest import SkipTest11from unittest import SkipTest
13from curtin import util12from curtin import util
13from curtin.config import load_config
1414
1515
16class TestAptSrcAbs(VMBaseClass):16class TestAptSrcAbs(VMBaseClass):
@@ -67,7 +67,7 @@ class TestAptSrcAbs(VMBaseClass):
67 # For earlier than xenial 'apt_preserve_sources_list' is expected67 # For earlier than xenial 'apt_preserve_sources_list' is expected
68 self.assertEqual(68 self.assertEqual(
69 {'apt': {'preserve_sources_list': True}},69 {'apt': {'preserve_sources_list': True}},
70 yaml.load(self.load_collect_file("curtin-preserve-sources.cfg")))70 load_config(self.collect_path("curtin-preserve-sources.cfg")))
7171
72 def test_source_files(self):72 def test_source_files(self):
73 """test_source_files - Check generated .lists for correct content"""73 """test_source_files - Check generated .lists for correct content"""
diff --git a/tests/vmtests/test_basic.py b/tests/vmtests/test_basic.py
index a4a3018..92971b3 100644
--- a/tests/vmtests/test_basic.py
+++ b/tests/vmtests/test_basic.py
@@ -17,7 +17,7 @@ class TestBasicAbs(VMBaseClass):
17 nr_cpus = 217 nr_cpus = 2
18 dirty_disks = True18 dirty_disks = True
19 conf_file = "examples/tests/basic.yaml"19 conf_file = "examples/tests/basic.yaml"
20 extra_disks = ['128G', '128G', '4G', '4G']20 extra_disks = ['15G', '20G', '25G']
21 disk_to_check = [('btrfs_volume', 0),21 disk_to_check = [('btrfs_volume', 0),
22 ('main_disk_with_in---valid--dname', 0),22 ('main_disk_with_in---valid--dname', 0),
23 ('main_disk_with_in---valid--dname', 1),23 ('main_disk_with_in---valid--dname', 1),
@@ -81,9 +81,6 @@ class TestBasicAbs(VMBaseClass):
81 return kname81 return kname
8282
83 def _test_ptable(self, blkid_output, expected):83 def _test_ptable(self, blkid_output, expected):
84 if self.target_release == "trusty":
85 raise SkipTest("No PTTYPE blkid output on trusty")
86
87 if not blkid_output:84 if not blkid_output:
88 raise RuntimeError('_test_ptable requires blkid output file')85 raise RuntimeError('_test_ptable requires blkid output file')
8986
@@ -237,14 +234,6 @@ class Centos70XenialTestBasic(centos_relbase.centos70_xenial,
237 __test__ = True234 __test__ = True
238235
239236
240class TrustyTestBasic(relbase.trusty, TestBasicAbs):
241 __test__ = True
242
243
244class TrustyHWEXTestBasic(relbase.trusty_hwe_x, TrustyTestBasic):
245 __test__ = True
246
247
248class XenialGAi386TestBasic(relbase.xenial_ga, TestBasicAbs):237class XenialGAi386TestBasic(relbase.xenial_ga, TestBasicAbs):
249 __test__ = True238 __test__ = True
250 arch = 'i386'239 arch = 'i386'
@@ -274,10 +263,14 @@ class DiscoTestBasic(relbase.disco, TestBasicAbs):
274 __test__ = True263 __test__ = True
275264
276265
266class EoanTestBasic(relbase.eoan, TestBasicAbs):
267 __test__ = True
268
269
277class TestBasicScsiAbs(TestBasicAbs):270class TestBasicScsiAbs(TestBasicAbs):
278 conf_file = "examples/tests/basic_scsi.yaml"271 conf_file = "examples/tests/basic_scsi.yaml"
279 disk_driver = 'scsi-hd'272 disk_driver = 'scsi-hd'
280 extra_disks = ['128G', '128G', '4G', '4G']273 extra_disks = ['15G', '20G', '25G']
281 extra_collect_scripts = [textwrap.dedent("""274 extra_collect_scripts = [textwrap.dedent("""
282 cd OUTPUT_COLLECT_D275 cd OUTPUT_COLLECT_D
283 blkid -o export /dev/sda | cat >blkid_output_sda276 blkid -o export /dev/sda | cat >blkid_output_sda
@@ -354,7 +347,13 @@ class CosmicTestScsiBasic(relbase.cosmic, TestBasicScsiAbs):
354 __test__ = True347 __test__ = True
355348
356349
350@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
357class DiscoTestScsiBasic(relbase.disco, TestBasicScsiAbs):351class DiscoTestScsiBasic(relbase.disco, TestBasicScsiAbs):
358 __test__ = True352 __test__ = True
359353
354
355@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
356class EoanTestScsiBasic(relbase.eoan, TestBasicScsiAbs):
357 __test__ = True
358
360# vi: ts=4 expandtab syntax=python359# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_basic_dasd.py b/tests/vmtests/test_basic_dasd.py
index 496faf9..763bc9c 100644
--- a/tests/vmtests/test_basic_dasd.py
+++ b/tests/vmtests/test_basic_dasd.py
@@ -67,4 +67,10 @@ class DiscoTestBasicDasd(relbase.disco, TestBasicDasd):
67 self.output_files_exist(["netplan.yaml"])67 self.output_files_exist(["netplan.yaml"])
6868
6969
70class EoanTestBasicDasd(relbase.eoan, TestBasicDasd):
71 __test__ = True
72
73 def test_output_files_exist(self):
74 self.output_files_exist(["netplan.yaml"])
75
70# vi: ts=4 expandtab syntax=python76# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_bcache_basic.py b/tests/vmtests/test_bcache_basic.py
index b6044d4..12ed8f6 100644
--- a/tests/vmtests/test_bcache_basic.py
+++ b/tests/vmtests/test_bcache_basic.py
@@ -48,14 +48,6 @@ class TestBcacheBasic(VMBaseClass):
48 self.check_file_regex("proc_cmdline", r"root=UUID=")48 self.check_file_regex("proc_cmdline", r"root=UUID=")
4949
5050
51class TrustyBcacheBasic(relbase.trusty, TestBcacheBasic):
52 __test__ = False # covered by test_raid5_bcache
53
54
55class TrustyHWEXBcacheBasic(relbase.trusty_hwe_x, TestBcacheBasic):
56 __test__ = False # covered by test_raid5_bcache
57
58
59class XenialGABcacheBasic(relbase.xenial_ga, TestBcacheBasic):51class XenialGABcacheBasic(relbase.xenial_ga, TestBcacheBasic):
60 __test__ = True52 __test__ = True
6153
@@ -79,4 +71,8 @@ class CosmicBcacheBasic(relbase.cosmic, TestBcacheBasic):
79class DiscoBcacheBasic(relbase.disco, TestBcacheBasic):71class DiscoBcacheBasic(relbase.disco, TestBcacheBasic):
80 __test__ = True72 __test__ = True
8173
74
75class EoancacheBasic(relbase.eoan, TestBcacheBasic):
76 __test__ = True
77
82# vi: ts=4 expandtab syntax=python78# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_bcache_bug1718699.py b/tests/vmtests/test_bcache_bug1718699.py
index 5410dc3..e6c66fc 100644
--- a/tests/vmtests/test_bcache_bug1718699.py
+++ b/tests/vmtests/test_bcache_bug1718699.py
@@ -26,4 +26,8 @@ class CosmicTestBcacheBug1718699(relbase.cosmic, TestBcacheBug1718699):
26class DiscoTestBcacheBug1718699(relbase.disco, TestBcacheBug1718699):26class DiscoTestBcacheBug1718699(relbase.disco, TestBcacheBug1718699):
27 __test__ = True27 __test__ = True
2828
29
30class EoanTestBcacheBug1718699(relbase.eoan, TestBcacheBug1718699):
31 __test__ = True
32
29# vi: ts=4 expandtab syntax=python33# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_bcache_ceph.py b/tests/vmtests/test_bcache_ceph.py
index 30820bd..b8b1d9c 100644
--- a/tests/vmtests/test_bcache_ceph.py
+++ b/tests/vmtests/test_bcache_ceph.py
@@ -59,14 +59,6 @@ class TestBcacheCeph(VMBaseClass):
59 self.load_collect_file("bcache_ls").splitlines())59 self.load_collect_file("bcache_ls").splitlines())
6060
6161
62class TrustyTestBcacheCeph(relbase.trusty, TestBcacheCeph):
63 __test__ = False # covered by test_raid5_bcache
64
65
66class TrustyHWEXTestBcacheCeph(relbase.trusty_hwe_x, TestBcacheCeph):
67 __test__ = False # covered by test_raid5_bcache
68
69
70class XenialGATestBcacheCeph(relbase.xenial_ga, TestBcacheCeph):62class XenialGATestBcacheCeph(relbase.xenial_ga, TestBcacheCeph):
71 __test__ = True63 __test__ = True
7264
@@ -90,4 +82,8 @@ class CosmicTestBcacheCeph(relbase.cosmic, TestBcacheCeph):
90class DiscoTestBcacheCeph(relbase.disco, TestBcacheCeph):82class DiscoTestBcacheCeph(relbase.disco, TestBcacheCeph):
91 __test__ = True83 __test__ = True
9284
85
86class EoanTestBcacheCeph(relbase.eoan, TestBcacheCeph):
87 __test__ = True
88
93# vi: ts=4 expandtab syntax=python89# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_bcache_partitions.py b/tests/vmtests/test_bcache_partitions.py
index ff86b51..46dbc88 100644
--- a/tests/vmtests/test_bcache_partitions.py
+++ b/tests/vmtests/test_bcache_partitions.py
@@ -32,4 +32,8 @@ class CosmicTestBcachePartitions(relbase.cosmic, TestBcachePartitions):
32class DiscoTestBcachePartitions(relbase.disco, TestBcachePartitions):32class DiscoTestBcachePartitions(relbase.disco, TestBcachePartitions):
33 __test__ = True33 __test__ = True
3434
35
36class EoanTestBcachePartitions(relbase.eoan, TestBcachePartitions):
37 __test__ = True
38
35# vi: ts=4 expandtab syntax=python39# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_fs_battery.py b/tests/vmtests/test_fs_battery.py
index 347b62a..94850aa 100644
--- a/tests/vmtests/test_fs_battery.py
+++ b/tests/vmtests/test_fs_battery.py
@@ -124,8 +124,6 @@ class TestFsBattery(VMBaseClass):
124124
125 # tools for these types do not support providing uuid.125 # tools for these types do not support providing uuid.
126 no_uuid_types = ['vfat', 'jfs', 'fat16', 'fat32', 'ntfs']126 no_uuid_types = ['vfat', 'jfs', 'fat16', 'fat32', 'ntfs']
127 if self.release in ('trusty'):
128 no_uuid_types += ['btrfs', 'xfs']
129127
130 for k, v in results.items():128 for k, v in results.items():
131 if v['type'] in no_uuid_types:129 if v['type'] in no_uuid_types:
@@ -217,14 +215,6 @@ class Centos70XenialTestFsBattery(centos_relbase.centos70_xenial,
217 self.assertEqual(sorted(expected), sorted(results))215 self.assertEqual(sorted(expected), sorted(results))
218216
219217
220class TrustyTestFsBattery(relbase.trusty, TestFsBattery):
221 __test__ = True
222
223
224class TrustyHWEXTestFsBattery(relbase.trusty_hwe_x, TestFsBattery):
225 __test__ = True
226
227
228class XenialGATestFsBattery(relbase.xenial_ga, TestFsBattery):218class XenialGATestFsBattery(relbase.xenial_ga, TestFsBattery):
229 __test__ = True219 __test__ = True
230220
@@ -248,4 +238,8 @@ class CosmicTestFsBattery(relbase.cosmic, TestFsBattery):
248class DiscoTestFsBattery(relbase.disco, TestFsBattery):238class DiscoTestFsBattery(relbase.disco, TestFsBattery):
249 __test__ = True239 __test__ = True
250240
241
242class EoanTestFsBattery(relbase.eoan, TestFsBattery):
243 __test__ = True
244
251# vi: ts=4 expandtab syntax=python245# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_install_umount.py b/tests/vmtests/test_install_umount.py
index 931cf55..566c4c1 100644
--- a/tests/vmtests/test_install_umount.py
+++ b/tests/vmtests/test_install_umount.py
@@ -28,7 +28,7 @@ class TestInstallUnmount(VMBaseClass):
28 """Test that install ran with unmount: disabled"""28 """Test that install ran with unmount: disabled"""
29 collect_curtin_cfg = 'root/curtin-install-cfg.yaml'29 collect_curtin_cfg = 'root/curtin-install-cfg.yaml'
30 self.output_files_exist([collect_curtin_cfg])30 self.output_files_exist([collect_curtin_cfg])
31 curtin_cfg = yaml.load(self.load_collect_file(collect_curtin_cfg))31 curtin_cfg = yaml.safe_load(self.load_collect_file(collect_curtin_cfg))
3232
33 # check that we have33 # check that we have
34 # install:34 # install:
diff --git a/tests/vmtests/test_iscsi.py b/tests/vmtests/test_iscsi.py
index 2707d40..3fb2be9 100644
--- a/tests/vmtests/test_iscsi.py
+++ b/tests/vmtests/test_iscsi.py
@@ -55,10 +55,6 @@ class Centos70XenialTestIscsiBasic(centos_relbase.centos70_xenial,
55 __test__ = True55 __test__ = True
5656
5757
58class TrustyTestIscsiBasic(relbase.trusty, TestBasicIscsiAbs):
59 __test__ = True
60
61
62class XenialGATestIscsiBasic(relbase.xenial_ga, TestBasicIscsiAbs):58class XenialGATestIscsiBasic(relbase.xenial_ga, TestBasicIscsiAbs):
63 __test__ = True59 __test__ = True
6460
@@ -82,4 +78,8 @@ class CosmicTestIscsiBasic(relbase.cosmic, TestBasicIscsiAbs):
82class DiscoTestIscsiBasic(relbase.disco, TestBasicIscsiAbs):78class DiscoTestIscsiBasic(relbase.disco, TestBasicIscsiAbs):
83 __test__ = True79 __test__ = True
8480
81
82class EoanTestIscsiBasic(relbase.eoan, TestBasicIscsiAbs):
83 __test__ = True
84
85# vi: ts=4 expandtab syntax=python85# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_journald_reporter.py b/tests/vmtests/test_journald_reporter.py
index 80af61e..71d331c 100644
--- a/tests/vmtests/test_journald_reporter.py
+++ b/tests/vmtests/test_journald_reporter.py
@@ -43,4 +43,8 @@ class CosmicTestJournaldReporter(relbase.cosmic, TestJournaldReporter):
43class DiscoTestJournaldReporter(relbase.disco, TestJournaldReporter):43class DiscoTestJournaldReporter(relbase.disco, TestJournaldReporter):
44 __test__ = True44 __test__ = True
4545
46
47class EoanTestJournaldReporter(relbase.eoan, TestJournaldReporter):
48 __test__ = True
49
46# vi: ts=4 expandtab syntax=python50# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_lvm.py b/tests/vmtests/test_lvm.py
index fdb5314..d5a7328 100644
--- a/tests/vmtests/test_lvm.py
+++ b/tests/vmtests/test_lvm.py
@@ -47,14 +47,6 @@ class Centos70XenialTestLvm(centos_relbase.centos70_xenial, TestLvmAbs):
47 __test__ = True47 __test__ = True
4848
4949
50class TrustyTestLvm(relbase.trusty, TestLvmAbs):
51 __test__ = True
52
53
54class TrustyHWEXTestLvm(relbase.trusty_hwe_x, TestLvmAbs):
55 __test__ = True
56
57
58class XenialGATestLvm(relbase.xenial_ga, TestLvmAbs):50class XenialGATestLvm(relbase.xenial_ga, TestLvmAbs):
59 __test__ = True51 __test__ = True
6052
@@ -78,4 +70,8 @@ class CosmicTestLvm(relbase.cosmic, TestLvmAbs):
78class DiscoTestLvm(relbase.disco, TestLvmAbs):70class DiscoTestLvm(relbase.disco, TestLvmAbs):
79 __test__ = True71 __test__ = True
8072
73
74class EoanTestLvm(relbase.eoan, TestLvmAbs):
75 __test__ = True
76
81# vi: ts=4 expandtab syntax=python77# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_lvm_iscsi.py b/tests/vmtests/test_lvm_iscsi.py
index 6cdcab2..9e42163 100644
--- a/tests/vmtests/test_lvm_iscsi.py
+++ b/tests/vmtests/test_lvm_iscsi.py
@@ -62,10 +62,6 @@ class Centos70XenialTestLvmIscsi(centos_relbase.centos70_xenial,
62 __test__ = True62 __test__ = True
6363
6464
65class TrustyTestIscsiLvm(relbase.trusty, TestLvmIscsiAbs):
66 __test__ = True
67
68
69class XenialTestIscsiLvm(relbase.xenial, TestLvmIscsiAbs):65class XenialTestIscsiLvm(relbase.xenial, TestLvmIscsiAbs):
70 __test__ = True66 __test__ = True
7167
@@ -93,4 +89,8 @@ class CosmicTestIscsiLvm(relbase.cosmic, TestLvmIscsiAbs):
93class DiscoTestIscsiLvm(relbase.disco, TestLvmIscsiAbs):89class DiscoTestIscsiLvm(relbase.disco, TestLvmIscsiAbs):
94 __test__ = True90 __test__ = True
9591
92
93class EoanTestIscsiLvm(relbase.eoan, TestLvmIscsiAbs):
94 __test__ = True
95
96# vi: ts=4 expandtab syntax=python96# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_lvm_raid.py b/tests/vmtests/test_lvm_raid.py
index d70f3ef..155bbb9 100644
--- a/tests/vmtests/test_lvm_raid.py
+++ b/tests/vmtests/test_lvm_raid.py
@@ -43,6 +43,10 @@ class TestLvmOverRaidAbs(TestMdadmAbs, TestLvmAbs):
43 self.check_file_strippedline("pvs", "vg0=/dev/md1")43 self.check_file_strippedline("pvs", "vg0=/dev/md1")
4444
4545
46class EoanTestLvmOverRaid(relbase.eoan, TestLvmOverRaidAbs):
47 __test__ = True
48
49
46class DiscoTestLvmOverRaid(relbase.disco, TestLvmOverRaidAbs):50class DiscoTestLvmOverRaid(relbase.disco, TestLvmOverRaidAbs):
47 __test__ = True51 __test__ = True
4852
diff --git a/tests/vmtests/test_lvm_root.py b/tests/vmtests/test_lvm_root.py
index d726a45..33deeac 100644
--- a/tests/vmtests/test_lvm_root.py
+++ b/tests/vmtests/test_lvm_root.py
@@ -48,7 +48,7 @@ class TestLvmRootAbs(VMBaseClass):
48 self.assertEqual(self.conf_replace['__ROOTFS_FORMAT__'],48 self.assertEqual(self.conf_replace['__ROOTFS_FORMAT__'],
49 entry['fstype'])49 entry['fstype'])
50 else:50 else:
51 # no json output on trusty51 # no json output on older releases
52 self.output_files_exist(["lsblk.out"])52 self.output_files_exist(["lsblk.out"])
53 lsblk_data = open(self.collect_path('lsblk.out')).readlines()53 lsblk_data = open(self.collect_path('lsblk.out')).readlines()
54 print(lsblk_data)54 print(lsblk_data)
@@ -77,22 +77,6 @@ class Centos70XenialTestLvmRootXfs(centos_relbase.centos70_xenial,
77 }77 }
7878
7979
80class TrustyTestLvmRootExt4(relbase.trusty, TestLvmRootAbs):
81 __test__ = True
82 conf_replace = {
83 '__ROOTFS_FORMAT__': 'ext4',
84 }
85
86
87class TrustyTestLvmRootXfs(relbase.trusty, TestLvmRootAbs):
88 __test__ = True
89 # xfs on trusty can't support uuid=
90 fstab_expected = {}
91 conf_replace = {
92 '__ROOTFS_FORMAT__': 'xfs',
93 }
94
95
96class XenialTestLvmRootExt4(relbase.xenial, TestLvmRootAbs):80class XenialTestLvmRootExt4(relbase.xenial, TestLvmRootAbs):
97 __test__ = True81 __test__ = True
98 conf_replace = {82 conf_replace = {
diff --git a/tests/vmtests/test_mdadm_bcache.py b/tests/vmtests/test_mdadm_bcache.py
index 7168465..6f8bea7 100644
--- a/tests/vmtests/test_mdadm_bcache.py
+++ b/tests/vmtests/test_mdadm_bcache.py
@@ -127,15 +127,6 @@ class TestMdadmBcacheAbs(TestMdadmAbs):
127 self.test_dname(disk_to_check=self.bcache_dnames)127 self.test_dname(disk_to_check=self.bcache_dnames)
128128
129129
130@VMBaseClass.skip_by_date("1754581", fixby="2020-01-22", install=False)
131class TrustyTestMdadmBcache(relbase.trusty, TestMdadmBcacheAbs):
132 __test__ = True
133
134
135class TrustyHWEXTestMdadmBcache(relbase.trusty_hwe_x, TestMdadmBcacheAbs):
136 __test__ = True
137
138
139class XenialGATestMdadmBcache(relbase.xenial_ga, TestMdadmBcacheAbs):130class XenialGATestMdadmBcache(relbase.xenial_ga, TestMdadmBcacheAbs):
140 __test__ = True131 __test__ = True
141132
@@ -160,6 +151,10 @@ class DiscoTestMdadmBcache(relbase.disco, TestMdadmBcacheAbs):
160 __test__ = True151 __test__ = True
161152
162153
154class EoanTestMdadmBcache(relbase.eoan, TestMdadmBcacheAbs):
155 __test__ = True
156
157
163class TestMirrorbootAbs(TestMdadmAbs):158class TestMirrorbootAbs(TestMdadmAbs):
164 # alternative config for more complex setup159 # alternative config for more complex setup
165 conf_file = "examples/tests/mirrorboot.yaml"160 conf_file = "examples/tests/mirrorboot.yaml"
@@ -176,15 +171,6 @@ class Centos70TestMirrorboot(centos_relbase.centos70_xenial,
176 __test__ = True171 __test__ = True
177172
178173
179class TrustyTestMirrorboot(relbase.trusty, TestMirrorbootAbs):
180 __test__ = True
181
182
183class TrustyHWEXTestMirrorboot(relbase.trusty_hwe_x, TestMirrorbootAbs):
184 # This tests kernel upgrade in target
185 __test__ = True
186
187
188class XenialGATestMirrorboot(relbase.xenial_ga, TestMirrorbootAbs):174class XenialGATestMirrorboot(relbase.xenial_ga, TestMirrorbootAbs):
189 __test__ = True175 __test__ = True
190176
@@ -209,6 +195,10 @@ class DiscoTestMirrorboot(relbase.disco, TestMirrorbootAbs):
209 __test__ = True195 __test__ = True
210196
211197
198class EoanTestMirrorboot(relbase.eoan, TestMirrorbootAbs):
199 __test__ = True
200
201
212class TestMirrorbootPartitionsAbs(TestMdadmAbs):202class TestMirrorbootPartitionsAbs(TestMdadmAbs):
213 # alternative config for more complex setup203 # alternative config for more complex setup
214 conf_file = "examples/tests/mirrorboot-msdos-partition.yaml"204 conf_file = "examples/tests/mirrorboot-msdos-partition.yaml"
@@ -224,17 +214,6 @@ class Centos70TestMirrorbootPartitions(centos_relbase.centos70_xenial,
224 __test__ = True214 __test__ = True
225215
226216
227class TrustyTestMirrorbootPartitions(relbase.trusty,
228 TestMirrorbootPartitionsAbs):
229 __test__ = True
230
231
232class TrustyHWEXTestMirrorbootPartitions(relbase.trusty_hwe_x,
233 TestMirrorbootPartitionsAbs):
234 # This tests kernel upgrade in target
235 __test__ = True
236
237
238class XenialGATestMirrorbootPartitions(relbase.xenial_ga,217class XenialGATestMirrorbootPartitions(relbase.xenial_ga,
239 TestMirrorbootPartitionsAbs):218 TestMirrorbootPartitionsAbs):
240 __test__ = True219 __test__ = True
@@ -265,6 +244,11 @@ class DiscoTestMirrorbootPartitions(relbase.disco,
265 __test__ = True244 __test__ = True
266245
267246
247class EoanTestMirrorbootPartitions(relbase.eoan,
248 TestMirrorbootPartitionsAbs):
249 __test__ = True
250
251
268class TestMirrorbootPartitionsUEFIAbs(TestMdadmAbs):252class TestMirrorbootPartitionsUEFIAbs(TestMdadmAbs):
269 # alternative config for more complex setup253 # alternative config for more complex setup
270 conf_file = "examples/tests/mirrorboot-uefi.yaml"254 conf_file = "examples/tests/mirrorboot-uefi.yaml"
@@ -285,11 +269,6 @@ class Centos70TestMirrorbootPartitionsUEFI(centos_relbase.centos70_xenial,
285 __test__ = True269 __test__ = True
286270
287271
288class TrustyTestMirrorbootPartitionsUEFI(relbase.trusty,
289 TestMirrorbootPartitionsUEFIAbs):
290 __test__ = True
291
292
293class XenialGATestMirrorbootPartitionsUEFI(relbase.xenial_ga,272class XenialGATestMirrorbootPartitionsUEFI(relbase.xenial_ga,
294 TestMirrorbootPartitionsUEFIAbs):273 TestMirrorbootPartitionsUEFIAbs):
295 __test__ = True274 __test__ = True
@@ -320,6 +299,11 @@ class DiscoTestMirrorbootPartitionsUEFI(relbase.disco,
320 __test__ = True299 __test__ = True
321300
322301
302class EoanTestMirrorbootPartitionsUEFI(relbase.eoan,
303 TestMirrorbootPartitionsUEFIAbs):
304 __test__ = True
305
306
323class TestRaid5bootAbs(TestMdadmAbs):307class TestRaid5bootAbs(TestMdadmAbs):
324 # alternative config for more complex setup308 # alternative config for more complex setup
325 conf_file = "examples/tests/raid5boot.yaml"309 conf_file = "examples/tests/raid5boot.yaml"
@@ -336,15 +320,6 @@ class Centos70TestRaid5boot(centos_relbase.centos70_xenial, TestRaid5bootAbs):
336 __test__ = True320 __test__ = True
337321
338322
339class TrustyTestRaid5boot(relbase.trusty, TestRaid5bootAbs):
340 __test__ = True
341
342
343class TrustyHWEXTestRaid5boot(relbase.trusty_hwe_x, TestRaid5bootAbs):
344 # This tests kernel upgrade in target
345 __test__ = True
346
347
348class XenialGATestRaid5boot(relbase.xenial_ga, TestRaid5bootAbs):323class XenialGATestRaid5boot(relbase.xenial_ga, TestRaid5bootAbs):
349 __test__ = True324 __test__ = True
350325
@@ -369,6 +344,10 @@ class DiscoTestRaid5boot(relbase.disco, TestRaid5bootAbs):
369 __test__ = True344 __test__ = True
370345
371346
347class EoanTestRaid5boot(relbase.eoan, TestRaid5bootAbs):
348 __test__ = True
349
350
372class TestRaid6bootAbs(TestMdadmAbs):351class TestRaid6bootAbs(TestMdadmAbs):
373 # alternative config for more complex setup352 # alternative config for more complex setup
374 conf_file = "examples/tests/raid6boot.yaml"353 conf_file = "examples/tests/raid6boot.yaml"
@@ -401,14 +380,6 @@ class Centos70TestRaid6boot(centos_relbase.centos70_xenial, TestRaid6bootAbs):
401 __test__ = True380 __test__ = True
402381
403382
404class TrustyTestRaid6boot(relbase.trusty, TestRaid6bootAbs):
405 __test__ = True
406
407
408class TrustyHWEXTestRaid6boot(relbase.trusty_hwe_x, TestRaid6bootAbs):
409 __test__ = True
410
411
412class XenialGATestRaid6boot(relbase.xenial_ga, TestRaid6bootAbs):383class XenialGATestRaid6boot(relbase.xenial_ga, TestRaid6bootAbs):
413 __test__ = True384 __test__ = True
414385
@@ -433,6 +404,10 @@ class DiscoTestRaid6boot(relbase.disco, TestRaid6bootAbs):
433 __test__ = True404 __test__ = True
434405
435406
407class EoanTestRaid6boot(relbase.eoan, TestRaid6bootAbs):
408 __test__ = True
409
410
436class TestRaid10bootAbs(TestMdadmAbs):411class TestRaid10bootAbs(TestMdadmAbs):
437 # alternative config for more complex setup412 # alternative config for more complex setup
438 conf_file = "examples/tests/raid10boot.yaml"413 conf_file = "examples/tests/raid10boot.yaml"
@@ -451,14 +426,6 @@ class Centos70TestRaid10boot(centos_relbase.centos70_xenial,
451 __test__ = True426 __test__ = True
452427
453428
454class TrustyTestRaid10boot(relbase.trusty, TestRaid10bootAbs):
455 __test__ = True
456
457
458class TrustyHWEXTestRaid10boot(relbase.trusty_hwe_x, TestRaid10bootAbs):
459 __test__ = True
460
461
462class XenialGATestRaid10boot(relbase.xenial_ga, TestRaid10bootAbs):429class XenialGATestRaid10boot(relbase.xenial_ga, TestRaid10bootAbs):
463 __test__ = True430 __test__ = True
464431
@@ -483,6 +450,10 @@ class DiscoTestRaid10boot(relbase.disco, TestRaid10bootAbs):
483 __test__ = True450 __test__ = True
484451
485452
453class EoanTestRaid10boot(relbase.eoan, TestRaid10bootAbs):
454 __test__ = True
455
456
486class TestAllindataAbs(TestMdadmAbs):457class TestAllindataAbs(TestMdadmAbs):
487 # more complex, needs more time458 # more complex, needs more time
488 # alternative config for more complex setup459 # alternative config for more complex setup
@@ -559,14 +530,6 @@ class TestAllindataAbs(TestMdadmAbs):
559 self.check_file_regex("xfs_info", r"^meta-data=/dev/mapper/dmcrypt0")530 self.check_file_regex("xfs_info", r"^meta-data=/dev/mapper/dmcrypt0")
560531
561532
562class TrustyTestAllindata(relbase.trusty, TestAllindataAbs):
563 __test__ = False # luks=no does not disable mounting of device
564
565
566class TrustyHWEXTestAllindata(relbase.trusty_hwe_x, TestAllindataAbs):
567 __test__ = False # lukes=no does not disable mounting of device
568
569
570class XenialGATestAllindata(relbase.xenial_ga, TestAllindataAbs):533class XenialGATestAllindata(relbase.xenial_ga, TestAllindataAbs):
571 __test__ = True534 __test__ = True
572535
@@ -587,8 +550,11 @@ class CosmicTestAllindata(relbase.cosmic, TestAllindataAbs):
587 __test__ = True550 __test__ = True
588551
589552
590@VMBaseClass.skip_by_date("1818876", fixby="2019-04-22", install=False)
591class DiscoTestAllindata(relbase.disco, TestAllindataAbs):553class DiscoTestAllindata(relbase.disco, TestAllindataAbs):
592 __test__ = True554 __test__ = True
593555
556
557class EoanTestAllindata(relbase.eoan, TestAllindataAbs):
558 __test__ = True
559
594# vi: ts=4 expandtab syntax=python560# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_mdadm_iscsi.py b/tests/vmtests/test_mdadm_iscsi.py
index b43855d..fa8d88f 100644
--- a/tests/vmtests/test_mdadm_iscsi.py
+++ b/tests/vmtests/test_mdadm_iscsi.py
@@ -34,10 +34,6 @@ class Centos70TestIscsiMdadm(centos_relbase.centos70_xenial,
34 __test__ = True34 __test__ = True
3535
3636
37class TrustyTestIscsiMdadm(relbase.trusty, TestMdadmIscsiAbs):
38 __test__ = True
39
40
41class XenialGATestIscsiMdadm(relbase.xenial_ga, TestMdadmIscsiAbs):37class XenialGATestIscsiMdadm(relbase.xenial_ga, TestMdadmIscsiAbs):
42 __test__ = True38 __test__ = True
4339
@@ -61,4 +57,8 @@ class CosmicTestIscsiMdadm(relbase.cosmic, TestMdadmIscsiAbs):
61class DiscoTestIscsiMdadm(relbase.disco, TestMdadmIscsiAbs):57class DiscoTestIscsiMdadm(relbase.disco, TestMdadmIscsiAbs):
62 __test__ = True58 __test__ = True
6359
60
61class EoanTestIscsiMdadm(relbase.eoan, TestMdadmIscsiAbs):
62 __test__ = True
63
64# vi: ts=4 expandtab syntax=python64# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_multipath.py b/tests/vmtests/test_multipath.py
index a22bc0f..7711198 100644
--- a/tests/vmtests/test_multipath.py
+++ b/tests/vmtests/test_multipath.py
@@ -64,15 +64,6 @@ class Centos70TestMultipathBasic(centos_relbase.centos70_xenial,
64 __test__ = True64 __test__ = True
6565
6666
67class TrustyTestMultipathBasic(relbase.trusty, TestMultipathBasicAbs):
68 __test__ = True
69
70
71class TrustyHWEXTestMultipathBasic(relbase.trusty_hwe_x,
72 TestMultipathBasicAbs):
73 __test__ = True
74
75
76class XenialGATestMultipathBasic(relbase.xenial_ga, TestMultipathBasicAbs):67class XenialGATestMultipathBasic(relbase.xenial_ga, TestMultipathBasicAbs):
77 __test__ = True68 __test__ = True
7869
@@ -93,7 +84,13 @@ class CosmicTestMultipathBasic(relbase.cosmic, TestMultipathBasicAbs):
93 __test__ = True84 __test__ = True
9485
9586
87@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
96class DiscoTestMultipathBasic(relbase.disco, TestMultipathBasicAbs):88class DiscoTestMultipathBasic(relbase.disco, TestMultipathBasicAbs):
97 __test__ = True89 __test__ = True
9890
91
92@VMBaseClass.skip_by_date("1813228", fixby="2019-06-02", install=False)
93class EoanTestMultipathBasic(relbase.eoan, TestMultipathBasicAbs):
94 __test__ = True
95
99# vi: ts=4 expandtab syntax=python96# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_network.py b/tests/vmtests/test_network.py
index 1b0e41c..2c3b73c 100644
--- a/tests/vmtests/test_network.py
+++ b/tests/vmtests/test_network.py
@@ -440,29 +440,6 @@ class CentosTestNetworkBasicAbs(TestNetworkBaseTestsAbs):
440 pass440 pass
441441
442442
443class TrustyTestNetworkBasic(relbase.trusty, TestNetworkBasicAbs):
444 __test__ = True
445
446
447class TrustyHWEUTestNetworkBasic(relbase.trusty_hwe_u, TrustyTestNetworkBasic):
448 # Working, off by default to safe test suite runtime, covered by bonding
449 __test__ = False
450
451
452class TrustyHWEVTestNetworkBasic(relbase.trusty_hwe_v, TrustyTestNetworkBasic):
453 # Working, off by default to safe test suite runtime, covered by bonding
454 __test__ = False
455
456
457class TrustyHWEWTestNetworkBasic(relbase.trusty_hwe_w, TrustyTestNetworkBasic):
458 # Working, off by default to safe test suite runtime, covered by bonding
459 __test__ = False
460
461
462class TrustyHWEXTestNetworkBasic(relbase.trusty_hwe_x, TrustyTestNetworkBasic):
463 __test__ = True
464
465
466class XenialTestNetworkBasic(relbase.xenial, TestNetworkBasicAbs):443class XenialTestNetworkBasic(relbase.xenial, TestNetworkBasicAbs):
467 __test__ = True444 __test__ = True
468445
@@ -479,6 +456,10 @@ class DiscoTestNetworkBasic(relbase.disco, TestNetworkBasicAbs):
479 __test__ = True456 __test__ = True
480457
481458
459class EoanTestNetworkBasic(relbase.eoan, TestNetworkBasicAbs):
460 __test__ = True
461
462
482class Centos66TestNetworkBasic(centos_relbase.centos66_xenial,463class Centos66TestNetworkBasic(centos_relbase.centos66_xenial,
483 CentosTestNetworkBasicAbs):464 CentosTestNetworkBasicAbs):
484 __test__ = True465 __test__ = True
diff --git a/tests/vmtests/test_network_alias.py b/tests/vmtests/test_network_alias.py
index b2c4ed7..fb4fb2c 100644
--- a/tests/vmtests/test_network_alias.py
+++ b/tests/vmtests/test_network_alias.py
@@ -44,29 +44,6 @@ class Centos70TestNetworkAlias(centos_relbase.centos70_xenial,
44 __test__ = True44 __test__ = True
4545
4646
47class TrustyTestNetworkAlias(relbase.trusty, TestNetworkAliasAbs):
48 __test__ = True
49
50
51class TrustyHWEUTestNetworkAlias(relbase.trusty_hwe_u, TrustyTestNetworkAlias):
52 # Working, off by default to safe test suite runtime, covered by bonding
53 __test__ = False
54
55
56class TrustyHWEVTestNetworkAlias(relbase.trusty_hwe_v, TrustyTestNetworkAlias):
57 # Working, off by default to safe test suite runtime, covered by bonding
58 __test__ = False
59
60
61class TrustyHWEWTestNetworkAlias(relbase.trusty_hwe_w, TrustyTestNetworkAlias):
62 # Working, off by default to safe test suite runtime, covered by bonding
63 __test__ = False
64
65
66class TrustyHWEXTestNetworkAlias(relbase.trusty_hwe_x, TrustyTestNetworkAlias):
67 __test__ = True
68
69
70class XenialTestNetworkAlias(relbase.xenial, TestNetworkAliasAbs):47class XenialTestNetworkAlias(relbase.xenial, TestNetworkAliasAbs):
71 __test__ = True48 __test__ = True
7249
@@ -82,4 +59,8 @@ class CosmicTestNetworkAlias(relbase.cosmic, TestNetworkAliasAbs):
82class DiscoTestNetworkAlias(relbase.disco, TestNetworkAliasAbs):59class DiscoTestNetworkAlias(relbase.disco, TestNetworkAliasAbs):
83 __test__ = True60 __test__ = True
8461
62
63class EoanTestNetworkAlias(relbase.eoan, TestNetworkAliasAbs):
64 __test__ = True
65
85# vi: ts=4 expandtab syntax=python66# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_network_bonding.py b/tests/vmtests/test_network_bonding.py
index fe3abe9..a66591a 100644
--- a/tests/vmtests/test_network_bonding.py
+++ b/tests/vmtests/test_network_bonding.py
@@ -49,26 +49,6 @@ class CentosTestNetworkBondingAbs(TestNetworkBondingAbs):
49 pass49 pass
5050
5151
52class TrustyTestBonding(relbase.trusty, TestNetworkBondingAbs):
53 __test__ = False
54
55
56class TrustyHWEVTestBonding(relbase.trusty_hwe_v, TrustyTestBonding):
57 # Working, but off by default to save test suite runtime
58 # oldest/newest HWE-* covered above/below
59 __test__ = False
60
61
62class TrustyHWEWTestBonding(relbase.trusty_hwe_w, TrustyTestBonding):
63 # Working, but off by default to save test suite runtime
64 # oldest/newest HWE-* covered above/below
65 __test__ = False
66
67
68class TrustyHWEXTestBonding(relbase.trusty_hwe_x, TrustyTestBonding):
69 __test__ = True
70
71
72class XenialTestBonding(relbase.xenial, TestNetworkBondingAbs):52class XenialTestBonding(relbase.xenial, TestNetworkBondingAbs):
73 __test__ = True53 __test__ = True
7454
@@ -85,6 +65,10 @@ class DiscoTestBonding(relbase.disco, TestNetworkBondingAbs):
85 __test__ = True65 __test__ = True
8666
8767
68class EoanTestBonding(relbase.eoan, TestNetworkBondingAbs):
69 __test__ = True
70
71
88class Centos66TestNetworkBonding(centos_relbase.centos66_xenial,72class Centos66TestNetworkBonding(centos_relbase.centos66_xenial,
89 CentosTestNetworkBondingAbs):73 CentosTestNetworkBondingAbs):
90 __test__ = True74 __test__ = True
diff --git a/tests/vmtests/test_network_bridging.py b/tests/vmtests/test_network_bridging.py
index 8576d60..b3ec287 100644
--- a/tests/vmtests/test_network_bridging.py
+++ b/tests/vmtests/test_network_bridging.py
@@ -243,4 +243,8 @@ class CosmicTestBridging(relbase.cosmic, TestBridgeNetworkAbs):
243class DiscoTestBridging(relbase.disco, TestBridgeNetworkAbs):243class DiscoTestBridging(relbase.disco, TestBridgeNetworkAbs):
244 __test__ = True244 __test__ = True
245245
246
247class EoanTestBridging(relbase.eoan, TestBridgeNetworkAbs):
248 __test__ = True
249
246# vi: ts=4 expandtab syntax=python250# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_network_enisource.py b/tests/vmtests/test_network_enisource.py
index 48baecf..476275c 100644
--- a/tests/vmtests/test_network_enisource.py
+++ b/tests/vmtests/test_network_enisource.py
@@ -82,15 +82,6 @@ class TestNetworkENISource(TestNetworkBaseTestsAbs):
82 self.assertEqual(_nocidr(expected_address), _nocidr(actual_address))82 self.assertEqual(_nocidr(expected_address), _nocidr(actual_address))
8383
8484
85class TrustyTestNetworkENISource(relbase.trusty, TestNetworkENISource):
86 __test__ = True
87
88
89class TrustyHWEXTestNetworkENISource(relbase.trusty_hwe_x,
90 TestNetworkENISource):
91 __test__ = True
92
93
94class XenialTestNetworkENISource(relbase.xenial, TestNetworkENISource):85class XenialTestNetworkENISource(relbase.xenial, TestNetworkENISource):
95 __test__ = True86 __test__ = True
9687
diff --git a/tests/vmtests/test_network_ipv6.py b/tests/vmtests/test_network_ipv6.py
index 42adb20..9b6acc9 100644
--- a/tests/vmtests/test_network_ipv6.py
+++ b/tests/vmtests/test_network_ipv6.py
@@ -45,25 +45,6 @@ class CentosTestNetworkIPV6Abs(TestNetworkIPV6Abs):
45 pass45 pass
4646
4747
48class TrustyTestNetworkIPV6(relbase.trusty, TestNetworkIPV6Abs):
49 __test__ = True
50
51
52class TrustyHWEVTestNetworkIPV6(relbase.trusty_hwe_v, TrustyTestNetworkIPV6):
53 # Working, off by default to safe test suite runtime, covered by bonding
54 __test__ = False
55
56
57class TrustyHWEWTestNetworkIPV6(relbase.trusty_hwe_w, TrustyTestNetworkIPV6):
58 # Working, off by default to safe test suite runtime, covered by bonding
59 __test__ = False
60
61
62class TrustyHWEXTestNetworkIPV6(relbase.trusty_hwe_x, TrustyTestNetworkIPV6):
63 # Working, off by default to safe test suite runtime, covered by bonding
64 __test__ = False
65
66
67class XenialTestNetworkIPV6(relbase.xenial, TestNetworkIPV6Abs):48class XenialTestNetworkIPV6(relbase.xenial, TestNetworkIPV6Abs):
68 __test__ = True49 __test__ = True
6950
@@ -80,6 +61,10 @@ class DiscoTestNetworkIPV6(relbase.disco, TestNetworkIPV6Abs):
80 __test__ = True61 __test__ = True
8162
8263
64class EoanTestNetworkIPV6(relbase.eoan, TestNetworkIPV6Abs):
65 __test__ = True
66
67
83class Centos66TestNetworkIPV6(centos_relbase.centos66_xenial,68class Centos66TestNetworkIPV6(centos_relbase.centos66_xenial,
84 CentosTestNetworkIPV6Abs):69 CentosTestNetworkIPV6Abs):
85 __test__ = True70 __test__ = True
diff --git a/tests/vmtests/test_network_ipv6_enisource.py b/tests/vmtests/test_network_ipv6_enisource.py
index 0c92039..bd03bdd 100644
--- a/tests/vmtests/test_network_ipv6_enisource.py
+++ b/tests/vmtests/test_network_ipv6_enisource.py
@@ -14,15 +14,6 @@ class TestNetworkIPV6ENISource(TestNetworkENISource):
14 pass14 pass
1515
1616
17class TrustyTestNetworkIPV6ENISource(relbase.trusty, TestNetworkIPV6ENISource):
18 __test__ = True
19
20
21class TrustyHWEXTestNetworkIPV6ENISource(relbase.trusty_hwe_x,
22 TestNetworkIPV6ENISource):
23 __test__ = True
24
25
26class XenialTestNetworkIPV6ENISource(relbase.xenial, TestNetworkIPV6ENISource):17class XenialTestNetworkIPV6ENISource(relbase.xenial, TestNetworkIPV6ENISource):
27 __test__ = True18 __test__ = True
2819
diff --git a/tests/vmtests/test_network_ipv6_static.py b/tests/vmtests/test_network_ipv6_static.py
index bbd90c9..b79b9e4 100644
--- a/tests/vmtests/test_network_ipv6_static.py
+++ b/tests/vmtests/test_network_ipv6_static.py
@@ -15,33 +15,6 @@ class CentosTestNetworkIPV6StaticAbs(CentosTestNetworkStaticAbs):
15 conf_file = "examples/tests/basic_network_static_ipv6.yaml"15 conf_file = "examples/tests/basic_network_static_ipv6.yaml"
1616
1717
18class TrustyTestNetworkIPV6Static(relbase.trusty, TestNetworkIPV6StaticAbs):
19 __test__ = True
20
21
22class TrustyHWEUTestNetworkIPV6Static(relbase.trusty_hwe_u,
23 TestNetworkIPV6StaticAbs):
24 # unsupported kernel, 2016-08
25 __test__ = False
26
27
28class TrustyHWEVTestNetworkIPV6Static(relbase.trusty_hwe_v,
29 TestNetworkIPV6StaticAbs):
30 # unsupported kernel, 2016-08
31 __test__ = False
32
33
34class TrustyHWEWTestNetworkIPV6Static(relbase.trusty_hwe_w,
35 TestNetworkIPV6StaticAbs):
36 # unsupported kernel, 2016-08
37 __test__ = False
38
39
40class TrustyHWEXTestNetworkIPV6Static(relbase.trusty_hwe_x,
41 TestNetworkIPV6StaticAbs):
42 __test__ = True
43
44
45class XenialTestNetworkIPV6Static(relbase.xenial, TestNetworkIPV6StaticAbs):18class XenialTestNetworkIPV6Static(relbase.xenial, TestNetworkIPV6StaticAbs):
46 __test__ = True19 __test__ = True
4720
@@ -58,6 +31,10 @@ class DiscoTestNetworkIPV6Static(relbase.disco, TestNetworkIPV6StaticAbs):
58 __test__ = True31 __test__ = True
5932
6033
34class EoanTestNetworkIPV6Static(relbase.eoan, TestNetworkIPV6StaticAbs):
35 __test__ = True
36
37
61class Centos66TestNetworkIPV6Static(centos_relbase.centos66_xenial,38class Centos66TestNetworkIPV6Static(centos_relbase.centos66_xenial,
62 CentosTestNetworkIPV6StaticAbs):39 CentosTestNetworkIPV6StaticAbs):
63 __test__ = True40 __test__ = True
diff --git a/tests/vmtests/test_network_ipv6_vlan.py b/tests/vmtests/test_network_ipv6_vlan.py
index 7401d2c..138ea6a 100644
--- a/tests/vmtests/test_network_ipv6_vlan.py
+++ b/tests/vmtests/test_network_ipv6_vlan.py
@@ -14,15 +14,6 @@ class CentosTestNetworkIPV6VlanAbs(CentosTestNetworkVlanAbs):
14 conf_file = "examples/tests/vlan_network_ipv6.yaml"14 conf_file = "examples/tests/vlan_network_ipv6.yaml"
1515
1616
17class TrustyTestNetworkIPV6Vlan(relbase.trusty, TestNetworkIPV6VlanAbs):
18 __test__ = True
19
20
21class TrustyHWEXTestNetworkIPV6Vlan(relbase.trusty_hwe_x,
22 TestNetworkIPV6VlanAbs):
23 __test__ = True
24
25
26class XenialTestNetworkIPV6Vlan(relbase.xenial, TestNetworkIPV6VlanAbs):17class XenialTestNetworkIPV6Vlan(relbase.xenial, TestNetworkIPV6VlanAbs):
27 __test__ = True18 __test__ = True
2819
@@ -39,6 +30,10 @@ class DiscoTestNetworkIPV6Vlan(relbase.disco, TestNetworkIPV6VlanAbs):
39 __test__ = True30 __test__ = True
4031
4132
33class EoanTestNetworkIPV6Vlan(relbase.eoan, TestNetworkIPV6VlanAbs):
34 __test__ = True
35
36
42class Centos66TestNetworkIPV6Vlan(centos_relbase.centos66_xenial,37class Centos66TestNetworkIPV6Vlan(centos_relbase.centos66_xenial,
43 CentosTestNetworkIPV6VlanAbs):38 CentosTestNetworkIPV6VlanAbs):
44 __test__ = True39 __test__ = True
diff --git a/tests/vmtests/test_network_mtu.py b/tests/vmtests/test_network_mtu.py
index affa6aa..30cc2c8 100644
--- a/tests/vmtests/test_network_mtu.py
+++ b/tests/vmtests/test_network_mtu.py
@@ -161,54 +161,30 @@ class CentosTestNetworkMtuAbs(TestNetworkMtuAbs):
161 pass161 pass
162162
163163
164class TrustyTestNetworkMtu(relbase.trusty, TestNetworkMtuAbs):
165 __test__ = True
166
167 # FIXME: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809714
168 # fixed in newer ifupdown than is in trusty
169 def test_ipv6_mtu_smaller_than_ipv4_non_default(self):
170 # trusty ifupdown uses device mtu to change v6 mtu
171 pass
172
173
174class TrustyHWEUTestNetworkMtu(relbase.trusty_hwe_u, TrustyTestNetworkMtu):
175 # unsupported kernel, 2016-08
176 __test__ = False
177
178
179class TrustyHWEVTestNetworkMtu(relbase.trusty_hwe_v, TrustyTestNetworkMtu):
180 # unsupported kernel, 2016-08
181 __test__ = False
182
183
184class TrustyHWEWTestNetworkMtu(relbase.trusty_hwe_w, TrustyTestNetworkMtu):
185 # unsupported kernel, 2016-08
186 __test__ = False
187
188
189class TrustyHWEXTestNetworkMtu(relbase.trusty_hwe_x, TrustyTestNetworkMtu):
190 __test__ = True
191
192
193class TestNetworkMtu(relbase.xenial, TestNetworkMtuAbs):164class TestNetworkMtu(relbase.xenial, TestNetworkMtuAbs):
194 __test__ = True165 __test__ = True
195166
196167
197@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-05-02")168@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
198class BionicTestNetworkMtu(relbase.bionic, TestNetworkMtuAbs):169class BionicTestNetworkMtu(relbase.bionic, TestNetworkMtuAbs):
199 __test__ = True170 __test__ = True
200171
201172
202@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-05-02")173@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
203class CosmicTestNetworkMtu(relbase.cosmic, TestNetworkMtuAbs):174class CosmicTestNetworkMtu(relbase.cosmic, TestNetworkMtuAbs):
204 __test__ = True175 __test__ = True
205176
206177
207@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-05-02")178@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
208class DiscoTestNetworkMtu(relbase.disco, TestNetworkMtuAbs):179class DiscoTestNetworkMtu(relbase.disco, TestNetworkMtuAbs):
209 __test__ = True180 __test__ = True
210181
211182
183@TestNetworkMtuAbs.skip_by_date("1671951", fixby="2019-10-02")
184class EoanTestNetworkMtu(relbase.eoan, TestNetworkMtuAbs):
185 __test__ = True
186
187
212class Centos66TestNetworkMtu(centos_relbase.centos66_xenial,188class Centos66TestNetworkMtu(centos_relbase.centos66_xenial,
213 CentosTestNetworkMtuAbs):189 CentosTestNetworkMtuAbs):
214 __test__ = True190 __test__ = True
diff --git a/tests/vmtests/test_network_static.py b/tests/vmtests/test_network_static.py
index 6820c33..9706a2d 100644
--- a/tests/vmtests/test_network_static.py
+++ b/tests/vmtests/test_network_static.py
@@ -20,33 +20,6 @@ class CentosTestNetworkStaticAbs(TestNetworkStaticAbs):
20 pass20 pass
2121
2222
23class TrustyTestNetworkStatic(relbase.trusty, TestNetworkStaticAbs):
24 __test__ = True
25
26
27class TrustyHWEUTestNetworkStatic(relbase.trusty_hwe_u,
28 TrustyTestNetworkStatic):
29 # Working, off by default to safe test suite runtime, covered by bonding
30 __test__ = False
31
32
33class TrustyHWEVTestNetworkStatic(relbase.trusty_hwe_v,
34 TrustyTestNetworkStatic):
35 # Working, off by default to safe test suite runtime, covered by bonding
36 __test__ = False
37
38
39class TrustyHWEWTestNetworkStatic(relbase.trusty_hwe_w,
40 TrustyTestNetworkStatic):
41 # Working, off by default to safe test suite runtime, covered by bonding
42 __test__ = False
43
44
45class TrustyHWEXTestNetworkStatic(relbase.trusty_hwe_x,
46 TrustyTestNetworkStatic):
47 __test__ = True
48
49
50class XenialTestNetworkStatic(relbase.xenial, TestNetworkStaticAbs):23class XenialTestNetworkStatic(relbase.xenial, TestNetworkStaticAbs):
51 __test__ = True24 __test__ = True
5225
@@ -63,6 +36,10 @@ class DiscoTestNetworkStatic(relbase.disco, TestNetworkStaticAbs):
63 __test__ = True36 __test__ = True
6437
6538
39class EoanTestNetworkStatic(relbase.eoan, TestNetworkStaticAbs):
40 __test__ = True
41
42
66class Centos66TestNetworkStatic(centos_relbase.centos66_xenial,43class Centos66TestNetworkStatic(centos_relbase.centos66_xenial,
67 CentosTestNetworkStaticAbs):44 CentosTestNetworkStaticAbs):
68 __test__ = True45 __test__ = True
diff --git a/tests/vmtests/test_network_static_routes.py b/tests/vmtests/test_network_static_routes.py
index 405a730..b441bc9 100644
--- a/tests/vmtests/test_network_static_routes.py
+++ b/tests/vmtests/test_network_static_routes.py
@@ -18,32 +18,6 @@ class CentosTestNetworkStaticRoutesAbs(CentosTestNetworkBasicAbs):
18 conf_file = "examples/tests/network_static_routes.yaml"18 conf_file = "examples/tests/network_static_routes.yaml"
1919
2020
21class TrustyTestNetworkStaticRoutes(relbase.trusty,
22 TestNetworkStaticRoutesAbs):
23 __test__ = True
24
25
26class TrustyHWEUTestNetworkStaticRoutes(relbase.trusty_hwe_u,
27 TrustyTestNetworkStaticRoutes):
28 # Working, off by default to save test suite runtime, covered by
29 # TrustyTestNetworkStaticRoutes
30 __test__ = False
31
32
33class TrustyHWEVTestNetworkStaticRoutes(relbase.trusty_hwe_v,
34 TrustyTestNetworkStaticRoutes):
35 # Working, off by default to save test suite runtime, covered by
36 # TrustyTestNetworkStaticRoutes
37 __test__ = False
38
39
40class TrustyHWEWTestNetworkStaticRoutes(relbase.trusty_hwe_w,
41 TrustyTestNetworkStaticRoutes):
42 # Working, off by default to save test suite runtime, covered by
43 # TrustyTestNetworkStaticRoutes
44 __test__ = False
45
46
47class XenialTestNetworkStaticRoutes(relbase.xenial,21class XenialTestNetworkStaticRoutes(relbase.xenial,
48 TestNetworkStaticRoutesAbs):22 TestNetworkStaticRoutesAbs):
49 __test__ = True23 __test__ = True
@@ -64,6 +38,11 @@ class DiscoTestNetworkStaticRoutes(relbase.disco,
64 __test__ = True38 __test__ = True
6539
6640
41class EoanTestNetworkStaticRoutes(relbase.eoan,
42 TestNetworkStaticRoutesAbs):
43 __test__ = True
44
45
67class Centos66TestNetworkStaticRoutes(centos_relbase.centos66_xenial,46class Centos66TestNetworkStaticRoutes(centos_relbase.centos66_xenial,
68 CentosTestNetworkStaticRoutesAbs):47 CentosTestNetworkStaticRoutesAbs):
69 __test__ = False48 __test__ = False
diff --git a/tests/vmtests/test_network_vlan.py b/tests/vmtests/test_network_vlan.py
index 904f8c2..88e3d35 100644
--- a/tests/vmtests/test_network_vlan.py
+++ b/tests/vmtests/test_network_vlan.py
@@ -68,14 +68,6 @@ class CentosTestNetworkVlanAbs(TestNetworkVlanAbs):
68 pass68 pass
6969
7070
71class TrustyTestNetworkVlan(relbase.trusty, TestNetworkVlanAbs):
72 __test__ = True
73
74
75class TrustyHWEXTestNetworkVlan(relbase.trusty_hwe_x, TestNetworkVlanAbs):
76 __test__ = True
77
78
79class XenialTestNetworkVlan(relbase.xenial, TestNetworkVlanAbs):71class XenialTestNetworkVlan(relbase.xenial, TestNetworkVlanAbs):
80 __test__ = True72 __test__ = True
8173
@@ -92,6 +84,10 @@ class DiscoTestNetworkVlan(relbase.disco, TestNetworkVlanAbs):
92 __test__ = True84 __test__ = True
9385
9486
87class EoanTestNetworkVlan(relbase.eoan, TestNetworkVlanAbs):
88 __test__ = True
89
90
95class Centos66TestNetworkVlan(centos_relbase.centos66_xenial,91class Centos66TestNetworkVlan(centos_relbase.centos66_xenial,
96 CentosTestNetworkVlanAbs):92 CentosTestNetworkVlanAbs):
97 __test__ = True93 __test__ = True
diff --git a/tests/vmtests/test_nvme.py b/tests/vmtests/test_nvme.py
index 60d9d86..730057e 100644
--- a/tests/vmtests/test_nvme.py
+++ b/tests/vmtests/test_nvme.py
@@ -57,14 +57,6 @@ class Centos70TestNvme(centos70_xenial, TestNvmeAbs):
57 __test__ = True57 __test__ = True
5858
5959
60class TrustyTestNvme(relbase.trusty, TestNvmeAbs):
61 __test__ = True
62
63
64class TrustyHWEXTestNvme(relbase.trusty_hwe_x, TestNvmeAbs):
65 __test__ = True
66
67
68class XenialGATestNvme(relbase.xenial_ga, TestNvmeAbs):60class XenialGATestNvme(relbase.xenial_ga, TestNvmeAbs):
69 __test__ = True61 __test__ = True
7062
@@ -85,7 +77,11 @@ class CosmicTestNvme(relbase.cosmic, TestNvmeAbs):
85 __test__ = True77 __test__ = True
8678
8779
88class DiscoTestNvme(relbase.cosmic, TestNvmeAbs):80class DiscoTestNvme(relbase.disco, TestNvmeAbs):
81 __test__ = True
82
83
84class EoanTestNvme(relbase.eoan, TestNvmeAbs):
89 __test__ = True85 __test__ = True
9086
9187
@@ -158,4 +154,8 @@ class CosmicTestNvmeBcache(relbase.cosmic, TestNvmeBcacheAbs):
158class DiscoTestNvmeBcache(relbase.disco, TestNvmeBcacheAbs):154class DiscoTestNvmeBcache(relbase.disco, TestNvmeBcacheAbs):
159 __test__ = True155 __test__ = True
160156
157
158class EoanTestNvmeBcache(relbase.eoan, TestNvmeBcacheAbs):
159 __test__ = True
160
161# vi: ts=4 expandtab syntax=python161# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_old_apt_features.py b/tests/vmtests/test_old_apt_features.py
index ec3765c..a114bf4 100644
--- a/tests/vmtests/test_old_apt_features.py
+++ b/tests/vmtests/test_old_apt_features.py
@@ -5,12 +5,13 @@
5"""5"""
6import re6import re
7import textwrap7import textwrap
8import yaml8
99
10from . import VMBaseClass10from . import VMBaseClass
11from .releases import base_vm_classes as relbase11from .releases import base_vm_classes as relbase
1212
13from curtin import util13from curtin import util
14from curtin.config import load_config
1415
1516
16def sources_to_dict(lines):17def sources_to_dict(lines):
@@ -75,7 +76,7 @@ class TestOldAptAbs(VMBaseClass):
75 # For earlier than xenial 'apt_preserve_sources_list' is expected76 # For earlier than xenial 'apt_preserve_sources_list' is expected
76 self.assertEqual(77 self.assertEqual(
77 {'apt': {'preserve_sources_list': True}},78 {'apt': {'preserve_sources_list': True}},
78 yaml.load(self.load_collect_file("curtin-preserve-sources.cfg")))79 load_config(self.collect_path("curtin-preserve-sources.cfg")))
7980
80 def test_debconf(self):81 def test_debconf(self):
81 """test_debconf - Check if debconf is in place"""82 """test_debconf - Check if debconf is in place"""
diff --git a/tests/vmtests/test_pollinate_useragent.py b/tests/vmtests/test_pollinate_useragent.py
index c1c6c36..d9d9d9d 100644
--- a/tests/vmtests/test_pollinate_useragent.py
+++ b/tests/vmtests/test_pollinate_useragent.py
@@ -53,10 +53,6 @@ class TestPollinateUserAgent(VMBaseClass):
53 self.assertEqual(ua_val, hit.group())53 self.assertEqual(ua_val, hit.group())
5454
5555
56class TrustyTestPollinateUserAgent(relbase.trusty, TestPollinateUserAgent):
57 __test__ = True
58
59
60class XenialTestPollinateUserAgent(relbase.xenial, TestPollinateUserAgent):56class XenialTestPollinateUserAgent(relbase.xenial, TestPollinateUserAgent):
61 __test__ = True57 __test__ = True
6258
@@ -72,4 +68,8 @@ class CosmicTestPollinateUserAgent(relbase.cosmic, TestPollinateUserAgent):
72class DiscoTestPollinateUserAgent(relbase.disco, TestPollinateUserAgent):68class DiscoTestPollinateUserAgent(relbase.disco, TestPollinateUserAgent):
73 __test__ = True69 __test__ = True
7470
71
72class EoanTestPollinateUserAgent(relbase.eoan, TestPollinateUserAgent):
73 __test__ = True
74
75# vi: ts=4 expandtab syntax=python75# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_raid5_bcache.py b/tests/vmtests/test_raid5_bcache.py
index 347b607..67a794d 100644
--- a/tests/vmtests/test_raid5_bcache.py
+++ b/tests/vmtests/test_raid5_bcache.py
@@ -67,27 +67,6 @@ class TestMdadmBcacheAbs(TestMdadmAbs):
67 self.check_file_regex("bcache_cache_mode", r"\[writeback\]")67 self.check_file_regex("bcache_cache_mode", r"\[writeback\]")
6868
6969
70@VMBaseClass.skip_by_date("1820754", fixby="2020-03-18", install=False)
71class TrustyTestRaid5Bcache(relbase.trusty, TestMdadmBcacheAbs):
72 __test__ = True
73
74
75class TrustyHWEUTestRaid5Bcache(relbase.trusty_hwe_u, TrustyTestRaid5Bcache):
76 __test__ = False
77
78
79class TrustyHWEVTestRaid5Bcache(relbase.trusty_hwe_v, TrustyTestRaid5Bcache):
80 __test__ = False
81
82
83class TrustyHWEWTestRaid5Bcache(relbase.trusty_hwe_w, TrustyTestRaid5Bcache):
84 __test__ = False
85
86
87class TrustyHWEXTestRaid5Bcache(relbase.trusty_hwe_x, TrustyTestRaid5Bcache):
88 __test__ = True
89
90
91class XenialGATestRaid5Bcache(relbase.xenial_ga, TestMdadmBcacheAbs):70class XenialGATestRaid5Bcache(relbase.xenial_ga, TestMdadmBcacheAbs):
92 __test__ = True71 __test__ = True
9372
@@ -111,4 +90,8 @@ class CosmicTestRaid5Bcache(relbase.cosmic, TestMdadmBcacheAbs):
111class DiscoTestRaid5Bcache(relbase.disco, TestMdadmBcacheAbs):90class DiscoTestRaid5Bcache(relbase.disco, TestMdadmBcacheAbs):
112 __test__ = True91 __test__ = True
11392
93
94class EoanTestRaid5Bcache(relbase.eoan, TestMdadmBcacheAbs):
95 __test__ = True
96
114# vi: ts=4 expandtab syntax=python97# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_simple.py b/tests/vmtests/test_simple.py
index 625f841..bfac4e9 100644
--- a/tests/vmtests/test_simple.py
+++ b/tests/vmtests/test_simple.py
@@ -4,6 +4,7 @@ from . import VMBaseClass
4from .releases import base_vm_classes as relbase4from .releases import base_vm_classes as relbase
5from .releases import centos_base_vm_classes as centos_relbase5from .releases import centos_base_vm_classes as centos_relbase
66
7import os
7import textwrap8import textwrap
89
910
@@ -24,10 +25,6 @@ class Centos70TestSimple(centos_relbase.centos70_xenial, TestSimple):
24 __test__ = True25 __test__ = True
2526
2627
27class TrustyTestSimple(relbase.trusty, TestSimple):
28 __test__ = True
29
30
31class XenialTestSimple(relbase.xenial, TestSimple):28class XenialTestSimple(relbase.xenial, TestSimple):
32 __test__ = True29 __test__ = True
3330
@@ -53,6 +50,13 @@ class DiscoTestSimple(relbase.disco, TestSimple):
53 self.output_files_exist(["netplan.yaml"])50 self.output_files_exist(["netplan.yaml"])
5451
5552
53class EoanTestSimple(relbase.eoan, TestSimple):
54 __test__ = True
55
56 def test_output_files_exist(self):
57 self.output_files_exist(["netplan.yaml"])
58
59
56class TestSimpleStorage(VMBaseClass):60class TestSimpleStorage(VMBaseClass):
57 """ Test curtin runs clear-holders when mode=simple with storage cfg. """61 """ Test curtin runs clear-holders when mode=simple with storage cfg. """
58 conf_file = "examples/tests/simple-storage.yaml"62 conf_file = "examples/tests/simple-storage.yaml"
@@ -109,4 +113,36 @@ class DiscoTestSimpleStorage(relbase.disco, TestSimpleStorage):
109 self.output_files_exist(["netplan.yaml"])113 self.output_files_exist(["netplan.yaml"])
110114
111115
116class EoanTestSimpleStorage(relbase.eoan, TestSimpleStorage):
117 __test__ = True
118
119 def test_output_files_exist(self):
120 self.output_files_exist(["netplan.yaml"])
121
122
123class TestGrubNoDefaults(VMBaseClass):
124 """ Test that curtin does not emit any grub configuration files. """
125 conf_file = "examples/tests/no-grub-file.yaml"
126 extra_disks = []
127 extra_nics = []
128 extra_collect_scripts = [textwrap.dedent("""
129 cd OUTPUT_COLLECT_D
130 cp /etc/netplan/50-cloud-init.yaml netplan.yaml
131
132 exit 0
133 """)]
134
135 def test_no_grub_file_created(self):
136 """ Curtin did not write a grub configuration file. """
137 grub_d_path = self.collect_path('etc_default_grub_d')
138 grub_d_files = os.listdir(grub_d_path)
139 self.assertNotIn('50-curtin-settings.cfg', grub_d_files)
140
141
142class DiscoTestGrubNoDefaults(relbase.disco, TestGrubNoDefaults):
143 __test__ = True
144
145 def test_output_files_exist(self):
146 self.output_files_exist(["netplan.yaml"])
147
112# vi: ts=4 expandtab syntax=python148# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_uefi_basic.py b/tests/vmtests/test_uefi_basic.py
index f210e7e..51696c2 100644
--- a/tests/vmtests/test_uefi_basic.py
+++ b/tests/vmtests/test_uefi_basic.py
@@ -89,14 +89,6 @@ class PreciseHWETUefiTestBasic(relbase.precise_hwe_t, PreciseUefiTestBasic):
89 __test__ = False89 __test__ = False
9090
9191
92class TrustyUefiTestBasic(relbase.trusty, TestBasicAbs):
93 __test__ = True
94
95
96class TrustyHWEXUefiTestBasic(relbase.trusty_hwe_x, TestBasicAbs):
97 __test__ = True
98
99
100class XenialGAUefiTestBasic(relbase.xenial_ga, TestBasicAbs):92class XenialGAUefiTestBasic(relbase.xenial_ga, TestBasicAbs):
101 __test__ = True93 __test__ = True
10294
@@ -121,17 +113,11 @@ class DiscoUefiTestBasic(relbase.disco, TestBasicAbs):
121 __test__ = True113 __test__ = True
122114
123115
124class Centos70UefiTestBasic4k(centos_relbase.centos70_xenial, TestBasicAbs):116class EoanUefiTestBasic(relbase.eoan, TestBasicAbs):
125 __test__ = True117 __test__ = True
126 disk_block_size = 4096
127118
128119
129class TrustyUefiTestBasic4k(relbase.trusty, TestBasicAbs):120class Centos70UefiTestBasic4k(centos_relbase.centos70_xenial, TestBasicAbs):
130 __test__ = True
131 disk_block_size = 4096
132
133
134class TrustyHWEXUefiTestBasic4k(relbase.trusty_hwe_x, TestBasicAbs):
135 __test__ = True121 __test__ = True
136 disk_block_size = 4096122 disk_block_size = 4096
137123
@@ -155,4 +141,9 @@ class DiscoUefiTestBasic4k(relbase.disco, TestBasicAbs):
155 __test__ = True141 __test__ = True
156 disk_block_size = 4096142 disk_block_size = 4096
157143
144
145class EoanUefiTestBasic4k(relbase.eoan, TestBasicAbs):
146 __test__ = True
147 disk_block_size = 4096
148
158# vi: ts=4 expandtab syntax=python149# vi: ts=4 expandtab syntax=python
diff --git a/tests/vmtests/test_vmtests.py b/tests/vmtests/test_vmtests.py
index 44cd8dc..5e395f0 100644
--- a/tests/vmtests/test_vmtests.py
+++ b/tests/vmtests/test_vmtests.py
@@ -17,7 +17,7 @@ class PsuedoBase(PsuedoVMBaseClass):
17 pass17 pass
1818
1919
20class PsuedoTestAllPass(relbase.trusty, PsuedoBase):20class PsuedoTestAllPass(relbase.bionic, PsuedoBase):
21 __test__ = True21 __test__ = True
22 # These boot_results would cause first_boot failure22 # These boot_results would cause first_boot failure
23 # boot_results = {23 # boot_results = {
diff --git a/tests/vmtests/test_zfsroot.py b/tests/vmtests/test_zfsroot.py
index 473c9e3..7ab4f96 100644
--- a/tests/vmtests/test_zfsroot.py
+++ b/tests/vmtests/test_zfsroot.py
@@ -94,6 +94,10 @@ class DiscoTestZfsRoot(relbase.disco, TestZfsRootAbs):
94 __test__ = True94 __test__ = True
9595
9696
97class EoanTestZfsRoot(relbase.eoan, TestZfsRootAbs):
98 __test__ = True
99
100
97class TestZfsRootFsTypeAbs(TestZfsRootAbs):101class TestZfsRootFsTypeAbs(TestZfsRootAbs):
98 conf_file = "examples/tests/basic-zfsroot.yaml"102 conf_file = "examples/tests/basic-zfsroot.yaml"
99103
@@ -118,3 +122,7 @@ class CosmicTestZfsRootFsType(relbase.cosmic, TestZfsRootFsTypeAbs):
118122
119class DiscoTestZfsRootFsType(relbase.disco, TestZfsRootFsTypeAbs):123class DiscoTestZfsRootFsType(relbase.disco, TestZfsRootFsTypeAbs):
120 __test__ = True124 __test__ = True
125
126
127class EoanTestZfsRootFsType(relbase.eoan, TestZfsRootFsTypeAbs):
128 __test__ = True
diff --git a/tools/vmtest-system-setup b/tools/vmtest-system-setup
index bc790cb..b9185db 100755
--- a/tools/vmtest-system-setup
+++ b/tools/vmtest-system-setup
@@ -16,6 +16,7 @@ DEPS=(
16 make16 make
17 net-tools17 net-tools
18 python318 python3
19 python3-jsonschema
19 python3-nose20 python3-nose
20 python3-simplestreams21 python3-simplestreams
21 python3-yaml22 python3-yaml
diff --git a/tools/xkvm b/tools/xkvm
index e65bf76..9135ac1 100755
--- a/tools/xkvm
+++ b/tools/xkvm
@@ -429,7 +429,7 @@ main() {
429 bios_opts=( "${_RET[@]}" )429 bios_opts=( "${_RET[@]}" )
430430
431 local out="" fmt="" bus="" unit="" index="" serial="" driver="" devopts=""431 local out="" fmt="" bus="" unit="" index="" serial="" driver="" devopts=""
432 local busorindex="" driveopts="" cur="" val="" file=""432 local busorindex="" driveopts="" cur="" val="" file="" wwn=""
433 for((i=0;i<${#diskdevs[@]};i++)); do433 for((i=0;i<${#diskdevs[@]};i++)); do
434 cur=${diskdevs[$i]}434 cur=${diskdevs[$i]}
435 IFS=","; set -- $cur; IFS="$oifs"435 IFS=","; set -- $cur; IFS="$oifs"
@@ -441,6 +441,7 @@ main() {
441 unit=""441 unit=""
442 index=""442 index=""
443 serial=""443 serial=""
444 wwn=""
444 for tok in "$@"; do445 for tok in "$@"; do
445 [ "${tok#*=}" = "${tok}" -a -f "${tok}" -a -z "$file" ] && file="$tok"446 [ "${tok#*=}" = "${tok}" -a -f "${tok}" -a -z "$file" ] && file="$tok"
446 val=${tok#*=}447 val=${tok#*=}
@@ -454,6 +455,7 @@ main() {
454 file=*) file=$val;;455 file=*) file=$val;;
455 fmt=*|format=*) fmt=$val;;456 fmt=*|format=*) fmt=$val;;
456 serial=*) serial=$val;;457 serial=*) serial=$val;;
458 wwn=*) wwn=$val;;
457 bus=*) bus=$val;;459 bus=*) bus=$val;;
458 unit=*) unit=$val;;460 unit=*) unit=$val;;
459 index=*) index=$val;;461 index=*) index=$val;;
@@ -471,7 +473,12 @@ main() {
471 driver="$def_disk_driver"473 driver="$def_disk_driver"
472 fi474 fi
473 if [ -z "$serial" ]; then475 if [ -z "$serial" ]; then
474 serial="${file##*/}"476 # use filename as serial if not provided a wwn
477 if [ -n "$wwn" ]; then
478 serial="$wwn"
479 else
480 serial="${file##*/}"
481 fi
475 fi482 fi
476483
477 # make sure we add either bus= or index=484 # make sure we add either bus= or index=
diff --git a/tox.ini b/tox.ini
index 8e5faf2..3a8e40e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -50,7 +50,7 @@ commands = {envpython} -m flake8 {posargs:curtin tests/}
50# set basepython because tox 1.6 (trusty) does not support generated environments50# set basepython because tox 1.6 (trusty) does not support generated environments
51basepython = python351basepython = python3
52deps = {[testenv]deps}52deps = {[testenv]deps}
53 pylint==1.8.153 pylint==2.3.1
54 git+https://git.launchpad.net/simplestreams54 git+https://git.launchpad.net/simplestreams
55commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests}55commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests}
5656

Subscribers

People subscribed via source and target branches