From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 11 Feb 2025 15:18:11 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f56.google.com (mail-ed1-f56.google.com [209.85.208.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 51BEIAqU016693 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 11 Feb 2025 15:18:11 +0100 Received: by mail-ed1-f56.google.com with SMTP id 4fb4d7f45d1cf-5de62b6fe32sf3644927a12.1 for ; Tue, 11 Feb 2025 06:18:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1739283485; cv=pass; d=google.com; s=arc-20240605; b=GT46GwvUDNoskYbEzXcTRrf9O2oLcs7bxD3vuE1Ooz9dLwEk/FWrFtdMjt5vk+m7n6 isryp+L1YiP45mX7jRKG0yCjYr1eBIlCa6VSFzo3QI0B1W/SNAKxgaIbe21vdeuKmTyM cYpg35pl8BSS4R7b2scySttluBJ8R+fwJSwcG5sWc1fzcbA+qX3oDkQF0/JjxHIE0btz b5wMlm9h1i2ZEm67UIOkpL7u2r8FwsHXAVTbmH35S+sKYOMaim8N0W0+fdeT0Uapipb6 NYm4WEBL4NZpqVq9yDUj8Nxp4l4Pgc+oPI8K/kvuo+W3+JrWjC3AhFZah4AGnae3dT1S WDGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:dkim-signature; bh=KXLDnzm4SB9A9wumqT07KHhmS5PztdqQJocrVNABC8w=; fh=KTJXi0Q6gY4Ms758xS8n8GDoxyrCdOXONf0+Naoaw8s=; b=iV32dSDI23LdDDqA1M/HlBtlmZOIRaSTSI8xNe8kWukDK8QMD+c/4y4J1OKuSkEXwe us8O3zBXG/xlO1ZKMPgsCM4eCTL9IUeeYh/SNOATfiRF0wZ5rSP1LSh6Ee1tfa+7fzIz NjURXtTiPfg8gG1qmJ87rHiWuAgOWggt6gLuW2jLcwmmPFd/JQCPReQGKeP27RA4rjTF c+XzodIX7tZdz4WEcqAdaQ8E+3teOotmZzLWJlkfZt6StjEOm+kGGyb2YHdafoVFeiVP K32QJbC0cZVMgvCtImD1QBdYXdWjAPxt10r/YFD6p8SivBv4zpyVK4WC05tSE/U9FGJ3 ECQw==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1739283485; x=1739888285; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=KXLDnzm4SB9A9wumqT07KHhmS5PztdqQJocrVNABC8w=; b=IxDl/EQkOraEFXd68BBa9F187TZs+4qbBppeBHSqA+9wBPR77shU/YiGZl5rM6Kx/I Dy949PXmv1h4tEWKuvYXFRlqCOYvfrbxIYhdOb2c8uTC7tgOhPkh9Bh99pYUnmHcKBGY 6iXW1Q5lqD2zfIgA2HOkdTW3RJCIg1JYk4OAKiYhBX1AkZz96kq7nQfM/uq/OGhLrqqX UOkW7VKCu+vJuFz3TWZ8Ltuy3EUMAYq0qKwmoPhGh/vUBfq35CHXtQyYtiQqSKgLQ8vS 0C+4OtConxUL8phdcQ6+5D0oCZesHk0zPwIjeemn8+CKLp9oDyBN2nCqp7XNXaX6QYBr BPgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739283485; x=1739888285; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=KXLDnzm4SB9A9wumqT07KHhmS5PztdqQJocrVNABC8w=; b=LvCkL2hVIROoAhaFA/S7EpAxICsFHqugFqoDhmJIRS+MGWgkEb1iwBauTUcky+uaVl oSa6/I6pWD2umRSAJLTV2QU6yM07wbtkaMwDD/lpgv8mBe5elv7btUZNim5QjbQNZZ5Z Fwgh+J/rMxg/QIDswCzNFxryntvjX+Pw/QnVSCZQ+8+q4yyWirMbhv+zOj2iFTu6jIOq KvwSjqPcmjEeNTiVWqESqmQVXA5/pVoa772FvZQVmKO66TJIfo7GlodOLO7T5VtHIb59 6TMO6XRiA7PkR46hcD2Cf46FUzaPksGxuZWHfJ5LxuTWc/VZsZNg+xJXhS5C0sUtJXfv b/aQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUxs/O8UC2uCGK3vPVT+/Pf/ryoLAsDpK0H+nREu7ON5YOODGaOqkKKllUyhb/T2GOTLalr@ilbers.de X-Gm-Message-State: AOJu0Yz/YqJFosSBmUkyU1+E/pww9S3kpfASX8fTeDCaXkCmOMDRg6A2 fOPwxm2SI/p4YgdZX+U1+IR+X2uA2E51y17EEE7UfqlLcNwxfrYE X-Google-Smtp-Source: AGHT+IEhVUSyBOaPmsBtBklBf5i5hZ4rCprtWRgU1FyNM0pdXGK6g/+WoIlAYAaXSCDuCo2nr+tz7g== X-Received: by 2002:a05:6402:4416:b0:5dc:c9ce:b022 with SMTP id 4fb4d7f45d1cf-5de45005a55mr18541527a12.9.1739283484635; Tue, 11 Feb 2025 06:18:04 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:d641:0:b0:5d3:e99c:a4c9 with SMTP id 4fb4d7f45d1cf-5de9b5c968dls170364a12.1.-pod-prod-06-eu; Tue, 11 Feb 2025 06:18:02 -0800 (PST) X-Received: by 2002:a05:6402:a01c:b0:5dc:72e1:63ee with SMTP id 4fb4d7f45d1cf-5de44feb981mr21312900a12.6.1739283482031; Tue, 11 Feb 2025 06:18:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739283482; cv=none; d=google.com; s=arc-20240605; b=Rqgdxem//gp88USO0+j+0xnD64U5/YZ5/TkCzCs8NRKv0aUtupcyrqc67F7n0agYDq Q4QPEVXgrzMmddILfhaVaqSvQbnY6iYzzgwsc3NIVkS027nMzqaDG3D6f69Z3BSmCriv e7dedQmtPBmBXRyIdvVpr3L6nEDAd720Ix7QDDBSg25uoty8bWXJyb6lyRZJ6xtcmeNs upig1mGacU8riVIFk0Dl7Gmm/2WISiBDwH3uuulxFX5tLg8AflVbPLqjMj8z+Fm5OhNO ojqwhqnPHV7mQPzzon+RPACT4tFXNMTS3iMkPOc9zXqRwognyyOB8Bu6hVwp9oAj4rMj e4Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=rCLIaxuU5XY4UGsJkt3z8mo5h4TQNA6nuZX35yBkUoE=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=UYQD1BxLpBxaKDbisw0RfiRl39It+wxzGnLDCIPREYbk1oXdlmm5bTsDm2bRr/19xc sFgyi4dJguW89bzRZz7mG0iatu7H99GM0GXf/HbT4CleAW3uezdmzho5i3FbLqPACQKk M+YPcElr4omBYsPhF/YheMEg85pE9XbpIRWxZL0jw6QqHmZ7sjlPpAQFOcfPy7tPHJG9 ZQEg6rGPsOJoPQMT8ahjXhZf5yY6gKeGIpEwPuKbPq6pY/DmKaW+nDB0YperCM1AhBWV 65SlKZDTEdFsxYBzm6aSTwbFSFU4TBsjLPQEuGioA3QHwEbASLxpVC96d5FqV/qA5jcK YSGA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-5de51a0c492si276978a12.1.2025.02.11.06.18.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Feb 2025 06:18:01 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from home.promwad.com (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 51BEHxNE016678 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 11 Feb 2025 15:18:01 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH 2/2] testsuite: Add tests for installer image Date: Tue, 11 Feb 2025 17:10:36 +0300 Message-ID: <20250211141754.5442-3-ubely@ilbers.de> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250211141754.5442-1-ubely@ilbers.de> References: <20250211141754.5442-1-ubely@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: /KndjMVAloiq The idea is to pass to qemu two wic files (hard drives): - sda: empty wic file; - sdb: the image with installer. When run, first boot is done from sdb (since sda is empty), then installer flashes target image to sda and reboots the system. Second boot is automatically done from sda drive just written. Signed-off-by: Uladzimir Bely --- testsuite/cibase.py | 36 ++++++++++++++++++++++++++++++++++++ testsuite/citest.py | 20 ++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/testsuite/cibase.py b/testsuite/cibase.py index 075535b1..6c66a193 100755 --- a/testsuite/cibase.py +++ b/testsuite/cibase.py @@ -77,6 +77,42 @@ class CIBaseTest(CIBuilder): process.run('gpgconf --kill gpg-agent') shutil.rmtree(gnupg_home, True) + def perform_installer_build_test(self, target, distro, machine, **kwargs): + self.configure(**kwargs) + + # append ci_build.conf + with open(self.build_dir + '/conf/ci_build.conf', 'a') as f: + f.write('\n#Installer mage build configuration\n') + f.write(f'DISTRO ?= "{distro}"\n'); + f.write(f'MACHINE ?= "{machine}"\n'); + f.write('BBMULTICONFIG += "isar-installer installer-target"\n') + f.write('INSTALLER_TARGET_IMAGE = "isar-image-ci"\n') + f.write('INSTALLER_UNATTENDED = "1"\n') + f.write('INSTALLER_TARGET_DEVICE = "/dev/sda"\n') + f.write('INSTALLER_TARGET_OVERWRITE = "OVERWRITE"\n') + + self.log.info("Starting build...") + + self.bitbake(target, **kwargs) + + def perform_installer_run_test(self, arch, distro, **kwargs): + install_target = CIUtils.getVars('DEPLOY_DIR_IMAGE') + '/install.wic' + + # Create empty file installer will write to + with open(install_target, 'w') as f: + size = 4294967296 # 4GiB should be enough for the target + f.write("\0" * size) + + # append ci_build.conf + with open(self.build_dir + '/conf/ci_build.conf', 'a') as f: + f.write('\n#Installer image boot configuration\n') + f.write(f'QEMU_DISK_ARGS = "-bios /usr/share/ovmf/OVMF.fd"\n') + f.write(f'QEMU_DISK_ARGS += "-hda {install_target}"\n') + f.write(f'QEMU_DISK_ARGS += "-hdb ##ROOTFS_IMAGE##"\n') + + # Machine boots from sdb, writes image to sda and reboots to sda then + self.vm_start(arch, distro, image='isar-image-installer') + def perform_ccache_test(self, targets, **kwargs): def ccache_stats(dir, field): # Look ccache source's 'src/core/Statistic.hpp' for field meanings diff --git a/testsuite/citest.py b/testsuite/citest.py index ee965278..2de547ad 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -122,6 +122,26 @@ class CcacheTest(CIBaseTest): self.perform_ccache_test(targets) +class InstallerTest(CIBaseTest): + + """ + Installer test + + :avocado: tags=installer,full + """ + + def test_installer_build(self): + self.init() + target = "mc:isar-installer:isar-image-installer" + distro = "debian-bookworm" + machine = "qemuamd64" + self.perform_installer_build_test(target, distro, machine) + + def test_installer_run(self): + self.init() + self.perform_installer_run_test('amd64', 'bookworm') + + class CrossTest(CIBaseTest): """ -- 2.45.3 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250211141754.5442-3-ubely%40ilbers.de.