From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7159568422443941888 X-Received: by 2002:a17:906:401:b0:73d:af73:b78 with SMTP id d1-20020a170906040100b0073daf730b78mr58097796eja.122.1667985831332; Wed, 09 Nov 2022 01:23:51 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:d110:b0:7ae:83f4:3bed with SMTP id b16-20020a170906d11000b007ae83f43bedls2159617ejz.2.-pod-prod-gmail; Wed, 09 Nov 2022 01:23:50 -0800 (PST) X-Google-Smtp-Source: AMsMyM7qyGiBoHQRvhzAgmcykUvqAIS3jZoiZy0gYRS61TFGUExMLfDFJzkChjCpolxyU552zuq5 X-Received: by 2002:a17:906:65c6:b0:73c:8897:65b0 with SMTP id z6-20020a17090665c600b0073c889765b0mr56667676ejn.322.1667985830204; Wed, 09 Nov 2022 01:23:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1667985830; cv=pass; d=google.com; s=arc-20160816; b=FFAJcbwocbivxnRq1Dr33iqYvw/j0WC3zBTJVK0cMvsqn2PIZGGL7mltyMPOcLhkfh UyKeweAY5MWq/l6bOfnKqCqUA/Edzjb1vXwjI14Hhz4GuO+yzE6ahT67SmS17MfOSiiJ Baz7g/ZaHbRqmV58DrfF/CFBk30YSWyfui34O8rRhth5+T6mzl1tKY+zf+mAwO/KSDNE IaY0IxID31YzsLviV1lToFpeNHo2F6B3KlB+wyKJ9GJDcjhEeY1yUuuxpNhOsyPCLdGH +8o3pS3wBbxhYeBQ5Uh4kD+Fq8loj0GlCZnIbX4Mwg01DhrD3NKVKjz/mmTY+SrS+PyZ F4zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=rq5vys9KsMmT0FfGf+62+rdRwaSbyBGfIBdcrX21CEQ=; b=P+/sadCpoOeqrTLdX12M25r061fSbrrM5hhhqr4Hg8QUbgyMZ4QG76eYhfT5E31zUh r9B3XmFAf1rOYeh6x0aqQzjCL/LgwWhcmyee4xvlOssjH/9dBnVuTCXdtA1Bb+9R+RoR t3ucxCR4+KSehm1wintMN7vrfRS3vT6feGnXYXNABqIgAP+/H9hbbc7drYvFfoduW52P OWEKSYCT20r4lbR9wESnjD+MtqG7lTUDLHgP8NJxVq2L9WZTgCanrcyldhqBpjAFWH3/ 2Z/vXCspL811SKFCJIh4Mwh7syn34C0P3veF2ZTEjIHmJhZFleQUNFoTISR49FJwd5Lc 4qaw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=EKnBr18q; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 40.107.6.58 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60058.outbound.protection.outlook.com. [40.107.6.58]) by gmr-mx.google.com with ESMTPS id j16-20020a50ed10000000b00461ad0b1dc0si418644eds.3.2022.11.09.01.23.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2022 01:23:50 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 40.107.6.58 as permitted sender) client-ip=40.107.6.58; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=EKnBr18q; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 40.107.6.58 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mDGlXy4ZJiqUaZ39noOhDM5pcgLcw9rmczohWdVVCGx1sqOD9qEPS1ln6h2V32xe3Uez7qheYDqLoKDx9k7e8np+m4m5sho2i/Mzt98WLlQY0ELBbIYFsahQJZbDTJB9LwYr0OcrhQXZ4JfUaLScWoYs7kCT39w0GrCbL2nczDyrNlzyOV6H5LiL3mqcNjBAh/2w5nRmLcDVQcc8qqufevCbXe5RPXxIh4RMULx9h00iL331WTZG1SwMB1VyUjwDc/+w2ylOEEpcwS6aAPleB/slhGWg0Q+SfQSZar2UZM8KgnOXBNNiDIfiCcZ3zLKbMsd29i2x6c8pkR3j1bUQKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rq5vys9KsMmT0FfGf+62+rdRwaSbyBGfIBdcrX21CEQ=; b=hUkI3zxmJItChhKf3SQbECXafFX1ZBFbbWKCMI+Pgc2pM5ExhFdv8zwXJS8JQNsnb2XpsHgw1yPcPbHYDjtIweXzmICOXx/oXbCequL1/LnHQBB+TAFHbFkWz+7qiVlYAZAloJT+pAnTHFnIAJlReU3y4IXmmrJUm9jzOjDVUyxlz5JBL9FRQvL2lHZT3+v9hqaZaG1ho3uVmHyCW+F9St6anGfahNVEsEnkOMLcSA43Wd1XlrbqHwd+Fs42zFnIiN/YaSx87byxbeIY86KaxbQ+N3ob1/A1Hy9Rgo+n3qBP41/AQXYxDXnEmUQPG5ziDFTmhoN7sxxKbwPR1vf/hQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rq5vys9KsMmT0FfGf+62+rdRwaSbyBGfIBdcrX21CEQ=; b=EKnBr18qCBaO2MaYhAFTl3KoQG/FgdVITlvQdtuUcSPEn+35FafscjJzVlasSbSLiOyMpuaH/eQWNWZVBGta4Fc0hQEl7ygsTj48EnRmrwo9iWgXuyAcsclm4h1czLwTQ0jji9h3z/Yr5vYfaOYy6Alv9bjbWf6h1qO3dOkAP7wAzgmSeroNKzxZgOPBVxo4FZNnhAYyqISwGRwGHXykm0ds+U98vQuprCB8QeWa4y2HJoM/rMHKsCytGX35ekBF6IsazA8eJMBSuoerl+S72rgO4LrBKK0U4g2LBNxO1UZg33qTsKgCTbidY53aSVFE2+AqYSYLlgxxGH7HJ2wHcw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:269::8) by AM7PR10MB3285.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:10b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Wed, 9 Nov 2022 09:23:49 +0000 Received: from PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM ([fe80::e9f4:4305:f82d:1abb]) by PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM ([fe80::e9f4:4305:f82d:1abb%3]) with mapi id 15.20.5791.027; Wed, 9 Nov 2022 09:23:49 +0000 Date: Wed, 9 Nov 2022 11:23:39 +0200 From: Henning Schild To: Uladzimir Bely Cc: isar-users@googlegroups.com Subject: Re: [PATCH 2/2] CI: install expand-on-first-boot in all tests and also test Message-ID: <20221109112339.31dabb3d@md1za8fc.ad001.siemens.net> In-Reply-To: <5420887.rdbgypaU67@home> References: <20221028142145.4428-1-henning.schild@siemens.com> <20221028142145.4428-3-henning.schild@siemens.com> <20221028163230.58f4be4d@md1za8fc.ad001.siemens.net> <5420887.rdbgypaU67@home> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH2PR10CA0021.namprd10.prod.outlook.com (2603:10b6:610:4c::31) To PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:269::8) Return-Path: henning.schild@siemens.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR10MB5780:EE_|AM7PR10MB3285:EE_ X-MS-Office365-Filtering-Correlation-Id: 104f81a6-f799-4a1b-3ed2-08dac2341bde X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xDZhx+iiPRjnbQFpNa2IITqv3J2pcVXop2r7AC5lYh9TRF7uFhiQVW8JeBvplcdXoddjE4C0XVjDa687tOBuvgOhRkunKF0BiH4zTmaaYnU62I8NBO47Lr3ALs8o7XENZgekjsBVUC/p3/Nhm0MEF7E8w2MdpWCyPZxeouJzxl8s8h5aL7SSQ6fToySQiW3zkULRn4d6qMpUpR+og6uhxmjpFUYi9ctEy2dXwz2py6n66nJQHWTuhn0C+tjt8NIyC9ycNTKC62ZJvM9+UgK4lSie8BItsY0iM2FnyxV5WcUqvJtJ43z2iEf0YWwmj/rgXZO1DqrV+ABS3E0wh3jfd9V8s2byFDszdJh1pkb2kTSBiWkz0PpOdtANM9HA56G/nPbsqwcICcyOPABO1jGJABN9jd4WKHwFOTtLmivz+1HWaJml2IWpNb+yQdZ0GRFFKVml8j4wXbihcU8TRJ2HYVs+rUJcDqOimgGhjBfBsVEVITELv8Bw06qI8azrTkIouHMhCFoexHZcOGY4+o5xjQZa9Kus8UImMRyjArHkmz8HaFwfgP8+UGdEohQIrU3g6pgT2qEe2+XfGlUEkFtPMf/RXnduKrvo+hZOJF20grNns5gG6eE5lAPzTQ5HkwhwYiFO+eeleCJa1VCsf+QMATExCK8+HGVdTx3LWby6sU3cFSRsyT5Rr+KOCYLDVbenU+3gXD83gyle5pM6NSoyQw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(136003)(346002)(376002)(396003)(451199015)(6512007)(26005)(8676002)(9686003)(316002)(6916009)(6486002)(2906002)(82960400001)(41300700001)(38100700002)(8936002)(66556008)(1076003)(66476007)(66946007)(4326008)(186003)(83380400001)(44832011)(86362001)(5660300002)(6666004)(6506007)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AKXpS4bz26PgMP5OJXDMvaULbHoPzwZh2+jlMytvTKtVreGtUTov5qqYDyR3?= =?us-ascii?Q?2XmaUswFW7f/24QReg/qni/h8inFF6NVZgYSlf8FXtqyKh+W3vYXMFe7RiXd?= =?us-ascii?Q?/zzULbmMTkAUD+JCRUnjGR7GENxspoLfz2ubRyrMR1wK1nj7HMtrni3dcOuv?= =?us-ascii?Q?pqZpkhOn3R568hUCHlMRqH6TU3NUx3cMzcCOjAYhhQ32QNdtoMvjxFrOICpK?= =?us-ascii?Q?+FJ4Qpe3qMdNMJWRyjhz4An0UhA5Z8OpB/JnX7nOBQpvXKNE5XdVA/b80zFU?= =?us-ascii?Q?5643Q4qX7DlTVSxawxeOIWVOd15hjiPd7fD0DMosxxaVmFAX8WMMIz2LvIpA?= =?us-ascii?Q?R5S3J2PFMObrm5yxS2GJ3Lg8q0bIgEOA2acA/taJptwqyNpfC/od4xLtYLDO?= =?us-ascii?Q?n6CrNpuGbaaUIMMkq53UeQ+fMDsyPZ89/AcpX2I0paswIfwalqw5C0eNzpIZ?= =?us-ascii?Q?fDOqLV6Y5S47ViXWXt2vFSCsqiYj2feK+/ES2Po6Co0LXmXLNxouDKxd2M9E?= =?us-ascii?Q?Az296cVx6E4c8nZBs+mz54+bb7udvmnypKOQWDWggFumxVNaHoMimLlxByFX?= =?us-ascii?Q?Mhh8GryKcTseUKBAU1vb0FS5f/XRWsNnx/aHfbgRcmX7FGHNwZ483dED4uqI?= =?us-ascii?Q?tZ55LwiGztav6N68uXyNBdltenoiy38DUQRkIrPqHJji2ZL4vWabR3yJkK8c?= =?us-ascii?Q?w8us5pD2ZHVEovbjW+tmEtczcUFcwHGNI4vHCP27KiHHRswxXvYqd93Hir4s?= =?us-ascii?Q?0BEKn4oz2i5M82AL8G/lCgoqTJ33ARJrQ35Ku1Cfyvcc89fJwOiL6rtV9J/G?= =?us-ascii?Q?MsQ++LKuA3rda6FASaxKLR0Ly6kqUa2rXdkog8Qd4QJ4IJCEvlPJbW6pcE1E?= =?us-ascii?Q?6grxipevy8LmvcHTWblfzZygI5BVbNDrWEtC953vvkM6uzkMLq/qmAIRvvbC?= =?us-ascii?Q?RlXrXnvCp6/nFm0AvPDKCIWEww72DfzI5dxB8oKrJBer6tVC6h6GBcKK7Jef?= =?us-ascii?Q?tEgER5xmYYxziB2uMKte2DSLMwArz69fhtH/3DWS6J8vvUB+OWGk5ikk2v3D?= =?us-ascii?Q?41BxdCbxtFgEp7WPeVjrv7QLnYz9L/Rh9KHI14V+uKVYxALC0BKPgSMnMl0s?= =?us-ascii?Q?OGdHLDHdMush9+/BUqZZZzTSIj1iO7TXWsAKuUVk3qST6HHGUCLglQKJz7RQ?= =?us-ascii?Q?BnTMUx3SUVj9inTpuv3ts5l7wgViYeRXugwDknUtaS8QFmZ8i6AgrhyNuVn3?= =?us-ascii?Q?Sasdcbru68dVn9Su7QPJTBZhpa1nEWTL46iqXwCgXBZwkr5B1aEFAp4gwwNX?= =?us-ascii?Q?zmPPzZQLG//uMiCMlMw05AvMOFf5JKMSNBIr99ufkTIZaY2fvW5y5WdfDO9K?= =?us-ascii?Q?kwmx3izez4bl/cVhxcH+Tc/MtwvJEVV5VNCNVILkDNjAF3oJV2FwWGJdDVZi?= =?us-ascii?Q?0lj+vCCQBf8AABN+tlRFP13Zb24C7zyRqCd9cIs2lzYOuWwUPr2euAqRRxDw?= =?us-ascii?Q?pliBB8fRSReOUUkf1mpjkulaZhzjEOjDyY9kQDBbgM+XATv0sjWXw4EA7EQv?= =?us-ascii?Q?r3j6AViWD2SKDQNDeylfwK4uETVq4gsqTYlVTnI9OUoVYXyj6SIwckBOSOtu?= =?us-ascii?Q?7w=3D=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 104f81a6-f799-4a1b-3ed2-08dac2341bde X-MS-Exchange-CrossTenant-AuthSource: PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2022 09:23:49.0327 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NraxdtMaRn+YrPKO82b7scMmPWbHjJ0+1CVTckpnMMATWQBgiFftJYeub6r0YJWayVpjdrwHZ6vlNlAmzHypkFt1IihjLv/uKTTntz7TKJk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR10MB3285 X-TUID: nUDIoaBdkCQM Am Wed, 02 Nov 2022 16:16:04 +0300 schrieb Uladzimir Bely : > In the email from Friday, 28 October 2022 17:32:30 +03 user Henning > Schild wrote: > > I am not sure i like this one. Keep reading inline. > > > > Am Fri, 28 Oct 2022 16:21:45 +0200 > > > > schrieb Henning Schild : > > > Install the package in any rootfs we build. And also resize a few > > > images when we boot them and check the output. > > > > > > Signed-off-by: Henning Schild > > > --- > > > > > > meta-isar/conf/local.conf.sample | 2 +- > > > meta-isar/conf/machine/qemuamd64.conf | 1 + > > > testsuite/cibuilder.py | 18 +++++++++++++++--- > > > testsuite/start_vm.py | 11 +++++++++++ > > > 4 files changed, 28 insertions(+), 4 deletions(-) > > > > > > diff --git a/meta-isar/conf/local.conf.sample > > > b/meta-isar/conf/local.conf.sample index > > > 57d062025f21..27becf19aefd 100644 --- > > > a/meta-isar/conf/local.conf.sample +++ > > > b/meta-isar/conf/local.conf.sample @@ -198,7 +198,7 @@ > > > CONF_VERSION = "1" > > > > > > # > > > # The default list of extra packages to be installed. > > > > > > -IMAGE_INSTALL = "hello-isar example-raw > > > example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs > > > samefile hello isar-disable-apt-cache cowsay example-prebuilt" > > > +IMAGE_INSTALL = "hello-isar example-raw > > > example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs > > > samefile hello isar-disable-apt-cache cowsay example-prebuilt > > > expand-on-first-boot" # # Enable cross-compilation support diff > > > --git a/meta-isar/conf/machine/qemuamd64.conf > > > b/meta-isar/conf/machine/qemuamd64.conf index > > > eca2628c4ae5..6e3561901447 100644 --- > > > a/meta-isar/conf/machine/qemuamd64.conf +++ > > > b/meta-isar/conf/machine/qemuamd64.conf @@ -19,6 +19,7 @@ > > > QEMU_ARCH ?= "x86_64" QEMU_MACHINE ?= "q35" QEMU_CPU ?= "" > > > > > > QEMU_DISK_ARGS ?= "-hda ##ROOTFS_IMAGE## -bios > > > > > > /usr/share/ovmf/OVMF.fd" +QEMU_DISK_RESIZE ?= "1" > > > > I hate that i need this. But it seems to be the way to talk to the > > testsuite. Has nothing to do with the machine otherwise. > > > > Probably, it is better to place this in local.conf using > machine/distro overrides. So, just selected (overrided) targets would > be affected and ubuntu won't require any workarounds. Yes. It might even be better to add some empty space in the wks files we use. That would also make the example images more useful since people could install additional packages when running them in qemu. While we could add extra space to that last partition, an empty padding would allow for testing the expand package and would allow the example images to be flashed to much bigger disks where they would make all space available. So i think i will try and add some few hundred MBs of empty space in the wks and not create an image copy with "qemu-img resize". > > > MACHINE_SERIAL ?= "ttyS0" > > > BAUDRATE_TTY ?= "115200" > > > > > > diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py > > > index 07a9edc56d9c..fb0daedc7d49 100755 > > > --- a/testsuite/cibuilder.py > > > +++ b/testsuite/cibuilder.py > > > > > > @@ -231,6 +231,15 @@ class CIBuilder(Test): > > > login_prompt = b'isar login:' > > > # the printk of recipes-kernel/example-module > > > module_output = b'Just an example' > > > > > > + # output we see when expand-on-first-boot runs on ext4 > > > + resize_output = b'resized filesystem to' > > > + expecting_resize = False > > > + for arg in cmdline: > > > > > + if arg.endswith(".wic.resized"): > > Here i do not have that magic variable. So i guess from the > > filename. > > cibuilder.py imports start_vm.py, which has some helper functions to > get variables from "bitbake -e" output parsing. So, technically the > variable should be available through get_bitbake_env/get_bitbake_var > functions. Ok. If done via wks i would probably switch the expectation to a bitbake variable WKS_FILE. But would still have to detect ubuntu. Maybe i can get ubuntu to be more verbose and always expect to find traces of a resize when it should have happened. > > > + # in ubuntu the resize works but no trace in > > > boot log > > > > > + if not 'ubuntu' in arg: > > same here, i guess from the filename which distro my suite is, while > > there is a variable distro ... which is a suite > > > > There is a similar guess somewhere in the code > > > > >> base = 'ubuntu' if distro in ['focal', 'bionic'] else 'debian' > > > > > > + expecting_resize = True > > > + break > > > > > > timeout = time.time() + int(time_to_wait) > > > > > > @@ -265,8 +274,11 @@ class CIBuilder(Test): > > > with open(output_file, "rb") as f1: > > > data = f1.read() > > > > > > if module_output in data and login_prompt in > > > data: > > > - return > > > - else: > > > - app_log.error(data.decode(errors='replace')) > > > + if expecting_resize: > > > + if resize_output in data: > > > + return > > > + else: > > > + return > > > + app_log.error(data.decode(errors='replace')) > > > > > > self.fail('Log ' + output_file) > > > > > > diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py > > > index f761a8bda789..2262af557a32 100755 > > > --- a/testsuite/start_vm.py > > > +++ b/testsuite/start_vm.py > > > @@ -5,6 +5,7 @@ > > > > > > import argparse > > > import os > > > > > > +import shutil > > > > > > import subprocess > > > import sys > > > import time > > > > > > @@ -57,6 +58,7 @@ def format_qemu_cmdline(arch, build, distro, > > > out, pid, enforce_pcbios=False): qemu_machine = > > > get_bitbake_var(bb_output, 'QEMU_MACHINE') qemu_cpu = > > > get_bitbake_var(bb_output, 'QEMU_CPU') > > > > > > qemu_disk_args = get_bitbake_var(bb_output, 'QEMU_DISK_ARGS') > > > > > > + qemu_disk_resize = get_bitbake_var(bb_output, > > > 'QEMU_DISK_RESIZE') == "1" > > > > > > if out: > > > extra_args.extend(['-chardev','stdio,id=ch0,logfile=' + > > > out]) > > > > > > @@ -65,6 +67,15 @@ def format_qemu_cmdline(arch, build, distro, > > > out, > > > > > > pid, enforce_pcbios=False): if pid: > > > extra_args.extend(['-pidfile', pid]) > > > > > > + if qemu_disk_resize: > > Here i smuggle in a file copy in what should just give me a cmdline > > for qemu. But is is the only place where all information seems > > available. > > > > And i leave that magic copy forever, wasting space and use a magic > > suffix for the caller to know to look for log traces of resizing. > > > > As i said. I am not happy. But wanted to show that for discussion > > and maybe get feedback on how to do things better. > > > > The patches ran successfully on ilbers-ci. It might not be pretty, > > but it works. And might help us get that expand thingy more stable > > and keep it stable. > > > > Henning > > > > > + suffix = ".resized" > > > + abs_src = os.path.join(deploy_dir_image, rootfs_image) > > > + abs_dst = abs_src + suffix > > > + if not os.path.exists(abs_dst): > > > + shutil.copy(abs_src, abs_dst) > > > + subprocess.run(["qemu-img", "resize", abs_dst, > > > "+2G"]) > > > + rootfs_image += suffix > > > + > > > > > Is this ".resized" image just a something allowed to be "spoiled" by > qemu in order to have original file untouched? It is a copy that did add extra empty space at the end using "qemu-img resize". But with the wks approach we can likely get that more elegant and add value for users of the example images. Henning > If yes, it might be OK, but if it's just a hint for the code above, I > would prefer to remove this code and parse "bitbake -e" in > "cbuilder.py". > > > > qemu_disk_args = qemu_disk_args.replace('##ROOTFS_IMAGE##', > > > > > > deploy_dir_image + '/' + rootfs_image).split() if enforce_pcbios > > > and '-bios' in qemu_disk_args: bios_idx = > > > qemu_disk_args.index('-bios') > >