From patchwork Wed Aug 23 06:10:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29302 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09606EE49B5 for ; Wed, 23 Aug 2023 06:10:45 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web10.5728.1692771037693507143 for ; Tue, 22 Aug 2023 23:10:38 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4b-004KVm-2X; Wed, 23 Aug 2023 09:10:34 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4b-00GacE-Hb; Wed, 23 Aug 2023 09:10:33 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 1/9] core-image-minimal: increase extra space to pass df.py oeqa runtime test Date: Wed, 23 Aug 2023 09:10:17 +0300 Message-Id: <20230823061025.3952909-1-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-1-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186549 testimage.bbclass requires that ssh communication with target works and then it runs oeqa runtime tests with that. Tests like df.py check that there is more than 5Mb free space on the rootfs on target. Sadly latest core-image-minimal only has 1.5 Mb free space if ssh-server-dropbear is added to it. Thus by default, core-image-minimal is now failing oeqa rutime df.py test. Fix this by increasing core-image-minimal rootfs size by 5Mb if testimage.bbclass is used which implies adding either ssh-server-dropbear or ssh-server-openssh to the target rootfs. Signed-off-by: Mikko Rapeli --- meta/recipes-core/images/core-image-minimal.bb | 3 +++ 1 file changed, 3 insertions(+) v2: no changes v1: https://lists.openembedded.org/g/openembedded-core/message/186423 diff --git a/meta/recipes-core/images/core-image-minimal.bb b/meta/recipes-core/images/core-image-minimal.bb index 84343adcd8..c04612bc15 100644 --- a/meta/recipes-core/images/core-image-minimal.bb +++ b/meta/recipes-core/images/core-image-minimal.bb @@ -10,3 +10,6 @@ inherit core-image IMAGE_ROOTFS_SIZE ?= "8192" IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "", d)}" + +# a bit more space needed for sshd to actually run the tests +IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("IMAGE_CLASSES", "testimage", " + 5120", "", d)}" From patchwork Wed Aug 23 06:10:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05B7BEE49B4 for ; Wed, 23 Aug 2023 06:10:45 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web11.5801.1692771037503588991 for ; Tue, 22 Aug 2023 23:10:38 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4c-004KW1-1W; Wed, 23 Aug 2023 09:10:34 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4c-00Gad1-7U; Wed, 23 Aug 2023 09:10:34 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 2/9] testimage.bbclass: detect slirp from TEST_RUNQEMUPARAMS Date: Wed, 23 Aug 2023 09:10:18 +0300 Message-Id: <20230823061025.3952909-2-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-2-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186547 Also set target and server IP addresses correctly to 127.0.0.1 so that TEST_TARGET_IP and TEST_SERVER_IP don't need to be set manually with slirp. Users run qemu images with slirp networking like this: $ bitbake core-image-minimal $ ../poky/scripts/runqemu slirp slirp networking means that only one TCP port is forwarded from host system to the qemu machine so that ssh into the machine works. ping and other low level networking from host to target machine do not work, but networking from target via host does work. This is much more easy to setup than the bridge networking used by default, which I've never managed to get running on various host machines. To use slirp networking wita qemu and core-image-minimal to run testimage.bbclass tests, add these to local.conf: IMAGE_CLASSES += "testimage" IMAGE_FEATURES += "ssh-server-dropbear" TEST_RUNQEMUPARAMS += "slirp" Then image can be compiled and tested with: $ bitbake core-image-minimal $ bitbake -c testimage core-image-minimal Note that only few of the current oeqa runtime tests work against core-image-minimal, but test results look like: RESULTS: RESULTS - date.DateTest.test_date: PASSED (3.64s) RESULTS - df.DfTest.test_df: PASSED (0.55s) RESULTS - oe_syslog.SyslogTest.test_syslog_running: PASSED (0.56s) RESULTS - oe_syslog.SyslogTestConfig.test_syslog_logger: PASSED (1.88s) RESULTS - oe_syslog.SyslogTestConfig.test_syslog_restart: PASSED (0.93s) RESULTS - pam.PamBasicTest.test_pam: PASSED (2.20s) RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (4.98s) RESULTS - ping.PingTest.test_ping: PASSED (0.05s) RESULTS - ssh.SSHTest.test_ssh: PASSED (1.28s) RESULTS - systemd.SystemdBasicTests.test_systemd_basic: PASSED (0.56s) RESULTS - systemd.SystemdBasicTests.test_systemd_failed: PASSED (1.10s) RESULTS - systemd.SystemdBasicTests.test_systemd_list: PASSED (0.92s) RESULTS - systemd.SystemdJournalTests.test_systemd_boot_time: PASSED (0.56s) RESULTS - systemd.SystemdJournalTests.test_systemd_journal: PASSED (0.54s) RESULTS - apt.AptRepoTest.test_apt_install_from_repo: SKIPPED (0.00s) RESULTS - buildcpio.BuildCpioTest.test_cpio: SKIPPED (0.00s) RESULTS - buildgalculator.GalculatorTest.test_galculator: SKIPPED (0.00s) RESULTS - buildlzip.BuildLzipTest.test_lzip: SKIPPED (0.00s) RESULTS - connman.ConnmanTest.test_connmand_help: SKIPPED (0.00s) RESULTS - connman.ConnmanTest.test_connmand_running: SKIPPED (0.00s) RESULTS - dnf.DnfBasicTest.test_dnf_help: SKIPPED (0.00s) RESULTS - dnf.DnfBasicTest.test_dnf_history: SKIPPED (0.00s) RESULTS - dnf.DnfBasicTest.test_dnf_info: SKIPPED (0.00s) RESULTS - dnf.DnfBasicTest.test_dnf_search: SKIPPED (0.00s) RESULTS - dnf.DnfBasicTest.test_dnf_version: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_exclude: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_install: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_install_dependency: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_install_from_disk: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_install_from_http: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_installroot: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_installroot_usrmerge: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_makecache: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_reinstall: SKIPPED (0.00s) RESULTS - dnf.DnfRepoTest.test_dnf_repoinfo: SKIPPED (0.00s) RESULTS - gcc.GccCompileTest.test_gcc_compile: SKIPPED (0.00s) RESULTS - gcc.GccCompileTest.test_gpp2_compile: SKIPPED (0.00s) RESULTS - gcc.GccCompileTest.test_gpp_compile: SKIPPED (0.00s) RESULTS - gcc.GccCompileTest.test_make: SKIPPED (0.00s) RESULTS - gi.GObjectIntrospectionTest.test_python: SKIPPED (0.00s) RESULTS - go.GoHelloworldTest.test_gohelloworld: SKIPPED (0.00s) RESULTS - kernelmodule.KernelModuleTest.test_kernel_module: SKIPPED (0.00s) RESULTS - ldd.LddTest.test_ldd: SKIPPED (0.00s) RESULTS - logrotate.LogrotateTest.test_logrotate_newlog: SKIPPED (0.00s) RESULTS - logrotate.LogrotateTest.test_logrotate_wtmp: SKIPPED (0.00s) RESULTS - oe_syslog.SyslogTestConfig.test_syslog_startup_config: SKIPPED (0.00s) RESULTS - opkg.OpkgRepoTest.test_opkg_install_from_repo: SKIPPED (0.00s) RESULTS - perl.PerlTest.test_perl_works: SKIPPED (0.00s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail: SKIPPED (0.00s) RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED (0.00s) RESULTS - python.PythonTest.test_python3: SKIPPED (0.00s) RESULTS - rpm.RpmBasicTest.test_rpm_help: SKIPPED (0.00s) RESULTS - rpm.RpmBasicTest.test_rpm_query: SKIPPED (0.00s) RESULTS - rpm.RpmBasicTest.test_rpm_query_nonroot: SKIPPED (0.00s) RESULTS - rpm.RpmInstallRemoveTest.test_check_rpm_install_removal_log_file_size: SKIPPED (0.00s) RESULTS - rpm.RpmInstallRemoveTest.test_rpm_install: SKIPPED (0.00s) RESULTS - rpm.RpmInstallRemoveTest.test_rpm_remove: SKIPPED (0.00s) RESULTS - rust.RustCompileTest.test_cargo_compile: SKIPPED (0.00s) RESULTS - rust.RustCompileTest.test_rust_compile: SKIPPED (0.00s) RESULTS - scp.ScpTest.test_scp_file: SKIPPED (0.00s) RESULTS - stap.StapTest.test_stap: SKIPPED (0.00s) RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable: SKIPPED (0.00s) RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable_ro: SKIPPED (0.00s) RESULTS - systemd.SystemdServiceTests.test_systemd_status: SKIPPED (0.00s) RESULTS - systemd.SystemdServiceTests.test_systemd_stop_start: SKIPPED (0.00s) RESULTS - weston.WestonTest.test_wayland_info: SKIPPED (0.00s) RESULTS - weston.WestonTest.test_weston_can_initialize_new_wayland_compositor: SKIPPED (0.00s) RESULTS - weston.WestonTest.test_weston_running: SKIPPED (0.00s) RESULTS - weston.WestonTest.test_weston_supports_xwayland: SKIPPED (0.00s) RESULTS - xorg.XorgTest.test_xorg_running: SKIPPED (0.00s) SUMMARY: core-image-minimal () - Ran 70 tests in 22.173s core-image-minimal - OK - All required tests passed (successes=14, skipped=56, failures=0, errors=0) NOTE: recipe core-image-minimal-1.0-r0: task do_testimage: Succeeded NOTE: Tasks Summary: Attempted 1305 tasks of which 1304 didn't need to be rerun and all succeeded. Signed-off-by: Mikko Rapeli --- meta/classes-recipe/testimage.bbclass | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) v2: set TEST_SERVER_IP correctly to default qemu dhcp server IP 10.0.2.2 so that testimage selftests pass v1: https://lists.openembedded.org/g/openembedded-core/message/186424 diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index e3068348ff..7340996788 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass @@ -322,7 +322,7 @@ def testimage_main(d): ovmf = d.getVar("QEMU_USE_OVMF") slirp = False - if d.getVar("QEMU_USE_SLIRP"): + if d.getVar("QEMU_USE_SLIRP") or bb.utils.contains('TEST_RUNQEMUPARAMS', 'slirp', True, False, d): slirp = True # TODO: We use the current implementation of qemu runner because of @@ -369,10 +369,18 @@ def testimage_main(d): # runtime use network for download projects for build export_proxies(d) + if slirp: + target_ip = "127.0.0.1" + # from qemu target to host with default DHCP server + server_ip = "10.0.2.2" + else: + target_ip = d.getVar("TEST_TARGET_IP") + server_ip = d.getVar("TEST_SERVER_IP") + # the robot dance target = OERuntimeTestContextExecutor.getTarget( - d.getVar("TEST_TARGET"), logger, d.getVar("TEST_TARGET_IP"), - d.getVar("TEST_SERVER_IP"), **target_kwargs) + d.getVar("TEST_TARGET"), logger, target_ip, + server_ip, **target_kwargs) # test context tc = OERuntimeTestContext(td, logger, target, image_packages, extract_dir) From patchwork Wed Aug 23 06:10:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDE88EE49B1 for ; Wed, 23 Aug 2023 06:10:44 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web10.5730.1692771037853260341 for ; Tue, 22 Aug 2023 23:10:38 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4d-004KWH-0Y; Wed, 23 Aug 2023 09:10:35 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4c-00GaeW-U3; Wed, 23 Aug 2023 09:10:34 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 3/9] selftest runtime_test.py: add testimage.bbclass slirp test Date: Wed, 23 Aug 2023 09:10:19 +0300 Message-Id: <20230823061025.3952909-3-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-3-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186550 Builds core-image-minimal with testimage.bbclass and an ssh server and then runs tests with slirp networking. Default test suite must pass. With full caches on x86_64 with x86_64 target the test passes in 416 seconds: 2023-08-21 09:01:12,295 - oe-selftest - INFO - Ran 1 test in 464.955s 2023-08-21 09:01:12,295 - oe-selftest - INFO - OK 2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS: 2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS - runtime_test.TestImage.test_testimage_slirp: PASSED (416.62s) 2023-08-21 09:01:19,711 - oe-selftest - INFO - SUMMARY: 2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 464.956s 2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0) Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/selftest/cases/runtime_test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) v2: use :append instead of overwriting variables v1: https://lists.openembedded.org/g/openembedded-core/message/186427 diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 463679dd32..19c8f0e9ec 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -129,6 +129,21 @@ class TestImage(OESelftestTestCase): bitbake('core-image-full-cmdline socat') bitbake('-c testimage core-image-full-cmdline') + def test_testimage_slirp(self): + """ + Summary: Check basic testimage functionality with qemu and slirp networking. + """ + + features = ''' +IMAGE_CLASSES:append = " testimage" +IMAGE_FEATURES:append = " ssh-server-dropbear" +TEST_RUNQEMUPARAMS:append = " slirp" +''' + self.write_config(features) + + bitbake('core-image-minimal') + bitbake('-c testimage core-image-minimal') + def test_testimage_dnf(self): """ Summary: Check package feeds functionality for dnf From patchwork Wed Aug 23 06:10:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06AC5EE49B6 for ; Wed, 23 Aug 2023 06:10:45 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web10.5729.1692771037715473578 for ; Tue, 22 Aug 2023 23:10:38 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4d-004KWZ-2h; Wed, 23 Aug 2023 09:10:36 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4d-00Gaf5-JD; Wed, 23 Aug 2023 09:10:35 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 4/9] oeqa dnf_runtime.py: fix HTTP server IP address and port Date: Wed, 23 Aug 2023 09:10:20 +0300 Message-Id: <20230823061025.3952909-4-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-4-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186548 Use correct HTTPService parameters like apt.py when setting up the repo server. These work with qemu tun and slirp networking. Fixes test failure with slirp networking when executing testimage.bbclass selftests "oe-selftest -r runtime_test.TestImage". Signed-off-by: Mikko Rapeli --- meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py index 64a3502370..d2f0f88f7d 100644 --- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py +++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py @@ -10,7 +10,8 @@ class DnfSelftest(DnfTest): import tempfile cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-") cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'), - cls.tc.target.server_ip) + '0.0.0.0', port=cls.tc.target.server_port, + logger=cls.tc.logger) cls.repo_server.start() @classmethod From patchwork Wed Aug 23 06:10:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D93B1EE49A0 for ; Wed, 23 Aug 2023 06:10:44 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web11.5802.1692771038046058144 for ; Tue, 22 Aug 2023 23:10:38 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4e-004KWu-1S; Wed, 23 Aug 2023 09:10:36 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4e-00Gagp-6p; Wed, 23 Aug 2023 09:10:36 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 5/9] oeqa selftest context.py: whitespace fix Date: Wed, 23 Aug 2023 09:10:21 +0300 Message-Id: <20230823061025.3952909-5-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-5-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186546 Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/selftest/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index f2a5ba792f..4b33245758 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py @@ -226,14 +226,14 @@ class OESelftestTestContextExecutor(OETestContextExecutor): machines = [] bbpath = self.tc_kwargs['init']['td']['BBPATH'].split(':') - + for path in bbpath: found_machines = glob.glob(os.path.join(path, 'conf', 'machine', '*.conf')) if found_machines: for i in found_machines: # eg: '/home//poky/meta-intel/conf/machine/intel-core2-32.conf' machines.append(os.path.splitext(os.path.basename(i))[0]) - + return machines def _get_cases_paths(self, bbpath): From patchwork Wed Aug 23 06:10:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29298 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E86BEEE49AE for ; Wed, 23 Aug 2023 06:10:44 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web11.5803.1692771038676488532 for ; Tue, 22 Aug 2023 23:10:39 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4f-004KXK-0Q; Wed, 23 Aug 2023 09:10:37 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4e-00Gail-SI; Wed, 23 Aug 2023 09:10:36 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 6/9] oeqa selftest context.py: remove warning from missing meta-selftest Date: Wed, 23 Aug 2023 09:10:22 +0300 Message-Id: <20230823061025.3952909-6-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-6-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186551 It's not a warning but a handled case and layer gets added automatically. Very few build configs have this layer enabled by default. Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/selftest/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 4b33245758..bd03e765b0 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py @@ -306,7 +306,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor): os.chdir(builddir) if not "meta-selftest" in self.tc.td["BBLAYERS"]: - self.tc.logger.warning("meta-selftest layer not found in BBLAYERS, adding it") + self.tc.logger.info("meta-selftest layer not found in BBLAYERS, adding it") meta_selftestdir = os.path.join( self.tc.td["BBLAYERS_FETCH_DIR"], 'meta-selftest') if os.path.isdir(meta_selftestdir): From patchwork Wed Aug 23 06:10:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBA3EEE49B2 for ; Wed, 23 Aug 2023 06:10:44 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web11.5805.1692771039236572077 for ; Tue, 22 Aug 2023 23:10:39 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4f-004KXc-2A; Wed, 23 Aug 2023 09:10:37 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4f-00Gal6-Dj; Wed, 23 Aug 2023 09:10:37 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 7/9] oeqa selftest context.py: fix git commands and set branch name Date: Wed, 23 Aug 2023 09:10:23 +0300 Message-Id: <20230823061025.3952909-7-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-7-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186552 Check return values of each git command and set initial branch name to avoid this warning on every test run: NOTE: Starting bitbake server... hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/selftest/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index bd03e765b0..bc3915a3aa 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py @@ -104,7 +104,7 @@ class OESelftestTestContext(OETestContext): oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") oe.path.copytree(selftestdir, newselftestdir) - subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) + subprocess.check_output("git init -b main && git add * && git commit -a -m 'initial'", cwd=newselftestdir, shell=True) # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) From patchwork Wed Aug 23 06:10:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEDBDEE49B0 for ; Wed, 23 Aug 2023 06:10:44 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web10.5731.1692771039816966428 for ; Tue, 22 Aug 2023 23:10:40 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4g-004KY3-0q; Wed, 23 Aug 2023 09:10:38 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4g-00Gamr-0V; Wed, 23 Aug 2023 09:10:38 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 8/9] oeqa selftest runtime_test.py: append to TEST_RUNQEMUPARAMS Date: Wed, 23 Aug 2023 09:10:24 +0300 Message-Id: <20230823061025.3952909-8-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-8-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186553 Don't overwrite TEST_RUNQEMUPARAMS since user may have added "slirp" or similar things to it in site.conf, auto.conf or local.conf. Use :append to add to it. Fixes failing tests when only "slirp" networking works with qemu and tun based one is broken on the host machine. Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/selftest/cases/runtime_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 19c8f0e9ec..5f90bc658f 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -251,11 +251,11 @@ TEST_RUNQEMUPARAMS:append = " slirp" features += 'TEST_SUITES = "ping ssh virgl"\n' features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n' features += 'IMAGE_INSTALL:append = " kmscube"\n' - features_gtk = features + 'TEST_RUNQEMUPARAMS = "gtk gl"\n' + features_gtk = features + 'TEST_RUNQEMUPARAMS:append = " gtk gl"\n' self.write_config(features_gtk) bitbake('core-image-minimal') bitbake('-c testimage core-image-minimal') - features_sdl = features + 'TEST_RUNQEMUPARAMS = "sdl gl"\n' + features_sdl = features + 'TEST_RUNQEMUPARAMS:append = " sdl gl"\n' self.write_config(features_sdl) bitbake('core-image-minimal') bitbake('-c testimage core-image-minimal') @@ -283,7 +283,7 @@ TEST_RUNQEMUPARAMS:append = " slirp" features += 'TEST_SUITES = "ping ssh virgl"\n' features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n' features += 'IMAGE_INSTALL:append = " kmscube"\n' - features += 'TEST_RUNQEMUPARAMS = "egl-headless"\n' + features += 'TEST_RUNQEMUPARAMS:append = " egl-headless"\n' self.write_config(features) bitbake('core-image-minimal') bitbake('-c testimage core-image-minimal') From patchwork Wed Aug 23 06:10:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 29296 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB275EE49A3 for ; Wed, 23 Aug 2023 06:10:44 +0000 (UTC) Received: from mail.kapsi.fi (mail.kapsi.fi [91.232.154.25]) by mx.groups.io with SMTP id smtpd.web11.5806.1692771040414768928 for ; Tue, 22 Aug 2023 23:10:40 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: lakka.kapsi.fi, ip: 91.232.154.25, mailfrom: mcfrisk@lakka.kapsi.fi) Received: from kapsi.fi ([2001:67c:1be8::11] helo=lakka.kapsi.fi) by mail.kapsi.fi with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYh4g-004KYW-2e; Wed, 23 Aug 2023 09:10:38 +0300 Received: from mcfrisk by lakka.kapsi.fi with local (Exim 4.94.2) (envelope-from ) id 1qYh4g-00Gamy-It; Wed, 23 Aug 2023 09:10:38 +0300 From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 9/9] oeqa selftest runtime_test.py: skip virgl_headless test if /dev/dri/renderD128 access fails Date: Wed, 23 Aug 2023 09:10:25 +0300 Message-Id: <20230823061025.3952909-9-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230823061025.3952909-1-mikko.rapeli@linaro.org> References: <20230823061025.3952909-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 X-Rspam-Score: -1.4 (-) X-Rspam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: DMARC_POLICY_SOFTFAIL(0.10) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_MISSING_CHARSET(0.50) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: RCPT_COUNT_TWO(0.00) Symbol: MID_CONTAINS_FROM(1.00) Symbol: NEURAL_HAM(0.00) Symbol: FORGED_SENDER(0.30) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: FROM_NEQ_ENVFROM(0.00) Symbol: BAYES_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Message-ID: 20230823061025.3952909-9-mikko.rapeli@linaro.org X-SA-Exim-Connect-IP: 2001:67c:1be8::11 X-SA-Exim-Mail-From: mcfrisk@lakka.kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 06:10:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186554 If access to /dev/dri/renderD128 fails, then qemu with 3d graphics will fail to start and errors are rather cryptic like: qemu-system-x86_64: egl: render node init failed To fix this, users likely need to * modprobe vgem * add their user to "render" group to write to /dev/dri/renderD128 If access is not available due to missing HW, driver or failing access, then skip the test: 2023-08-22 14:41:20,591 - oe-selftest - INFO - test_testimage_virgl_headless (runtime_test.TestImage) 2023-08-22 14:41:20,603 - oe-selftest - INFO - ... skipped 'Can not open "/dev/dri/renderD128" device' 2023-08-22 14:41:20,603 - oe-selftest - INFO - Can not open "/dev/dri/renderD128" device Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/selftest/cases/runtime_test.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 5f90bc658f..e72504773a 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -264,7 +264,8 @@ TEST_RUNQEMUPARAMS:append = " slirp" def test_testimage_virgl_headless(self): """ Summary: Check host-assisted accelerate OpenGL functionality in qemu with egl-headless frontend - Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled + Expected: 1. Check that virgl kernel driver is loaded (modprobe vgem, user part of "render" group and + can open /dev/dri/renderD* device) and 3d acceleration is enabled 2. Check that kmscube demo runs without crashing. Product: oe-core Author: Alexander Kanavin @@ -276,6 +277,14 @@ TEST_RUNQEMUPARAMS:append = " slirp" distro.startswith('almalinux') or distro.startswith('rocky')): self.skipTest('virgl headless cannot be tested with %s' %(distro)) + # test requires vgem driver and possibly "render" group rights to access device file + render_dev = "/dev/dri/renderD128" + try: + with open(render_dev, "w") as f: + f.close() + except IOError: + self.skipTest('Can not open "%s" device' % (render_dev)) + qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native') features = 'IMAGE_CLASSES += "testimage"\n' if 'opengl' not in qemu_distrofeatures: