From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: ross.burton@arm.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oeqa/sdk: add out-of-tree kernel module building test
Date: Mon, 15 Jul 2024 13:31:15 +0300 [thread overview]
Message-ID: <ZpT6c4hgYV6xIJsf@nuoska> (raw)
In-Reply-To: <20240712184358.3103083-1-ross.burton@arm.com>
Hi,
On Fri, Jul 12, 2024 at 07:43:58PM +0100, Ross Burton via lists.openembedded.org wrote:
> Validate that out-of-tree kernel module building using kernel-devsrc
> works as expected.
>
> This test uses cryptodev-linux as a idiomatic out of tree module. As the
> latest release doesn't actually build with kernel 6.7+, use the same
> commit that our recipe uses.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> meta/lib/oeqa/sdk/cases/kmod.py | 41 +++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
> create mode 100644 meta/lib/oeqa/sdk/cases/kmod.py
>
> diff --git a/meta/lib/oeqa/sdk/cases/kmod.py b/meta/lib/oeqa/sdk/cases/kmod.py
> new file mode 100644
> index 00000000000..9e8fdbcd403
> --- /dev/null
> +++ b/meta/lib/oeqa/sdk/cases/kmod.py
> @@ -0,0 +1,41 @@
> +#
> +# Copyright OpenEmbedded Contributors
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +import os
> +import subprocess
> +import tempfile
> +import unittest
> +
> +from oeqa.sdk.case import OESDKTestCase
> +from oeqa.utils.subprocesstweak import errors_have_output
> +errors_have_output()
> +
> +class KernelModuleTest(OESDKTestCase):
> + """
> + Test that out-of-tree kernel modules build.
> + """
> +
> + def setUp(self):
> + if not self.tc.hasTargetPackage("kernel-devsrc"):
> + raise unittest.SkipTest("KernelModuleTest needs kernel-devsrc")
> +
> + # These targets need to be built before kernel modules can be built.
> + self._run("make -j -C $OECORE_TARGET_SYSROOT/usr/src/kernel prepare scripts")
> +
> +
> + def test_cryptodev(self):
> + with tempfile.TemporaryDirectory(prefix="cryptodev", dir=self.tc.sdk_dir) as testdir:
> + git_url = "https://github.com/cryptodev-linux/cryptodev-linux"
> + # This is a knnown-good commit post-1.13 that builds with kernel 6.7+
> + git_sha = "bb8bc7cf60d2c0b097c8b3b0e807f805b577a53f"
> +
> + sourcedir = os.path.join(testdir, "cryptodev-linux")
> + subprocess.check_output(["git", "clone", git_url, sourcedir], stderr=subprocess.STDOUT)
Is there any way to cache this, e.g. yocto build download cache?
Adding Internet downloads to test steps is a bad design IMO which eventually
causes a lot of failures.
Cheers,
next prev parent reply other threads:[~2024-07-15 10:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 18:43 [PATCH] oeqa/sdk: add out-of-tree kernel module building test Ross Burton
2024-07-15 10:31 ` Mikko Rapeli [this message]
2024-07-15 11:18 ` [OE-core] " Ross Burton
2024-07-15 11:30 ` Mikko Rapeli
[not found] ` <17E25F9219ACA60A.6120@lists.openembedded.org>
2024-07-15 11:35 ` Mikko Rapeli
2024-07-15 13:06 ` Ross Burton
2024-07-15 13:13 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZpT6c4hgYV6xIJsf@nuoska \
--to=mikko.rapeli@linaro.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox