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; Mon, 31 Aug 2026 13:50:09 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f61.google.com (mail-wm1-f61.google.com [209.85.128.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 67VBo69M016675 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 31 Aug 2026 13:50:06 +0200 Received: by mail-wm1-f61.google.com with SMTP id 5b1f17b1804b1-490a767c7dcsf24339395e9.2 for ; Mon, 31 Aug 2026 04:50:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1788177001; cv=pass; d=google.com; s=arc-20260327; b=fTQE15VtMJ+yJzKel0TE8SjSmogwDZZHRIqi1Zd8bMdvlT+xtNiVHx9XYciOVUw/Ki PVM+Ufe7TVA1sQSjqfulKB2cJ10RyoIX9GH1bRSFkw2WR9BbWiKLLkuzRTXnWf7k13ns Pw5BIn40+eeaUOqeJiSoABnZ8iS5aYMMDuu1d9b7a96K7LRIIrGka1zjaYxnGyxMN0Uc Fg+JsayZHg5HpXaNvxYsH27bBjn4vj8XEbomtulbT+Ltf4R29lXfEJKloJ/M4QlPvE6B JSfGCVtut6RZOWK/OjBXRbGLjLE+0sb0bA+heE6eL+D+CJXOf4wdqmzEWrs9FxhgBQzY NT4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=BBrvRq9YFwkYvNDcy5C/aZeWkBMkdWzVls7QfyGa4fg=; fh=AmqHzGgfENkZPQFqcPxV3HiCNlqssQvreR4aYInfM0Q=; b=DnXcf/L4HoxdB406B47UynED+kiDLOvgT1OIYJJHvlMOKGx4FnheeeQ73CX2Z33b3n Kns28UK5JmBngPNuHrXdG2qOeAMx2QhzdR9JVFyvUPQZGE4RymydfzbtW443XAvNRKOV ZQeSM7hLYJpH4jnCK4lO6qLKxJbyYW8J5xAijVzyoJCQt6RwPPnBSw04aDpny2fSVHVG iIsr8nnif35nCORBX5ilt9fm6vIByd2e1bRj/2RkT2zGACh+06SJ6pk6H7YkkbKjneT6 Zo8R6MU1UTuvgP7TEzDcz7RIWS5pNjq8ItVdT7d4gw9Bd+33G42tBgpBdKkBrmdS4mfz /UlA==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1788177001; x=1788781801; 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:content-type:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=BBrvRq9YFwkYvNDcy5C/aZeWkBMkdWzVls7QfyGa4fg=; b=ApQmOT9Y0UNvrRCgjrN1CUZ1tkbr5YgioH3x4t3DfKplpfUDIko4FhzgpFuqZj4f4d Cs66YlGqwkGOlPPcqueWi/np9JPUG5ItSfRimiICD0Lo0msVNDlJtDuHOks7jtI3Ax+G H/dAoc6ZDO/D+BHXOpGhPgWMT/J/7nUuyu2AFmxo8Ve+pGN930fBJe7osnEZ4QHI0QKi R+Gz/0sSdhu6Ru3sP8MjnXQO5cJVEN0g2ybgaN5XJXNNOg7SFep8GwRyt9pBMguvoRNL bLy2biZwhJrazBFyNjfcXO1Q2qu9Y+Tz72GCyUgu8TaGC2lnbU/1fd1h14PbfBw2bpiK 2pNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788177001; x=1788781801; 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:content-type :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to:content-type; bh=BBrvRq9YFwkYvNDcy5C/aZeWkBMkdWzVls7QfyGa4fg=; b=ov6rfI860hmxDiq76YsbbSwJuAHSdm+caKdm/pZCF+RCu5Nvx9aEDsIJrTetLM+PUP 1YsR8zsxCeE0m9UU6DbQb2k+3gJqqHszp9HyfrSRNEIHmOgBY1ppocrMIh2Ai36m4o2u GIP7Qh315qxKJGMLgKfB/zkckoe39Z7Pvu9n/F0TwlCqAFhX+s6+OJwCRRhAqX67H/dL TvbKVxhGZiNYGZoTpiipMNNLOF34y7hB83zbfymXm93tKHPyiq2LdK1o+t/KtvivWFf+ 0GzIb1lVaIM4cv5Wy+fFepaM+IyEEyiiT3ejVRHdjotZo3VUKt2tPbpfM9rr2NY/1Az1 kxFw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AHgh+RoIfEy2+sdYdrDq14VKoQq6/4N6aorrFPsaW0e/WlugYVV3ljL+cOt7lF+2qdVV3ApjQakd@ilbers.de X-Gm-Message-State: AFuF++k0B/g74pzRw4MO4s7qb1Zzf7UgixZqNVUQFhVNRUn4+VgAJylt G/6NFfFSlMYDgL6MnjWwneFMiYsr9BfU3t2/KAJrizTqHGqrRRHorkcV X-Received: by 2002:a05:600c:3155:b0:49b:910c:7703 with SMTP id 5b1f17b1804b1-49b91c3dcb4mr372258955e9.9.1788177001011; Mon, 31 Aug 2026 04:50:01 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLdfr1y/BXmICPlC5CqAlov0qNWv9baYRHD0qoaGHvP3rWA==" Received: by 2002:a05:600c:1993:b0:499:79b9:e225 with SMTP id 5b1f17b1804b1-49b21b4e2d8ls51614195e9.2.-pod-prod-06-eu; Mon, 31 Aug 2026 04:49:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+RrmLeLfU5QcslgyOIQR0V6u/t941neFgFz8C4oU6QFBOZh+CdT/30gdDrB4SqUH8iaDeS6OCeZ0pE+i@googlegroups.com X-Received: by 2002:a05:600c:c4ac:b0:499:a5fc:2087 with SMTP id 5b1f17b1804b1-49b91c20e36mr379567415e9.6.1788176998523; Mon, 31 Aug 2026 04:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788176998; cv=none; d=google.com; s=arc-20260327; b=cZxTpaiLbPq5XD6XDbdFovjhA+A6Z0iaBUw1G3UhpTIncxoGV49NgnE5ihvtqhu+4/ ytpfJVoRqm4OCJYvGSVRVJA3Bm2GyGsd+75csXfuW9s60mfsxh/C0nkc52+WX7uYwZId HYkghRlHJB3tdiGmTewYkVUwPRYxbm70p6mPUi0No/JTKaC9aYre8LPAeyg/9yDC6rkF VJZ73s9J7oymY0cDEkOdHeuqVD7iuSK7+W2FriEXOT3KNnDqTp2zYJNzc8n8Zi/PGfWM mbwzwyig4gzdXoDzeYy2xZ9rJGTcwdqO+yU38ZKGqLckKtdkbOArlFpioV9r+rE0RCK5 IsCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=5zNjDpset2cOUlTuLW1BBV8g2L4A7uPV+LE8tv4Kmeo=; fh=AQnVVqJv75WGPVs7hlCeMRhwTt1KvSoQ+XjDYCrrHzI=; b=lKRfYtkrzP534MowGvqwVsMsQz5SOHB4euerk/yMQh5yg6FvAp7CLIGBJs7SiZC4cD oQqZn6YgAK/7lqYUgtMpBJrJXt9tzxC1BhrZaBa/sydxGJEQb0T7qLztGKdAkzj7vccr i17hs3i/hRVsRNWDs3+W6j0lSRt6hpoTAbGkwkuq0QoVd0mvdLP/phDKC1BJF/WB0fyG qZxjw1ujY60TD2ThWHda5/WytMhnL6TdzWiPuKDNK4REofyqStGk4DJ/W4zEhyppPK3/ U/luyJNqHTsvCD4Bc78we6PwzURfqTtja1z71biTDsvU3P1NENegxMuAyQzDN3lvDzZI /kAg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-49ccb6c4f79si1136675e9.0.2026.08.31.04.49.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Aug 2026 04:49:58 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.139] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 67VBnvFE016668 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2026 13:49:57 +0200 Message-ID: <1a6485e3-9e46-476f-9d39-5c4afbc7a98b@ilbers.de> Date: Mon, 31 Aug 2026 13:49:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] testsuite: add parameter to create kas config for current test To: Felix Moessbauer , isar-users@googlegroups.com Cc: cedric.hombourger@siemens.com, jan.kiszka@siemens.com References: <20260826130302.1435152-1-felix.moessbauer@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20260826130302.1435152-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed 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: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de 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: EwY8mc0X4odx Applied to next, thanks. Zhihang On 8/26/26 15:03, 'Felix Moessbauer' via isar-users wrote: > Manually debugging a failed test is often a tedious operation, requiring > changes to the test definition itself. To make it easier, we provide a > parameter "kasconfig", which when set emits a kas config file for the > current test. This can be used in kas to interactively work with the > test configuration and set of targets. > > Signed-off-by: Felix Moessbauer > --- > testsuite/README.md | 4 +++ > testsuite/cibase.py | 66 +++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 70 insertions(+) > > diff --git a/testsuite/README.md b/testsuite/README.md > index e65a5279..bd9e998a 100644 > --- a/testsuite/README.md > +++ b/testsuite/README.md > @@ -32,6 +32,10 @@ $ avocado run ../testsuite/citest.py -t single --max-parallel-tasks=1 -p machine > $ avocado run ../testsuite/citest.py -t single --max-parallel-tasks=1 -p machine=qemuamd64 -p distro=bullseye -p depgraph=1 > ``` > > +To generate a kas configuration for manual debugging, add `-p kasconfig=1`. > +The configuration is written when the test starts to > +`{build_dir}/kas-{testname}.yaml`. > + > ## Fast build test > > ``` > diff --git a/testsuite/cibase.py b/testsuite/cibase.py > index 033b3b19..c5bc06c3 100755 > --- a/testsuite/cibase.py > +++ b/testsuite/cibase.py > @@ -20,6 +20,9 @@ class CIBaseTest(CIBuilder): > if bool(int(self.params.get('depgraph', default=0))): > self.generate_dependency_graph(targets, reconfigure=False, **kwargs) > > + if bool(int(self.params.get('kasconfig', default=0))): > + self.generate_kas_config(targets, **kwargs) > + > self.log.info("Starting build...") > > self.bitbake(targets, should_fail=should_fail, **kwargs) > @@ -49,6 +52,69 @@ class CIBaseTest(CIBuilder): > f"{self.build_dir}/task-depends-{name}.dot" > ) > > + def generate_kas_config(self, targets, **kwargs): > + """ > + Debug helper to generate a kas config file for the current test. > + """ > + import yaml > + > + def get_config(path): > + skiptoken = ('#', 'include', 'ISAR_ROOTLESS', 'BBMULTICONFIG', 'DL_DIR', > + 'SSTATE_DIR', 'BB_HASHSERVE_DB_DIR') > + conf = open(path, 'r').readlines() > + conf = [l.strip('\n') for l in conf if not l.startswith(skiptoken) and l.strip()] > + return conf > + > + testname = re.sub(r'[^\w.-]', '_', str(self.name)) > + config_filename = f"{self.build_dir}/kas-{testname}.yaml" > + self.log.info("Generating kas config...") > + > + build_system = 'isar-rootless' \ > + if bool(int(self.params.get('rootless', default=0))) \ > + else 'isar-privileged' > + > + local_conf = get_config(f"{self.build_dir}/conf/local.conf") > + ci_conf = get_config(f"{self.build_dir}/conf/ci_build.conf") > + > + # parse distro and machine from local.conf > + assignment = r'\s*(?:\?\??)?=\s*"([^"]+)"' > + local_conf_text = '\n'.join(local_conf) > + distro = re.search(r'DISTRO' + assignment, local_conf_text).group(1) > + machine = re.search(r'MACHINE' + assignment, local_conf_text).group(1) > + local_conf = [l for l in local_conf if not l.startswith(('DISTRO', 'MACHINE'))] > + > + class LiteralStr(str): > + pass > + > + def literal_str_representer(dumper, data): > + return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|') > + > + yaml.add_representer(LiteralStr, literal_str_representer) > + > + cfg = { > + 'header': {'version': 23}, > + 'build_system': build_system, > + 'repos': { > + 'isar': { > + 'layers': { > + 'meta': {}, > + 'meta-isar': {}, > + 'meta-test': {}, > + } > + } > + }, > + 'target': targets, > + 'distro': distro, > + 'machine': machine, > + 'local_conf_header': { > + '10-local': LiteralStr('\n'.join(local_conf)), > + '20-ci': LiteralStr('\n'.join(ci_conf)), > + } > + } > + > + with open(config_filename, 'w') as f: > + yaml.dump(cfg, f) > + > def perform_wic_partition_test(self, targets, wic_deploy_parts, **kwargs): > self.configure(targets=targets, wic_deploy_parts=wic_deploy_parts, **kwargs) > self.bitbake(targets, **kwargs) -- 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/1a6485e3-9e46-476f-9d39-5c4afbc7a98b%40ilbers.de.