Dan Bungert has proposed merging ~dbungert/curtin:23.1-kdump into curtin:master.
Commit message: Introduce the kernel-crash-dumps builtin hook Introduce a new hook for builtin_curthooks to configure kernel crash dumps on the target system. The configuration key is `kernel-crash-dumps` and adds the following new section to the curthooks configuration: kernel-crash-dumps: enabled: bool | None By default, `enabled` is `None` will cause kernel crash dumps to be dynamically enabled on the target system if the enablement script provided by kdump-tools is found in: /usr/share/kdump-tools/kdump_set_default The enablement script will inspect the system and either enable or disable kernel crash dumps. Users can also specify `True` or `False` to unconditionally enable or disable kernel crash dumps, respectively. (cherry picked from commit 40cae5c60fa9f4c495c7f61cde28862175f93ce2) Requested reviews: curtin developers (curtin-dev) For more details, see: https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/473953 -- Your team curtin developers is requested to review the proposed merge of ~dbungert/curtin:23.1-kdump into curtin:master.
diff --git a/curtin/commands/__init__.py b/curtin/commands/__init__.py index 51b91c6..2d784db 100644 --- a/curtin/commands/__init__.py +++ b/curtin/commands/__init__.py @@ -1,5 +1,6 @@ # This file is part of curtin. See LICENSE file for copyright and license info. + class MutuallyExclusiveGroup: def __init__(self, entries) -> None: self.entries = entries diff --git a/curtin/commands/block_meta.py b/curtin/commands/block_meta.py index 7506c4a..918bd79 100644 --- a/curtin/commands/block_meta.py +++ b/curtin/commands/block_meta.py @@ -1,7 +1,11 @@ # This file is part of curtin. See LICENSE file for copyright and license info. from collections import OrderedDict, namedtuple +<<<<<<< curtin/commands/block_meta.py from curtin import (block, compat, config, paths, storage_actions, util) +======= +from curtin import (block, compat, config, paths, util) +>>>>>>> curtin/commands/block_meta.py from curtin.block import schemas from curtin.block import (bcache, clear_holders, dasd, iscsi, lvm, mdadm, mkfs, multipath, zfs) @@ -674,10 +678,16 @@ class Device: def image_handler(info, storage_config, context): +<<<<<<< curtin/commands/block_meta.py image: Image = storage_actions.asobject(info) path = image.path size = image.size if image.preserve: +======= + path = info['path'] + size = int(util.human2bytes(info['size'])) + if info.get('preserve', False): +>>>>>>> curtin/commands/block_meta.py actual_size = os.stat(path).st_size if size != actual_size: raise RuntimeError( @@ -695,7 +705,11 @@ def image_handler(info, storage_config, context): raise cmd = ['losetup', '--show', '--find', path] +<<<<<<< curtin/commands/block_meta.py sector_size = image.sector_size +======= + sector_size = int(util.human2bytes(info.get('sector_size', 512))) +>>>>>>> curtin/commands/block_meta.py if sector_size != 512: compat.supports_large_sectors(fatal=True) cmd.extend(('--sector-size', str(sector_size))) diff --git a/curtin/commands/block_meta_v2.py b/curtin/commands/block_meta_v2.py index 946751a..c8a2ad9 100644 --- a/curtin/commands/block_meta_v2.py +++ b/curtin/commands/block_meta_v2.py @@ -1,10 +1,6 @@ # This file is part of curtin. See LICENSE file for copyright and license info. import os -from typing import ( - List, - Optional, - ) import attr @@ -27,6 +23,7 @@ from curtin.storage_config import ( from curtin.udev import udevadm_settle +<<<<<<< curtin/commands/block_meta_v2.py def to_utf8_hex_notation(string: str) -> str: ''' Convert a string into a valid ASCII string where all characters outside the alphanumerical range (according to bytes.isalnum()) are translated to @@ -45,20 +42,23 @@ def to_utf8_hex_notation(string: str) -> str: @attr.s(auto_attribs=True) +======= +@attr.s() +>>>>>>> curtin/commands/block_meta_v2.py class PartTableEntry: # The order listed here matches the order sfdisk represents these fields # when using the --dump argument. - number: int - start: int - size: int - type: str - uuid: Optional[str] + number = attr.ib(default=None) + start = attr.ib(default=None) + size = attr.ib(default=None) + type = attr.ib(default=None) + uuid = attr.ib(default=None) # name here is the sfdisk term - quoted descriptive text of the partition - # not to be confused with what make_dname() does. # Offered in the partition command as 'partition_name'. - name: Optional[str] - attrs: Optional[List[str]] - bootable: bool = False + name = attr.ib(default=None) + attrs = attr.ib(default=None) + bootable = attr.ib(default=False) def render(self): r = '{}: '.format(self.number) @@ -149,8 +149,8 @@ class SFDiskPartTable: self._sector_bytes = sector_bytes if ONE_MIB_BYTES % sector_bytes != 0: raise Exception( - f"sector_bytes {sector_bytes} does not divide 1MiB, cannot " - "continue!") + "sector_bytes {} does not divide 1MiB, cannot " + "continue!".format(sector_bytes)) self.one_mib_sectors = ONE_MIB_BYTES // sector_bytes def bytes2sectors(self, amount): diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py index 4bc3614..2cb83ea 100644 --- a/curtin/commands/curthooks.py +++ b/curtin/commands/curthooks.py @@ -1564,6 +1564,7 @@ def configure_mdadm(cfg, state_etcd, target, osfamily=DISTROS.debian): data=None, target=target) +<<<<<<< curtin/commands/curthooks.py def configure_nvme_over_tcp(cfg, target: pathlib.Path) -> None: """If any NVMe controller using the TCP transport is present in the storage configuration, create a nvme-stas configuration and configure the initramfs @@ -1614,6 +1615,8 @@ Pin-Priority: -1 nvme_tcp.configure_nvme_stas(cfg, target) +======= +>>>>>>> curtin/commands/curthooks.py def configure_kernel_crash_dumps(cfg, target: pathlib.Path) -> None: """Configure kernel crash dumps on target system. diff --git a/curtin/commands/install.py b/curtin/commands/install.py index 9fb4116..f57ad23 100644 --- a/curtin/commands/install.py +++ b/curtin/commands/install.py @@ -112,16 +112,16 @@ def writeline(fname, output): pass -@attr.s(auto_attribs=True) +@attr.s() class WorkingDir: - target: str - top: str - scratch: str - interfaces: str - netconf: str - netstate: str - fstab: str - config_file: str + target = attr.ib() + top = attr.ib() + scratch = attr.ib() + interfaces = attr.ib() + netconf = attr.ib() + netstate = attr.ib() + fstab = attr.ib() + config_file = attr.ib() @classmethod def import_existing(cls, config): diff --git a/curtin/util.py b/curtin/util.py index a10f1bf..a452ede 100644 --- a/curtin/util.py +++ b/curtin/util.py @@ -1421,6 +1421,7 @@ def not_exclusive_retry(fun, *args, **kwargs): time.sleep(1) return fun(*args, **kwargs) +<<<<<<< curtin/util.py class FlockEx: """Acquire an exclusive lock on device. @@ -1458,4 +1459,6 @@ class FlockEx: with suppress(Exception): os.close(self.lock_fd) +======= +>>>>>>> curtin/util.py # vi: ts=4 expandtab syntax=python diff --git a/doc/topics/config.rst b/doc/topics/config.rst index 4fbcc5a..cbaa751 100644 --- a/doc/topics/config.rst +++ b/doc/topics/config.rst @@ -470,11 +470,14 @@ directive may be ignored. package: linux-image-generic-hwe-24.04 remove: existing +<<<<<<< doc/topics/config.rst # install hwe kernel, remove generic kernel kernel: package: linux-image-generic-hwe-24.04 remove: ["linux-generic"] +======= +>>>>>>> doc/topics/config.rst kernel-crash-dumps ~~~~~~~~~~~~~~~~~~ Configure how Curtin will configure kernel crash dumps in the target system diff --git a/tests/integration/test_block_meta.py b/tests/integration/test_block_meta.py index c8113b3..6d64cd4 100644 --- a/tests/integration/test_block_meta.py +++ b/tests/integration/test_block_meta.py @@ -1,19 +1,28 @@ # This file is part of curtin. See LICENSE file for copyright and license info. -import dataclasses -from dataclasses import dataclass import contextlib import json import os +<<<<<<< tests/integration/test_block_meta.py from parameterized import parameterized from pathlib import Path +======= +>>>>>>> tests/integration/test_block_meta.py import re import stat import sys +<<<<<<< tests/integration/test_block_meta.py from typing import Optional from unittest import skipIf import yaml +======= +from unittest import skipIf +import yaml + +import attr + +>>>>>>> tests/integration/test_block_meta.py from curtin import block, compat, distro, log, udev, util from curtin.commands.block_meta import _get_volume_fstype from curtin.commands.block_meta_v2 import ONE_MIB_BYTES @@ -40,22 +49,25 @@ def loop_dev(image, sector_size=512): util.subp(['losetup', '--detach', dev]) -@dataclass(order=True) +@attr.s(init=True, cmp=False) class PartData: - number: Optional[int] = None - offset: Optional[int] = None - size: Optional[int] = None - boot: Optional[bool] = None - partition_type: Optional[str] = None + number = attr.ib(default=None) + offset = attr.ib(default=None) + size = attr.ib(default=None) + boot = attr.ib(default=None) + partition_type = attr.ib(default=None) # test cases may initialize the values they care about # test utilities shall initialize all fields def assertFieldsAreNotNone(self): - for field in dataclasses.fields(self): + for field in attr.fields(self.__class__): assert getattr(self, field.name) is not None + def __lt__(self, other): + return self.number < other.number + def __eq__(self, other): - for field in dataclasses.fields(self): + for field in attr.fields(self.__class__): myval = getattr(self, field.name) otherval = getattr(other, field.name) if myval is not None and otherval is not None \ @@ -66,7 +78,7 @@ class PartData: def _get_ext_size(dev, part_action): num = part_action['number'] - cmd = ['dumpe2fs', '-h', f'{dev}p{num}'] + cmd = ['dumpe2fs', '-h', '{}p{}'.format(dev, num)] out = util.subp(cmd, capture=True)[0] for line in out.splitlines(): if line.startswith('Block count'): @@ -81,7 +93,7 @@ def _get_ntfs_size(dev, part_action): cmd = ['ntfsresize', '--no-action', '--force', # needed post-resize, which otherwise demands a CHKDSK - '--info', f'{dev}p{num}'] + '--info', '{}p{}'.format(dev, num)] out = util.subp(cmd, capture=True)[0] # Sample input: # Current volume size: 41939456 bytes (42 MB) @@ -103,7 +115,7 @@ _get_fs_sizers = { def _get_filesystem_size(dev, part_action, fstype='ext4'): if fstype not in _get_fs_sizers.keys(): - raise Exception(f'_get_filesystem_size: no support for {fstype}') + raise Exception('_get_filesystem_size: no support for %s' % fstype) return _get_fs_sizers[fstype](dev, part_action) @@ -126,7 +138,7 @@ def summarize_partitions(dev): (unused, s_number, s_offset, s_size) = [ entry for entry in sysfs_data if '/dev/' + entry[0] == node][0] - assert node.startswith(f'{dev}p') + assert node.startswith(dev + 'p') number = int(node[len(dev) + 1:]) ptype = part['type'] offset = part['start'] * sectorsize @@ -217,13 +229,13 @@ class TestBlockMeta(IntegrationTestCase): def mount(self, dev, partition_cfg): mnt_point = self.tmp_dir() num = partition_cfg['number'] - with util.mount(f'{dev}p{num}', mnt_point): + with util.mount('{}p{}'.format(dev, num), mnt_point): yield mnt_point @contextlib.contextmanager def open_file_on_part(self, dev, part_action, mode): with self.mount(dev, part_action) as mnt_point: - with open(f'{mnt_point}/data.txt', mode) as fp: + with open(mnt_point + '/data.txt', mode) as fp: yield fp def create_data(self, dev, part_action): @@ -243,7 +255,7 @@ class TestBlockMeta(IntegrationTestCase): tolerance = 512 * 10 actual_fssize = _get_filesystem_size(dev, part_action, fstype) diff = expected - actual_fssize - self.assertTrue(0 <= diff <= tolerance, f'difference of {diff}') + self.assertTrue(0 <= diff <= tolerance, 'difference of ' + str(diff)) def run_bm(self, config, *args, **kwargs): config_path = self.tmp_path('config.yaml') @@ -615,7 +627,7 @@ class TestBlockMeta(IntegrationTestCase): } with loop_dev(img) as dev: try: - self.run_bm(curtin_cfg, f'--devices={dev}', env=cmd_env) + self.run_bm(curtin_cfg, '--devices=' + dev, env=cmd_env) finally: util.subp(['umount', mnt_point]) udev.udevadm_settle() @@ -635,7 +647,7 @@ class TestBlockMeta(IntegrationTestCase): fstype=fstype) self.run_bm(config.render()) with loop_dev(img) as dev: - self.assertEqual(fstype, _get_volume_fstype(f'{dev}p1')) + self.assertEqual(fstype, _get_volume_fstype(dev + 'p1')) self.create_data(dev, p1) self.assertEqual( summarize_partitions(dev), [ @@ -664,7 +676,11 @@ class TestBlockMeta(IntegrationTestCase): p1['size'] = size self.run_bm(config.render()) with loop_dev(img) as dev: +<<<<<<< tests/integration/test_block_meta.py self.assertEqual('ntfs', _get_volume_fstype(f'{dev}p1')) +======= + self.assertEqual('ntfs', _get_volume_fstype(dev + 'p1')) +>>>>>>> tests/integration/test_block_meta.py self.create_data(dev, p1) self.assertEqual( summarize_partitions(dev), [ @@ -972,11 +988,11 @@ class TestBlockMeta(IntegrationTestCase): with self.mount(dev, p1) as mnt_point: # Attempt to create files across the partition with gaps for i in range(1, 41): - with open(f'{mnt_point}/{str(i)}', 'wb') as fp: + with open('{}/{}'.format(mnt_point, i), 'wb') as fp: fp.write(bytes([i]) * (2 << 20)) for i in range(1, 41): if i % 5 != 0: - os.remove(f'{mnt_point}/{str(i)}') + os.remove('{}/{}'.format(mnt_point, i)) config = StorageConfigBuilder(version=2) config.add_image(path=img, size='100M', ptable='gpt') @@ -994,7 +1010,7 @@ class TestBlockMeta(IntegrationTestCase): ]) with self.mount(dev, p1) as mnt_point: for i in range(5, 41, 5): - with open(f'{mnt_point}/{i}', 'rb') as fp: + with open('{}/{}'.format(mnt_point, i), 'rb') as fp: self.assertEqual(bytes([i]) * (2 << 20), fp.read()) def test_parttype_dos(self): @@ -1056,8 +1072,7 @@ class TestBlockMeta(IntegrationTestCase): PartData(number=4, offset=80 << 20, size=19 << 20, partition_type=winre)) - @parameterized.expand([('msdos',), ('gpt',)]) - def test_disk_label_id_persistent(self, ptable): + def _test_disk_label_id_persistent(self, ptable): # when the disk is preserved, the disk label id shall also be preserved self.img = self.tmp_path('image.img') config = StorageConfigBuilder(version=2) @@ -1076,6 +1091,12 @@ class TestBlockMeta(IntegrationTestCase): with loop_dev(self.img) as dev: self.assertEqual(orig_label_id, _get_disk_label_id(dev)) + def test_disk_label_id_persistent_msdos(self): + self._test_disk_label_id_persistent('msdos') + + def test_disk_label_id_persistent_gpt(self): + self._test_disk_label_id_persistent('gpt') + def test_gpt_uuid_persistent(self): # A persistent partition with an unspecified uuid shall keep the uuid self.img = self.tmp_path('image.img') @@ -1112,12 +1133,16 @@ class TestBlockMeta(IntegrationTestCase): actual_name = sfdisk_info['partitions'][0]['name'] self.assertEqual(name, actual_name) +<<<<<<< tests/integration/test_block_meta.py @parameterized.expand([ ('random', CiTestCase.random_string(),), # "écrasé" means "overwritten" ('unicode', "'name' must not be écrasé/덮어쓴!"), ]) def test_gpt_name_persistent(self, title, name): +======= + def _test_gpt_name_persistent(self, title, name): +>>>>>>> tests/integration/test_block_meta.py self.img = self.tmp_path('image.img') config = StorageConfigBuilder(version=2) config.add_image(path=self.img, size='20M', ptable='gpt') @@ -1140,6 +1165,9 @@ class TestBlockMeta(IntegrationTestCase): actual_name = sfdisk_info['partitions'][0]['name'] self.assertEqual(name, actual_name) + def test_gpt_name_persistent_random(self): + self._test_gpt_name_persistent('random', CiTestCase.random_string()) + def test_gpt_set_single_attr(self): self.img = self.tmp_path('image.img') config = StorageConfigBuilder(version=2) @@ -1284,8 +1312,7 @@ table-length: 256'''.encode() self.assertPartitions( PartData(number=1, offset=1 << 20, size=1 << 20)) - @parameterized.expand(((1,), (2,))) - def test_swap(self, sv): + def _test_swap(self, sv): self.img = self.tmp_path('image.img') config = StorageConfigBuilder(version=sv) config.add_image(path=self.img, create=True, size='20M', @@ -1297,6 +1324,7 @@ table-length: 256'''.encode() PartData(number=1, offset=1 << 20, size=1 << 20, boot=False, partition_type='82')) +<<<<<<< tests/integration/test_block_meta.py @parameterized.expand(((1,), (2,))) def test_cryptoswap(self, sv=2): self.img = self.tmp_path('image.img') @@ -1399,3 +1427,10 @@ table-length: 256'''.encode() for run in range(5): self.run_bm(config.render()) self.assertPartitions(*parts) +======= + def test_swap_sv1(self): + self._test_swap(1) + + def test_swap_sv2(self): + self._test_swap(2) +>>>>>>> tests/integration/test_block_meta.py diff --git a/tests/integration/webserv.py b/tests/integration/webserv.py index f4ce4e4..de30e04 100644 --- a/tests/integration/webserv.py +++ b/tests/integration/webserv.py @@ -1,8 +1,10 @@ # This file is part of curtin. See LICENSE file for copyright and license info. -import threading -import socketserver from http.server import SimpleHTTPRequestHandler +import socketserver +import threading +import os + from tests.vmtests.image_sync import IMAGE_DIR @@ -12,7 +14,17 @@ class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): class ImageHTTPRequestHandler(SimpleHTTPRequestHandler): def __init__(self, *args, **kwargs): - super().__init__(*args, directory=IMAGE_DIR, **kwargs) + try: + super().__init__(*args, directory=IMAGE_DIR, **kwargs) + except TypeError: + # SimpleHTTPRequestHandler in python < 3.7 doesn't take a directory + # arg, fake it. + curdir = os.getcwd() + os.chdir(IMAGE_DIR) + try: + super().__init__(*args, **kwargs) + finally: + os.chdir(curdir) class ImageServer: @@ -50,4 +62,4 @@ class ImageServer: if self.server is not None: ip, port = self.server.server_address - return f"http://{ip}:{port}" + return "http://{}:{}".format(ip, port) diff --git a/tests/unittests/test_commands_block_meta.py b/tests/unittests/test_commands_block_meta.py index a5ccac1..c78db59 100644 --- a/tests/unittests/test_commands_block_meta.py +++ b/tests/unittests/test_commands_block_meta.py @@ -3448,10 +3448,10 @@ label: gpt table = block_meta_v2.GPTPartTable(512) table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', partition_type=ptype)) - expected = f'''\ + expected = '''\ label: gpt -1: start=2048 size=18432 type={ptype}''' +1: start=2048 size=18432 type={}'''.format(ptype) self.assertEqual(expected, table.render()) def test_gpt_name(self): @@ -3460,11 +3460,18 @@ label: gpt table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', partition_name=name)) type_id = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" +<<<<<<< tests/unittests/test_commands_block_meta.py to_hex = block_meta_v2.to_utf8_hex_notation expected = f'''\ label: gpt 1: start=2048 size=18432 type={type_id} name="{to_hex(name)}"''' +======= + expected = '''\ +label: gpt + +1: start=2048 size=18432 type={} name="{}"'''.format(type_id, name) +>>>>>>> tests/unittests/test_commands_block_meta.py self.assertEqual(expected, table.render()) def test_gpt_name_free_text(self): @@ -3478,10 +3485,14 @@ label: gpt table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', partition_name=name)) type_id = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - expected = f'''\ + expected = '''\ label: gpt +<<<<<<< tests/unittests/test_commands_block_meta.py 1: start=2048 size=18432 type={type_id} name="{expected_name}"''' +======= +1: start=2048 size=18432 type={} name="{}"'''.format(type_id, name) +>>>>>>> tests/unittests/test_commands_block_meta.py self.assertEqual(expected, table.render()) def test_gpt_attrs_none(self): @@ -3489,10 +3500,10 @@ label: gpt table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', attrs=None)) type_id = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - expected = f'''\ + expected = '''\ label: gpt -1: start=2048 size=18432 type={type_id}''' +1: start=2048 size=18432 type={}'''.format(type_id) self.assertEqual(expected, table.render()) def test_gpt_attrs_empty(self): @@ -3500,10 +3511,10 @@ label: gpt table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', attrs=[])) type_id = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - expected = f'''\ + expected = '''\ label: gpt -1: start=2048 size=18432 type={type_id}''' +1: start=2048 size=18432 type={}'''.format(type_id) self.assertEqual(expected, table.render()) def test_gpt_attrs_required(self): @@ -3511,10 +3522,10 @@ label: gpt table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', attrs=['RequiredPartition'])) type_id = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - expected = f'''\ + expected = '''\ label: gpt -1: start=2048 size=18432 type={type_id} attrs="RequiredPartition"''' +1: start=2048 size=18432 type={} attrs="RequiredPartition"'''.format(type_id) self.assertEqual(expected, table.render()) def test_gpt_attrs_bit(self): @@ -3522,10 +3533,10 @@ label: gpt table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', attrs=['GUID:51'])) type_id = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - expected = f'''\ + expected = '''\ label: gpt -1: start=2048 size=18432 type={type_id} attrs="GUID:51"''' +1: start=2048 size=18432 type={} attrs="GUID:51"'''.format(type_id) self.assertEqual(expected, table.render()) def test_gpt_attrs_multi(self): @@ -3533,10 +3544,11 @@ label: gpt table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', attrs=['RequiredPartition', 'GUID:51'])) type_id = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - expected = f'''\ + attrs = 'RequiredPartition GUID:51' + expected = '''\ label: gpt -1: start=2048 size=18432 type={type_id} attrs="RequiredPartition GUID:51"''' +1: start=2048 size=18432 type={} attrs="{}"'''.format(type_id, attrs) self.assertEqual(expected, table.render()) def test_dos_basic(self): @@ -3560,10 +3572,10 @@ label: dos table = block_meta_v2.DOSPartTable(512) table.add(dict(number=1, offset=1 << 20, size=9 << 20, flag='boot', partition_type=ptype)) - expected = f'''\ + expected = '''\ label: dos -1: start=2048 size=18432 type={ptype} bootable''' +1: start=2048 size=18432 type={} bootable'''.format(ptype) self.assertEqual(expected, table.render()) def test_preserve_labelid_gpt(self): @@ -3659,21 +3671,26 @@ label: dos number=1, start=2, size=3, type='04', bootable=True, uuid=uuid, name='name', attrs=['stuff', 'things']) - expected = f'1: start=2 size=3 type=04 uuid={uuid} ' + \ + expected = '1: start=2 size=3 type=04 uuid={} '.format(uuid) + \ 'name="name" attrs="stuff things" bootable' self.assertEqual(expected, pte.render()) def test_gpt_entry_preserve(self): uuid = str(random_uuid()) name = self.random_string() - attrs = f'{self.random_string()} {self.random_string()}' + attrs = '{} {}'.format(self.random_string(), self.random_string()) pte = block_meta_v2.PartTableEntry( number=1, start=2, size=3, type='04', bootable=False, uuid=None, name=None, attrs=None) pte.preserve({'uuid': uuid, 'name': name, 'attrs': attrs}) +<<<<<<< tests/unittests/test_commands_block_meta.py to_hex = block_meta_v2.to_utf8_hex_notation expected = f'1: start=2 size=3 type=04 uuid={uuid} ' + \ f'name="{to_hex(name)}" attrs="{attrs}"' +======= + expected = '1: start=2 size=3 type=04 uuid={} '.format(uuid) + \ + 'name="{}" attrs="{}"'.format(name, attrs) +>>>>>>> tests/unittests/test_commands_block_meta.py self.assertEqual(expected, pte.render()) def test_v2_dos_is_logical(self): diff --git a/tests/unittests/test_curthooks.py b/tests/unittests/test_curthooks.py index e76eb54..53c7abd 100644 --- a/tests/unittests/test_curthooks.py +++ b/tests/unittests/test_curthooks.py @@ -1101,7 +1101,10 @@ class TestSetupGrub(CiTestCase): variant=self.variant) logs = self.logs.getvalue() print(logs) +<<<<<<< tests/unittests/test_curthooks.py print(self.mock_subp.call_args_list) +======= +>>>>>>> tests/unittests/test_curthooks.py self.assertEqual([], self.mock_subp.call_args_list) self.assertIn("Using fallback UEFI reordering:", logs) self.assertIn("missing 'BootCurrent' value", logs) @@ -1209,7 +1212,10 @@ class TestSetupGrub(CiTestCase): variant=self.variant) logs = self.logs.getvalue() print(logs) +<<<<<<< tests/unittests/test_curthooks.py print(self.mock_subp.call_args_list) +======= +>>>>>>> tests/unittests/test_curthooks.py self.assertEqual([ call(['efibootmgr', '-o', '0001,0000'], target=self.target)], self.mock_subp.call_args_list) @@ -1263,7 +1269,11 @@ class TestSetupGrub(CiTestCase): print(logs) print('Number of bootmgr calls: %s' % self.mock_efibootmgr.call_count) self.assertEqual([ +<<<<<<< tests/unittests/test_curthooks.py call(['efibootmgr', '-o', '%s' % (",".join(final_state.order))], +======= + call(['efibootmgr', '-o', '%s' % (",".join(expected_order))], +>>>>>>> tests/unittests/test_curthooks.py target=self.target)], self.mock_subp.call_args_list) self.assertIn("Using fallback UEFI reordering:", logs) @@ -2604,19 +2614,21 @@ class TestDoAptConfig(CiTestCase): def test_apt_config_dict(self): with patch(self.handle_apt_sym) as m_handle_apt: curthooks.do_apt_config({"apt": {}}, target="/") - m_handle_apt.assert_called() + m_handle_apt.assert_any_call({}, '/') def test_with_apt_config(self): with patch(self.handle_apt_sym) as m_handle_apt: curthooks.do_apt_config( {"apt": {"proxy": {"http_proxy": "http://proxy:3128"}}}, target="/") - m_handle_apt.assert_called_once() + m_handle_apt.assert_any_call( + {'proxy': {'http_proxy': 'http://proxy:3128'}}, '/') def test_with_debconf_selections(self): # debconf_selections are translated to apt config with patch(self.handle_apt_sym) as m_handle_apt: curthooks.do_apt_config({"debconf_selections": "foo"}, target="/") - m_handle_apt.assert_called_once() + m_handle_apt.assert_any_call({'debconf_selections': 'foo'}, '/') + # vi: ts=4 expandtab syntax=python diff --git a/tests/unittests/test_distro.py b/tests/unittests/test_distro.py index 41c3b15..4a09067 100644 --- a/tests/unittests/test_distro.py +++ b/tests/unittests/test_distro.py @@ -311,7 +311,7 @@ class TestAptInstall(CiTestCase): ] distro.run_apt_command('install', ['foobar', 'wark']) - m_apt_update.assert_called_once() + self.assertEqual(1, m_apt_update.call_count) m_apt_install.assert_has_calls(expected_calls) m_subp.assert_called_once_with(['apt-get', 'clean'], target='/') @@ -321,7 +321,7 @@ class TestAptInstall(CiTestCase): # no clean option distro.run_apt_command('install', ['foobar', 'wark'], clean=False) - m_apt_update.assert_called_once() + self.assertEqual(1, m_apt_update.call_count) m_subp.assert_has_calls(expected_calls[:-1]) @mock.patch.object(util.ChrootableTarget, "__enter__", new=lambda a: a) @@ -334,11 +334,11 @@ class TestAptInstall(CiTestCase): ] expected_calls = [ - mock.call(cmd_prefix + ['install', '--download-only'] - + ['foobar', 'wark'], + mock.call(cmd_prefix + + ['install', '--download-only'] + + ['foobar', 'wark'], env=None, target='/', retries=None), - mock.call(cmd_prefix + ['install'] - + ['foobar', 'wark'], + mock.call(cmd_prefix + ['install', 'foobar', 'wark'], env=None, target='/'), ] diff --git a/tests/unittests/test_kernel_crash_dumps.py b/tests/unittests/test_kernel_crash_dumps.py index 54faf0a..381f2af 100644 --- a/tests/unittests/test_kernel_crash_dumps.py +++ b/tests/unittests/test_kernel_crash_dumps.py @@ -96,10 +96,17 @@ class TestKernelCrashDumpsUtilities(CiTestCase): patch( "curtin.distro.get_installed_packages", return_value=["kdump-tools" if preinstalled else ""], +<<<<<<< tests/unittests/test_kernel_crash_dumps.py ), patch("curtin.distro.install_packages") as do_install, ): ensure_kdump_installed(target) +======= + ) + ): + with patch("curtin.distro.install_packages") as do_install: + ensure_kdump_installed(target) +>>>>>>> tests/unittests/test_kernel_crash_dumps.py if preinstalled: do_install.assert_not_called() @@ -109,6 +116,7 @@ class TestKernelCrashDumpsUtilities(CiTestCase): def test_manual_enable(self): """Test manual enablement logic.""" target = Path("/target") +<<<<<<< tests/unittests/test_kernel_crash_dumps.py with ( patch( "curtin.kernel_crash_dumps.ensure_kdump_installed", @@ -119,6 +127,16 @@ class TestKernelCrashDumpsUtilities(CiTestCase): ) as chroot_mock, ): manual_enable(target) +======= + with patch( + "curtin.kernel_crash_dumps.ensure_kdump_installed", + ) as ensure_mock: + with patch( + "curtin.kernel_crash_dumps.ChrootableTarget", + new=MagicMock(), + ) as chroot_mock: + manual_enable(target) +>>>>>>> tests/unittests/test_kernel_crash_dumps.py ensure_mock.assert_called_once() subp_mock = chroot_mock.return_value.__enter__.return_value.subp subp_mock.assert_called_with( @@ -134,6 +152,7 @@ class TestKernelCrashDumpsUtilities(CiTestCase): def test_manual_disable(self, preinstalled): """Test manual disable logic.""" target = Path("/target") +<<<<<<< tests/unittests/test_kernel_crash_dumps.py with ( patch( "curtin.distro.get_installed_packages", @@ -145,6 +164,17 @@ class TestKernelCrashDumpsUtilities(CiTestCase): ) as chroot_mock, ): manual_disable(target) +======= + with patch( + "curtin.distro.get_installed_packages", + return_value=["kdump-tools" if preinstalled else ""], + ): + with patch( + "curtin.kernel_crash_dumps.ChrootableTarget", + new=MagicMock(), + ) as chroot_mock: + manual_disable(target) +>>>>>>> tests/unittests/test_kernel_crash_dumps.py subp_mock = chroot_mock.return_value.__enter__.return_value.subp if preinstalled: @@ -161,6 +191,7 @@ class TestKernelCrashDumpsUtilities(CiTestCase): def test_automatic_detect(self, wants_enablement): """Test automatic enablement logic.""" target = Path("/target") +<<<<<<< tests/unittests/test_kernel_crash_dumps.py with ( patch( "curtin.kernel_crash_dumps.detection_script_available", @@ -172,6 +203,17 @@ class TestKernelCrashDumpsUtilities(CiTestCase): ) as chroot_mock, ): automatic_detect(target) +======= + with patch( + "curtin.kernel_crash_dumps.detection_script_available", + return_value=wants_enablement, + ): + with patch( + "curtin.kernel_crash_dumps.ChrootableTarget", + new=MagicMock(), + ) as chroot_mock: + automatic_detect(target) +>>>>>>> tests/unittests/test_kernel_crash_dumps.py subp_mock = chroot_mock.return_value.__enter__.return_value.subp if wants_enablement: diff --git a/tests/unittests/test_storage_config.py b/tests/unittests/test_storage_config.py index 7b0f68c..d1b89cd 100644 --- a/tests/unittests/test_storage_config.py +++ b/tests/unittests/test_storage_config.py @@ -1117,9 +1117,11 @@ class TestExtractStorageConfig(CiTestCase): config = extracted['storage']['config'] disks = [cfg for cfg in config if cfg['type'] == 'disk'] expected_count = len([ - 1 for bd_name, bd_data in self.probe_data['blockdev'].items() - if bd_data.get('DM_UUID', '').startswith('mpath-') - or bd_name.startswith('/dev/dasd') and bd_data['DEVTYPE'] == 'disk' + 1 + for bd_name, bd_data in self.probe_data['blockdev'].items() + if bd_data.get('DM_UUID', '').startswith('mpath-') or + bd_name.startswith('/dev/dasd') and + bd_data['DEVTYPE'] == 'disk' ]) self.assertEqual(expected_count, len(disks)) @@ -1178,7 +1180,10 @@ class TestSelectConfigs(CiTestCase): id1 = {'a': 1, 'c': 3} sc = {'id0': id0, 'id1': id1} - self.assertEqual([id0, id1], select_configs(sc, a=1)) + actual = select_configs(sc, a=1) + self.assertEqual(2, len(actual)) + self.assertIn(id0, actual) + self.assertIn(id1, actual) def test_not_found(self): id0 = {'a': 1, 'b': 2} diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py index 90303e9..40d92b8 100644 --- a/tests/unittests/test_util.py +++ b/tests/unittests/test_util.py @@ -1077,6 +1077,7 @@ class TestGetEFIBootMGR(CiTestCase): Boot0005* UEFI:Network Device BBS(131,,0x0) """), '')) observed = util.get_efibootmgr('target') +<<<<<<< tests/unittests/test_util.py expected = util.EFIBootState( current='0000', timeout='1 seconds', @@ -1109,6 +1110,39 @@ class TestGetEFIBootMGR(CiTestCase): }) self.assertEqual(expected, observed) +======= + self.assertEqual({ + 'current': '0000', + 'timeout': '1 seconds', + 'order': ['0000', '0002', '0001', '0003', '0004', '0005'], + 'entries': { + '0000': { + 'name': 'ubuntu', + 'path': 'HD(1,GPT)/File(\\EFI\\ubuntu\\shimx64.efi)', + }, + '0001': { + 'name': 'CD/DVD Drive', + 'path': 'BBS(CDROM,,0x0)', + }, + '0002': { + 'name': 'Hard Drive', + 'path': 'BBS(HD,,0x0)', + }, + '0003': { + 'name': 'UEFI:CD/DVD Drive', + 'path': 'BBS(129,,0x0)', + }, + '0004': { + 'name': 'UEFI:Removable Device', + 'path': 'BBS(130,,0x0)', + }, + '0005': { + 'name': 'UEFI:Network Device', + 'path': 'BBS(131,,0x0)', + }, + } + }, observed) +>>>>>>> tests/unittests/test_util.py def test_parses_output_filter_missing(self): """ensure parsing ignores items in order that don't have entries""" @@ -1125,6 +1159,7 @@ class TestGetEFIBootMGR(CiTestCase): Boot0005* UEFI:Network Device BBS(131,,0x0) """), '')) observed = util.get_efibootmgr('target') +<<<<<<< tests/unittests/test_util.py expected = util.EFIBootState( current='0000', timeout='1 seconds', @@ -1156,6 +1191,39 @@ class TestGetEFIBootMGR(CiTestCase): ), }) self.assertEqual(expected, observed) +======= + self.assertEqual({ + 'current': '0000', + 'timeout': '1 seconds', + 'order': ['0000', '0002', '0001', '0003', '0004', '0005'], + 'entries': { + '0000': { + 'name': 'ubuntu', + 'path': 'HD(1,GPT)/File(\\EFI\\ubuntu\\shimx64.efi)', + }, + '0001': { + 'name': 'CD/DVD Drive', + 'path': 'BBS(CDROM,,0x0)', + }, + '0002': { + 'name': 'Hard Drive', + 'path': 'BBS(HD,,0x0)', + }, + '0003': { + 'name': 'UEFI:CD/DVD Drive', + 'path': 'BBS(129,,0x0)', + }, + '0004': { + 'name': 'UEFI:Removable Device', + 'path': 'BBS(130,,0x0)', + }, + '0005': { + 'name': 'UEFI:Network Device', + 'path': 'BBS(131,,0x0)', + }, + } + }, observed) +>>>>>>> tests/unittests/test_util.py class TestUsesSystemd(CiTestCase): @@ -1346,7 +1414,11 @@ class TestNotExclusiveRetry(CiTestCase): f = mock.Mock(side_effect=[util.NotExclusiveError, 'success']) self.assertEqual(util.not_exclusive_retry(f, 1, 2, 3), 'success') +<<<<<<< tests/unittests/test_util.py sleep.assert_called_once() +======= + self.assertEqual(1, sleep.call_count) +>>>>>>> tests/unittests/test_util.py @mock.patch('curtin.util.time.sleep') def test_not_exclusive_retry_not_exclusive_twice(self, sleep): @@ -1354,7 +1426,11 @@ class TestNotExclusiveRetry(CiTestCase): with self.assertRaises(util.NotExclusiveError): util.not_exclusive_retry(f, 1, 2, 3) +<<<<<<< tests/unittests/test_util.py sleep.assert_called_once() +======= + self.assertEqual(1, sleep.call_count) +>>>>>>> tests/unittests/test_util.py @mock.patch('curtin.util.time.sleep') def test_not_exclusive_retry_not_exclusive_once_then_error(self, sleep): @@ -1362,6 +1438,7 @@ class TestNotExclusiveRetry(CiTestCase): with self.assertRaises(OSError): util.not_exclusive_retry(f, 1, 2, 3) +<<<<<<< tests/unittests/test_util.py sleep.assert_called_once() @@ -1438,5 +1515,8 @@ class TestFlockEx(CiTestCase): fcntl.flock(fp, fcntl.LOCK_UN) +======= + self.assertEqual(1, sleep.call_count) +>>>>>>> tests/unittests/test_util.py # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/releases.py b/tests/vmtests/releases.py index 56e5e8c..3202893 100644 --- a/tests/vmtests/releases.py +++ b/tests/vmtests/releases.py @@ -172,6 +172,13 @@ class _JammyBase(_UbuntuBase): subarch = "ga-22.04" +class _JammyBase(_UbuntuBase): + release = "jammy" + target_release = "jammy" + if _UbuntuBase.arch == "arm64": + subarch = "ga-22.04" + + class _Releases(object): trusty = _TrustyBase precise = _PreciseBase @@ -190,6 +197,11 @@ class _Releases(object): disco = _DiscoBase eoan = _EoanBase focal = _FocalBase +<<<<<<< tests/vmtests/releases.py +======= + hirsute = _HirsuteBase + impish = _ImpishBase +>>>>>>> tests/vmtests/releases.py jammy = _JammyBase diff --git a/tests/vmtests/test_apt_config_cmd.py b/tests/vmtests/test_apt_config_cmd.py index 5a1c322..82bdae3 100644 --- a/tests/vmtests/test_apt_config_cmd.py +++ b/tests/vmtests/test_apt_config_cmd.py @@ -79,4 +79,8 @@ class JammyTestAptConfigCMDCMD(relbase.jammy, TestAptConfigCMD): __test__ = True +class JammyTestAptConfigCMDCMD(relbase.jammy, TestAptConfigCMD): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_basic.py b/tests/vmtests/test_basic.py index f9c3b04..33b0e95 100644 --- a/tests/vmtests/test_basic.py +++ b/tests/vmtests/test_basic.py @@ -251,6 +251,10 @@ class JammyTestBasic(relbase.jammy, TestBasicAbs): __test__ = True +class JammyTestBasic(relbase.jammy, TestBasicAbs): + __test__ = True + + class TestBasicScsiAbs(TestBasicAbs): arch_skip = [ 'arm64', # arm64 is UEFI only @@ -377,4 +381,8 @@ class JammyTestScsiBasic(relbase.jammy, TestBasicScsiAbs): __test__ = True +class JammyTestScsiBasic(relbase.jammy, TestBasicScsiAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_basic_dasd.py b/tests/vmtests/test_basic_dasd.py index 154f26d..78edb3a 100644 --- a/tests/vmtests/test_basic_dasd.py +++ b/tests/vmtests/test_basic_dasd.py @@ -60,4 +60,8 @@ class JammyTestBasicDasd(relbase.jammy, TestBasicDasd): __test__ = True +class JammyTestBasicDasd(relbase.jammy, TestBasicDasd): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_bcache_basic.py b/tests/vmtests/test_bcache_basic.py index 2e62f0b..a7e4f37 100644 --- a/tests/vmtests/test_bcache_basic.py +++ b/tests/vmtests/test_bcache_basic.py @@ -72,4 +72,8 @@ class JammyBcacheBasic(relbase.jammy, TestBcacheBasic): __test__ = True +class JammyBcacheBasic(relbase.jammy, TestBcacheBasic): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_bcache_bug1718699.py b/tests/vmtests/test_bcache_bug1718699.py index 82a765a..56ee7b0 100644 --- a/tests/vmtests/test_bcache_bug1718699.py +++ b/tests/vmtests/test_bcache_bug1718699.py @@ -27,4 +27,8 @@ class JammyTestBcacheBug1718699(relbase.jammy, TestBcacheBug1718699): __test__ = True +class JammyTestBcacheBug1718699(relbase.jammy, TestBcacheBug1718699): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_bcache_ceph.py b/tests/vmtests/test_bcache_ceph.py index 15cce59..53df0ad 100644 --- a/tests/vmtests/test_bcache_ceph.py +++ b/tests/vmtests/test_bcache_ceph.py @@ -83,6 +83,10 @@ class JammyTestBcacheCeph(relbase.jammy, TestBcacheCeph): __test__ = True +class JammyTestBcacheCeph(relbase.jammy, TestBcacheCeph): + __test__ = True + + class TestBcacheCephLvm(TestBcacheCeph): test_type = 'storage' nr_cpus = 2 @@ -113,4 +117,8 @@ class JammyTestBcacheCephLvm(relbase.jammy, TestBcacheCephLvm): __test__ = True +class JammyTestBcacheCephLvm(relbase.jammy, TestBcacheCephLvm): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_bcache_partitions.py b/tests/vmtests/test_bcache_partitions.py index c3c41bc..42f8575 100644 --- a/tests/vmtests/test_bcache_partitions.py +++ b/tests/vmtests/test_bcache_partitions.py @@ -33,4 +33,8 @@ class JammyTestBcachePartitions(relbase.jammy, TestBcachePartitions): __test__ = True +class JammyTestBcachePartitions(relbase.jammy, TestBcachePartitions): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_fs_battery.py b/tests/vmtests/test_fs_battery.py index bd1e629..be63ba2 100644 --- a/tests/vmtests/test_fs_battery.py +++ b/tests/vmtests/test_fs_battery.py @@ -254,4 +254,8 @@ class JammyTestFsBattery(relbase.jammy, TestFsBattery): __test__ = True +class JammyTestFsBattery(relbase.jammy, TestFsBattery): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_iscsi.py b/tests/vmtests/test_iscsi.py index b5d9082..6f6951b 100644 --- a/tests/vmtests/test_iscsi.py +++ b/tests/vmtests/test_iscsi.py @@ -82,4 +82,8 @@ class JammyTestIscsiBasic(relbase.jammy, TestBasicIscsiAbs): __test__ = True +class JammyTestIscsiBasic(relbase.jammy, TestBasicIscsiAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_journald_reporter.py b/tests/vmtests/test_journald_reporter.py index ba39af2..0056b73 100644 --- a/tests/vmtests/test_journald_reporter.py +++ b/tests/vmtests/test_journald_reporter.py @@ -40,4 +40,8 @@ class JammyTestJournaldReporter(relbase.jammy, TestJournaldReporter): __test__ = True +class JammyTestJournaldReporter(relbase.jammy, TestJournaldReporter): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_lvm.py b/tests/vmtests/test_lvm.py index e53e9f2..2c19e94 100644 --- a/tests/vmtests/test_lvm.py +++ b/tests/vmtests/test_lvm.py @@ -89,4 +89,8 @@ class JammyTestLvm(relbase.jammy, TestLvmAbs): __test__ = True +class JammyTestLvm(relbase.jammy, TestLvmAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_lvm_iscsi.py b/tests/vmtests/test_lvm_iscsi.py index 94e523b..77c16f3 100644 --- a/tests/vmtests/test_lvm_iscsi.py +++ b/tests/vmtests/test_lvm_iscsi.py @@ -103,4 +103,8 @@ class JammyTestIscsiLvm(relbase.jammy, TestLvmIscsiAbs): __test__ = True +class JammyTestIscsiLvm(relbase.jammy, TestLvmIscsiAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_lvm_root.py b/tests/vmtests/test_lvm_root.py index 4c9b5f3..04c4b9b 100644 --- a/tests/vmtests/test_lvm_root.py +++ b/tests/vmtests/test_lvm_root.py @@ -104,6 +104,13 @@ class JammyTestLvmRootExt4(relbase.jammy, TestLvmRootAbs): } +class JammyTestLvmRootExt4(relbase.jammy, TestLvmRootAbs): + __test__ = True + conf_replace = { + '__ROOTFS_FORMAT__': 'ext4', + } + + class XenialTestLvmRootXfs(relbase.xenial, TestLvmRootAbs): __test__ = True conf_replace = { @@ -158,6 +165,14 @@ class JammyTestUefiLvmRootExt4(relbase.jammy, TestUefiLvmRootAbs): } +class JammyTestUefiLvmRootExt4(relbase.jammy, TestUefiLvmRootAbs): + __test__ = True + conf_replace = { + '__BOOTFS_FORMAT__': 'ext4', + '__ROOTFS_FORMAT__': 'ext4', + } + + class XenialTestUefiLvmRootXfs(relbase.xenial, TestUefiLvmRootAbs): __test__ = True conf_replace = { diff --git a/tests/vmtests/test_mdadm_bcache.py b/tests/vmtests/test_mdadm_bcache.py index 8de7702..a2911c0 100644 --- a/tests/vmtests/test_mdadm_bcache.py +++ b/tests/vmtests/test_mdadm_bcache.py @@ -169,6 +169,10 @@ class JammyTestMdadmBcache(relbase.jammy, TestMdadmBcacheAbs): __test__ = True +class JammyTestMdadmBcache(relbase.jammy, TestMdadmBcacheAbs): + __test__ = True + + class TestMirrorbootAbs(TestMdadmAbs): # alternative config for more complex setup conf_file = "examples/tests/mirrorboot.yaml" @@ -215,6 +219,10 @@ class JammyTestMirrorboot(relbase.jammy, TestMirrorbootAbs): __test__ = True +class JammyTestMirrorboot(relbase.jammy, TestMirrorbootAbs): + __test__ = True + + class TestMirrorbootPartitionsAbs(TestMdadmAbs): # alternative config for more complex setup conf_file = "examples/tests/mirrorboot-msdos-partition.yaml" @@ -266,6 +274,11 @@ class JammyTestMirrorbootPartitions(relbase.jammy, __test__ = True +class JammyTestMirrorbootPartitions(relbase.jammy, + TestMirrorbootPartitionsAbs): + __test__ = True + + class TestMirrorbootPartitionsUEFIAbs(TestMdadmAbs): # alternative config for more complex setup conf_file = "examples/tests/mirrorboot-uefi.yaml" @@ -366,6 +379,11 @@ class JammyTestMirrorbootPartitionsUEFI(relbase.jammy, __test__ = True +class JammyTestMirrorbootPartitionsUEFI(relbase.jammy, + TestMirrorbootPartitionsUEFIAbs): + __test__ = True + + class TestRaid5bootAbs(TestMdadmAbs): # alternative config for more complex setup conf_file = "examples/tests/raid5boot.yaml" @@ -414,6 +432,10 @@ class JammyTestRaid5boot(relbase.jammy, TestRaid5bootAbs): __test__ = True +class JammyTestRaid5boot(relbase.jammy, TestRaid5bootAbs): + __test__ = True + + class TestRaid6bootAbs(TestMdadmAbs): # alternative config for more complex setup conf_file = "examples/tests/raid6boot.yaml" @@ -475,6 +497,10 @@ class JammyTestRaid6boot(relbase.jammy, TestRaid6bootAbs): __test__ = True +class JammyTestRaid6boot(relbase.jammy, TestRaid6bootAbs): + __test__ = True + + class TestRaid10bootAbs(TestMdadmAbs): # alternative config for more complex setup conf_file = "examples/tests/raid10boot.yaml" @@ -522,6 +548,10 @@ class JammyTestRaid10boot(relbase.jammy, TestRaid10bootAbs): __test__ = True +class JammyTestRaid10boot(relbase.jammy, TestRaid10bootAbs): + __test__ = True + + class TestAllindataAbs(TestMdadmAbs): # more complex, needs more time # alternative config for more complex setup @@ -632,4 +662,8 @@ class FocalTestAllindata(relbase.focal, TestAllindataAbs): # __test__ = True +class JammyTestAllindata(relbase.jammy, TestAllindataAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_mdadm_iscsi.py b/tests/vmtests/test_mdadm_iscsi.py index 8c61efe..456e779 100644 --- a/tests/vmtests/test_mdadm_iscsi.py +++ b/tests/vmtests/test_mdadm_iscsi.py @@ -59,4 +59,8 @@ class JammyTestIscsiMdadm(relbase.jammy, TestMdadmIscsiAbs): __test__ = True +class JammyTestIscsiMdadm(relbase.jammy, TestMdadmIscsiAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_multipath.py b/tests/vmtests/test_multipath.py index 50db226..96cda7b 100644 --- a/tests/vmtests/test_multipath.py +++ b/tests/vmtests/test_multipath.py @@ -170,6 +170,10 @@ class JammyTestMultipathBasic(relbase.jammy, TestMultipathBasicAbs): __test__ = True +class JammyTestMultipathBasic(relbase.jammy, TestMultipathBasicAbs): + __test__ = True + + class TestMultipathReuseAbs(TestMultipathBasicAbs): conf_file = "examples/tests/multipath-reuse.yaml" @@ -182,4 +186,8 @@ class JammyTestMultipathReuse(relbase.jammy, TestMultipathReuseAbs): __test__ = True +class JammyTestMultipathReuse(relbase.jammy, TestMultipathReuseAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_multipath_lvm.py b/tests/vmtests/test_multipath_lvm.py index 86cb393..375aa0e 100644 --- a/tests/vmtests/test_multipath_lvm.py +++ b/tests/vmtests/test_multipath_lvm.py @@ -68,6 +68,10 @@ class JammyTestMultipathLvm(relbase.jammy, TestMultipathLvmAbs): __test__ = True +class JammyTestMultipathLvm(relbase.jammy, TestMultipathLvmAbs): + __test__ = True + + class TestMultipathLvmPartWipeAbs(TestMultipathLvmAbs): conf_file = "examples/tests/multipath-lvm-part-wipe.yaml" @@ -83,4 +87,9 @@ class JammyTestMultipathLvmPartWipe(relbase.jammy, __test__ = True +class JammyTestMultipathLvmPartWipe(relbase.jammy, + TestMultipathLvmPartWipeAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_network.py b/tests/vmtests/test_network.py index ad5a8bd..baebfc9 100644 --- a/tests/vmtests/test_network.py +++ b/tests/vmtests/test_network.py @@ -489,6 +489,10 @@ class JammyTestNetworkBasic(relbase.jammy, TestNetworkBasicAbs): __test__ = True +class JammyTestNetworkBasic(relbase.jammy, TestNetworkBasicAbs): + __test__ = True + + class Centos70TestNetworkBasic(centos_relbase.centos70_xenial, CentosTestNetworkBasicAbs): __test__ = True diff --git a/tests/vmtests/test_network_alias.py b/tests/vmtests/test_network_alias.py index 628a8b7..9925faf 100644 --- a/tests/vmtests/test_network_alias.py +++ b/tests/vmtests/test_network_alias.py @@ -55,4 +55,8 @@ class JammyTestNetworkAlias(relbase.jammy, TestNetworkAliasAbs): __test__ = True +class JammyTestNetworkAlias(relbase.jammy, TestNetworkAliasAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_network_bonding.py b/tests/vmtests/test_network_bonding.py index ea411d8..3a3477e 100644 --- a/tests/vmtests/test_network_bonding.py +++ b/tests/vmtests/test_network_bonding.py @@ -65,6 +65,10 @@ class JammyTestBonding(relbase.jammy, TestNetworkBondingAbs): __test__ = True +class JammyTestBonding(relbase.jammy, TestNetworkBondingAbs): + __test__ = True + + class Centos70TestNetworkBonding(centos_relbase.centos70_xenial, CentosTestNetworkBondingAbs): __test__ = True diff --git a/tests/vmtests/test_network_bridging.py b/tests/vmtests/test_network_bridging.py index 329a49f..eca0bc0 100644 --- a/tests/vmtests/test_network_bridging.py +++ b/tests/vmtests/test_network_bridging.py @@ -237,6 +237,10 @@ class JammyTestBridging(relbase.jammy, TestBridgeNetworkAbs): __test__ = True +class JammyTestBridging(relbase.jammy, TestBridgeNetworkAbs): + __test__ = True + + class XenialTestBridgingV2(relbase.xenial, TestBridgeNetworkAbs): """ This class only needs to verify that when provided a v2 config that the Xenial network packages are installed. """ diff --git a/tests/vmtests/test_network_disabled.py b/tests/vmtests/test_network_disabled.py index f9efaa6..e0c99af 100644 --- a/tests/vmtests/test_network_disabled.py +++ b/tests/vmtests/test_network_disabled.py @@ -66,6 +66,21 @@ class FocalCurtinDisableNetworkRendering(relbase.focal, TestKlass1): __test__ = True +<<<<<<< tests/vmtests/test_network_disabled.py +======= +class HirsuteCurtinDisableNetworkRendering(relbase.hirsute, TestKlass1): + __test__ = True + + +class ImpishCurtinDisableNetworkRendering(relbase.impish, TestKlass1): + __test__ = True + + +class JammyCurtinDisableNetworkRendering(relbase.jammy, TestKlass1): + __test__ = True + + +>>>>>>> tests/vmtests/test_network_disabled.py class FocalCurtinDisableCloudInitNetworking(relbase.focal, TestKlass2): __test__ = True @@ -74,7 +89,15 @@ class FocalCurtinDisableCloudInitNetworkingVersion1(relbase.focal, TestKlass3): __test__ = True +<<<<<<< tests/vmtests/test_network_disabled.py class JammyCurtinDisableNetworkRendering(relbase.jammy, TestKlass1): +======= +class JammyCurtinDisableCloudInitNetworking(relbase.jammy, TestKlass2): + __test__ = True + + +class FocalCurtinDisableCloudInitNetworkingVersion1(relbase.focal, TestKlass3): +>>>>>>> tests/vmtests/test_network_disabled.py __test__ = True @@ -88,4 +111,9 @@ class JammyCurtinDisableCloudInitNetworkingVersion1(relbase.jammy, TestKlass3): __test__ = True +class JammyCurtinDisableCloudInitNetworkingVersion1(relbase.jammy, + TestKlass3): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_network_ipv6.py b/tests/vmtests/test_network_ipv6.py index 5c31b48..64c162f 100644 --- a/tests/vmtests/test_network_ipv6.py +++ b/tests/vmtests/test_network_ipv6.py @@ -61,6 +61,10 @@ class JammyTestNetworkIPV6(relbase.jammy, TestNetworkIPV6Abs): __test__ = True +class JammyTestNetworkIPV6(relbase.jammy, TestNetworkIPV6Abs): + __test__ = True + + class Centos70TestNetworkIPV6(centos_relbase.centos70_xenial, CentosTestNetworkIPV6Abs): __test__ = True diff --git a/tests/vmtests/test_network_ipv6_static.py b/tests/vmtests/test_network_ipv6_static.py index 5352bfe..d317977 100644 --- a/tests/vmtests/test_network_ipv6_static.py +++ b/tests/vmtests/test_network_ipv6_static.py @@ -31,6 +31,10 @@ class JammyTestNetworkIPV6Static(relbase.jammy, TestNetworkIPV6StaticAbs): __test__ = True +class JammyTestNetworkIPV6Static(relbase.jammy, TestNetworkIPV6StaticAbs): + __test__ = True + + class Centos70TestNetworkIPV6Static(centos_relbase.centos70_xenial, CentosTestNetworkIPV6StaticAbs): __test__ = True diff --git a/tests/vmtests/test_network_ipv6_vlan.py b/tests/vmtests/test_network_ipv6_vlan.py index 8f3fe64..3516d60 100644 --- a/tests/vmtests/test_network_ipv6_vlan.py +++ b/tests/vmtests/test_network_ipv6_vlan.py @@ -30,6 +30,10 @@ class JammyTestNetworkIPV6Vlan(relbase.jammy, TestNetworkIPV6VlanAbs): __test__ = True +class JammyTestNetworkIPV6Vlan(relbase.jammy, TestNetworkIPV6VlanAbs): + __test__ = True + + class Centos70TestNetworkIPV6Vlan(centos_relbase.centos70_xenial, CentosTestNetworkIPV6VlanAbs): __test__ = True diff --git a/tests/vmtests/test_network_mtu.py b/tests/vmtests/test_network_mtu.py index 67d5d01..5a80d1b 100644 --- a/tests/vmtests/test_network_mtu.py +++ b/tests/vmtests/test_network_mtu.py @@ -197,6 +197,10 @@ class JammyTestNetworkMtu(relbase.jammy, TestNetworkMtuNetworkdAbs): __test__ = True +class JammyTestNetworkMtu(relbase.jammy, TestNetworkMtuNetworkdAbs): + __test__ = True + + class Centos70TestNetworkMtu(centos_relbase.centos70_xenial, CentosTestNetworkMtuAbs): __test__ = True diff --git a/tests/vmtests/test_network_ovs.py b/tests/vmtests/test_network_ovs.py index c50d115..363f140 100644 --- a/tests/vmtests/test_network_ovs.py +++ b/tests/vmtests/test_network_ovs.py @@ -49,4 +49,8 @@ class JammyTestNetworkOvs(relbase.jammy, TestNetworkOvsAbs): __test__ = True +class JammyTestNetworkOvs(relbase.jammy, TestNetworkOvsAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_network_static.py b/tests/vmtests/test_network_static.py index 620c952..e3f6711 100644 --- a/tests/vmtests/test_network_static.py +++ b/tests/vmtests/test_network_static.py @@ -36,6 +36,10 @@ class JammyTestNetworkStatic(relbase.jammy, TestNetworkStaticAbs): __test__ = True +class JammyTestNetworkStatic(relbase.jammy, TestNetworkStaticAbs): + __test__ = True + + class Centos70TestNetworkStatic(centos_relbase.centos70_xenial, CentosTestNetworkStaticAbs): __test__ = True diff --git a/tests/vmtests/test_network_static_routes.py b/tests/vmtests/test_network_static_routes.py index 0258113..e099ddd 100644 --- a/tests/vmtests/test_network_static_routes.py +++ b/tests/vmtests/test_network_static_routes.py @@ -38,6 +38,11 @@ class JammyTestNetworkStaticRoutes(relbase.jammy, __test__ = True +class JammyTestNetworkStaticRoutes(relbase.jammy, + TestNetworkStaticRoutesAbs): + __test__ = True + + class Centos70TestNetworkStaticRoutes(centos_relbase.centos70_xenial, CentosTestNetworkStaticRoutesAbs): __test__ = False diff --git a/tests/vmtests/test_network_vlan.py b/tests/vmtests/test_network_vlan.py index 0ab62bb..0f2473a 100644 --- a/tests/vmtests/test_network_vlan.py +++ b/tests/vmtests/test_network_vlan.py @@ -84,6 +84,10 @@ class JammyTestNetworkVlan(relbase.jammy, TestNetworkVlanAbs): __test__ = True +class JammyTestNetworkVlan(relbase.jammy, TestNetworkVlanAbs): + __test__ = True + + class Centos70TestNetworkVlan(centos_relbase.centos70_xenial, CentosTestNetworkVlanAbs): __test__ = True diff --git a/tests/vmtests/test_nvme.py b/tests/vmtests/test_nvme.py index dd071e9..158c4e8 100644 --- a/tests/vmtests/test_nvme.py +++ b/tests/vmtests/test_nvme.py @@ -85,6 +85,10 @@ class JammyTestNvme(relbase.jammy, TestNvmeAbs): # OSError - [Errno 16] Device or resource busy: '/dev/mapper/mpatha' +class JammyTestNvme(relbase.jammy, TestNvmeAbs): + __test__ = False + + class TestNvmeBcacheAbs(TestNvmeAbs): arch_skip = [ "s390x", # nvme is a pci device, no pci on s390x @@ -155,4 +159,8 @@ class JammyTestNvmeBcache(relbase.jammy, TestNvmeBcacheAbs): __test__ = True +class JammyTestNvmeBcache(relbase.jammy, TestNvmeBcacheAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_panic.py b/tests/vmtests/test_panic.py index d8d3f22..39f30e1 100644 --- a/tests/vmtests/test_panic.py +++ b/tests/vmtests/test_panic.py @@ -33,4 +33,8 @@ class JammyTestInstallPanic(relbase.jammy, TestInstallPanic): __test__ = True +class JammyTestInstallPanic(relbase.jammy, TestInstallPanic): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_pollinate_useragent.py b/tests/vmtests/test_pollinate_useragent.py index 5a4b0fb..cfb75a8 100644 --- a/tests/vmtests/test_pollinate_useragent.py +++ b/tests/vmtests/test_pollinate_useragent.py @@ -69,4 +69,8 @@ class JammyTestPollinateUserAgent(relbase.jammy, TestPollinateUserAgent): __test__ = True +class JammyTestPollinateUserAgent(relbase.jammy, TestPollinateUserAgent): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_preserve.py b/tests/vmtests/test_preserve.py index d6eb922..ff0ab59 100644 --- a/tests/vmtests/test_preserve.py +++ b/tests/vmtests/test_preserve.py @@ -33,4 +33,8 @@ class JammyTestPreserve(relbase.jammy, TestPreserve): __test__ = True +class JammyTestPreserve(relbase.jammy, TestPreserve): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_preserve_bcache.py b/tests/vmtests/test_preserve_bcache.py index 2384be8..762e146 100644 --- a/tests/vmtests/test_preserve_bcache.py +++ b/tests/vmtests/test_preserve_bcache.py @@ -64,4 +64,8 @@ class JammyTestPreserveBcache(relbase.jammy, TestPreserveBcache): __test__ = True +class JammyTestPreserveBcache(relbase.jammy, TestPreserveBcache): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_preserve_lvm.py b/tests/vmtests/test_preserve_lvm.py index e0bab24..351176b 100644 --- a/tests/vmtests/test_preserve_lvm.py +++ b/tests/vmtests/test_preserve_lvm.py @@ -81,4 +81,8 @@ class JammyTestLvmPreserve(relbase.jammy, TestLvmPreserveAbs): __test__ = True +class JammyTestLvmPreserve(relbase.jammy, TestLvmPreserveAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_preserve_partition_wipe_vg.py b/tests/vmtests/test_preserve_partition_wipe_vg.py index 7120e63..bc1dcf3 100644 --- a/tests/vmtests/test_preserve_partition_wipe_vg.py +++ b/tests/vmtests/test_preserve_partition_wipe_vg.py @@ -35,6 +35,10 @@ class JammyTestPreserveWipeLvm(relbase.jammy, TestPreserveWipeLvm): __test__ = True +class JammyTestPreserveWipeLvm(relbase.jammy, TestPreserveWipeLvm): + __test__ = True + + class TestPreserveWipeLvmSimple(VMBaseClass): conf_file = "examples/tests/preserve-partition-wipe-vg-simple.yaml" uefi = False @@ -59,4 +63,9 @@ class JammyTestPreserveWipeLvmSimple(relbase.jammy, TestPreserveWipeLvmSimple): __test__ = True +class JammyTestPreserveWipeLvmSimple(relbase.jammy, + TestPreserveWipeLvmSimple): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_preserve_raid.py b/tests/vmtests/test_preserve_raid.py index cf97203..8fd5c82 100644 --- a/tests/vmtests/test_preserve_raid.py +++ b/tests/vmtests/test_preserve_raid.py @@ -33,6 +33,10 @@ class JammyTestPreserveRAID(relbase.jammy, TestPreserveRAID): __test__ = True +class JammyTestPreserveRAID(relbase.jammy, TestPreserveRAID): + __test__ = True + + class TestPartitionExistingRAID(VMBaseClass): """ Test that curtin can repartition an existing RAID. """ conf_file = "examples/tests/partition-existing-raid.yaml" @@ -66,4 +70,9 @@ class JammyTestPartitionExistingRAID( __test__ = True +class JammyTestPartitionExistingRAID( + relbase.jammy, TestPartitionExistingRAID): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_python_apt.py b/tests/vmtests/test_python_apt.py index 5243578..1f2d6d9 100644 --- a/tests/vmtests/test_python_apt.py +++ b/tests/vmtests/test_python_apt.py @@ -37,4 +37,8 @@ class JammyTestPythonApt(relbase.jammy, TestPythonApt): __test__ = True +class JammyTestPythonApt(relbase.jammy, TestPythonApt): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_raid5_bcache.py b/tests/vmtests/test_raid5_bcache.py index e04120d..ed1328c 100644 --- a/tests/vmtests/test_raid5_bcache.py +++ b/tests/vmtests/test_raid5_bcache.py @@ -96,4 +96,8 @@ class JammyTestRaid5Bcache(relbase.jammy, TestMdadmBcacheAbs): __test__ = True +class JammyTestRaid5Bcache(relbase.jammy, TestMdadmBcacheAbs): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_raid_partition_to_disk.py b/tests/vmtests/test_raid_partition_to_disk.py index fa1939c..1adba86 100644 --- a/tests/vmtests/test_raid_partition_to_disk.py +++ b/tests/vmtests/test_raid_partition_to_disk.py @@ -26,4 +26,8 @@ class JammyTestRAIDPartitionToDisk(relbase.jammy, TestRAIDPartitionToDisk): __test__ = True +class JammyTestRAIDPartitionToDisk(relbase.jammy, TestRAIDPartitionToDisk): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_reuse_lvm_member.py b/tests/vmtests/test_reuse_lvm_member.py index cd7efd6..448adce 100644 --- a/tests/vmtests/test_reuse_lvm_member.py +++ b/tests/vmtests/test_reuse_lvm_member.py @@ -31,4 +31,9 @@ class JammyTestReuseLVMMemberPartition(relbase.jammy, __test__ = True +class JammyTestReuseLVMMemberPartition(relbase.jammy, + TestReuseLVMMemberPartition): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_reuse_msdos_partitions.py b/tests/vmtests/test_reuse_msdos_partitions.py index 32b4ad3..ad7fb42 100644 --- a/tests/vmtests/test_reuse_msdos_partitions.py +++ b/tests/vmtests/test_reuse_msdos_partitions.py @@ -30,4 +30,9 @@ class JammyTestReuseMSDOSPartitions(relbase.jammy, __test__ = True +class JammyTestReuseMSDOSPartitions(relbase.jammy, + TestReuseMSDOSPartitions): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_reuse_raid_member.py b/tests/vmtests/test_reuse_raid_member.py index 43c7185..fa62d42 100644 --- a/tests/vmtests/test_reuse_raid_member.py +++ b/tests/vmtests/test_reuse_raid_member.py @@ -36,6 +36,10 @@ class JammyTestReuseRAIDMember(relbase.jammy, TestReuseRAIDMember): __test__ = True +class JammyTestReuseRAIDMember(relbase.jammy, TestReuseRAIDMember): + __test__ = True + + class BionicTestReuseRAIDMemberPartition(relbase.bionic, TestReuseRAIDMemberPartition): __test__ = True @@ -51,4 +55,9 @@ class JammyTestReuseRAIDMemberPartition(relbase.jammy, __test__ = True +class JammyTestReuseRAIDMemberPartition(relbase.jammy, + TestReuseRAIDMemberPartition): + __test__ = True + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_reuse_uefi_esp.py b/tests/vmtests/test_reuse_uefi_esp.py index 3116505..c81ece8 100644 --- a/tests/vmtests/test_reuse_uefi_esp.py +++ b/tests/vmtests/test_reuse_uefi_esp.py @@ -48,4 +48,11 @@ class JammyTestUefiReuseEsp(relbase.jammy, TestUefiReuseEspAbs): return super().test_efiboot_menu_has_one_distro_entry() +class JammyTestUefiReuseEsp(relbase.jammy, TestUefiReuseEspAbs): + __test__ = True + + def test_efiboot_menu_has_one_distro_entry(self): + return super().test_efiboot_menu_has_one_distro_entry() + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_simple.py b/tests/vmtests/test_simple.py index 47f4d15..da5e9f1 100644 --- a/tests/vmtests/test_simple.py +++ b/tests/vmtests/test_simple.py @@ -54,6 +54,13 @@ class JammyTestSimple(relbase.jammy, TestSimple): self.output_files_exist(["netplan.yaml"]) +class JammyTestSimple(relbase.jammy, TestSimple): + __test__ = True + + def test_output_files_exist(self): + self.output_files_exist(["netplan.yaml"]) + + class TestSimpleStorage(VMBaseClass): """ Test curtin runs clear-holders when mode=simple with storage cfg. """ conf_file = "examples/tests/simple-storage.yaml" @@ -113,6 +120,13 @@ class JammyTestSimpleStorage(relbase.jammy, TestSimpleStorage): self.output_files_exist(["netplan.yaml"]) +class JammyTestSimpleStorage(relbase.jammy, TestSimpleStorage): + __test__ = True + + def test_output_files_exist(self): + self.output_files_exist(["netplan.yaml"]) + + class TestGrubNoDefaults(VMBaseClass): """ Test that curtin does not emit any grub configuration files. """ conf_file = "examples/tests/no-grub-file.yaml" @@ -146,4 +160,11 @@ class JammyTestGrubNoDefaults(relbase.jammy, TestGrubNoDefaults): self.output_files_exist(["netplan.yaml"]) +class JammyTestGrubNoDefaults(relbase.jammy, TestGrubNoDefaults): + __test__ = True + + def test_output_files_exist(self): + self.output_files_exist(["netplan.yaml"]) + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_uefi_basic.py b/tests/vmtests/test_uefi_basic.py index e962e09..3821129 100644 --- a/tests/vmtests/test_uefi_basic.py +++ b/tests/vmtests/test_uefi_basic.py @@ -104,6 +104,10 @@ class JammyUefiTestBasic(relbase.jammy, TestBasicAbs): __test__ = True +class JammyUefiTestBasic(relbase.jammy, TestBasicAbs): + __test__ = True + + class Centos70UefiTestBasic4k(centos_relbase.centos70_xenial, TestBasicAbs): __test__ = True disk_block_size = 4096 @@ -129,4 +133,9 @@ class JammyUefiTestBasic4k(relbase.jammy, TestBasicAbs): disk_block_size = 4096 +class JammyUefiTestBasic4k(relbase.jammy, TestBasicAbs): + __test__ = True + disk_block_size = 4096 + + # vi: ts=4 expandtab syntax=python diff --git a/tests/vmtests/test_zfsroot.py b/tests/vmtests/test_zfsroot.py index 6b4209d..ad8d02f 100644 --- a/tests/vmtests/test_zfsroot.py +++ b/tests/vmtests/test_zfsroot.py @@ -106,6 +106,11 @@ class JammyTestZfsRoot(relbase.jammy, TestZfsRootAbs): mem = 4096 +class JammyTestZfsRoot(relbase.jammy, TestZfsRootAbs): + __test__ = True + mem = 4096 + + class TestZfsRootFsTypeAbs(TestZfsRootAbs): conf_file = "examples/tests/basic-zfsroot.yaml" @@ -135,4 +140,9 @@ class JammyTestZfsRootFsType(relbase.jammy, TestZfsRootFsTypeAbs): mem = 4096 +class JammyTestZfsRootFsType(relbase.jammy, TestZfsRootFsTypeAbs): + __test__ = True + mem = 4096 + + # vi: ts=4 expandtab syntax=python diff --git a/tools/vmtest-system-setup b/tools/vmtest-system-setup index bdd1fdc..112227c 100755 --- a/tools/vmtest-system-setup +++ b/tools/vmtest-system-setup @@ -14,7 +14,10 @@ esac DEPS=( build-essential cloud-image-utils +<<<<<<< tools/vmtest-system-setup cryptsetup +======= +>>>>>>> tools/vmtest-system-setup git make net-tools @@ -22,7 +25,10 @@ DEPS=( python3-apt python3-attr python3-coverage +<<<<<<< tools/vmtest-system-setup python3-debian +======= +>>>>>>> tools/vmtest-system-setup python3-jsonschema python3-nose python3-oauthlib diff --git a/tox.ini b/tox.ini index 964ba77..c3bc657 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,11 @@ sitepackages = true [testenv:py3-flake8] basepython = python3 deps = {[testenv]deps} +<<<<<<< tox.ini commands = {envpython} -m flake8 {posargs:--isolated curtin tests/} +======= +commands = {envpython} -m flake8 {posargs:curtin tests/} +>>>>>>> tox.ini [testenv:py3-pyflakes] basepython = python3
-- Mailing list: https://launchpad.net/~curtin-dev Post to : curtin-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~curtin-dev More help : https://help.launchpad.net/ListHelp