* [meta-virtualization][PATCH] cri-o: Add CONTAINER_DEFAULT_RUNTIME to run-ptest
@ 2025-03-11 6:56 peng.zhang1.cn
2025-03-20 19:28 ` Bruce Ashfield
0 siblings, 1 reply; 3+ messages in thread
From: peng.zhang1.cn @ 2025-03-11 6:56 UTC (permalink / raw)
To: meta-virtualization
From: Zhang Peng <peng.zhang1.cn@windriver.com>
CRI-O version 1.31 and later defaults to crun instead of runc.
This change cause ptests to fail if crun is not installed on the
target system, as the test runner verifies the runtime's availability
using 'command -v "$CONTAINER_DEFAULT_RUNTIME"'.
Additionally, CRI-O specifies the runtime via the
VIRTUAL-RUNTIME_container_runtime variable as a dependency.
This commit explicitly sets the CONTAINER_DEFAULT_RUNTIME environment
variable within the run-ptest script, based on the value of
VIRTUAL-RUNTIME_container_runtime. This ensures ptests execute with
the expected container runtime.
Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
---
recipes-containers/cri-o/cri-o_git.bb | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb
index 1ef32ab0..4622e8d7 100644
--- a/recipes-containers/cri-o/cri-o_git.bb
+++ b/recipes-containers/cri-o/cri-o_git.bb
@@ -117,6 +117,16 @@ do_install_ptest() {
install -d ${D}${PTEST_PATH}/bin
cp -rf ${S}/src/import/test ${D}${PTEST_PATH}
cp -rf ${S}/src/import/bin ${D}${PTEST_PATH}
+ # CRI-O testing changed the default container runtime from runc to crun in version 1.31+.
+ # To maintain compatibility with older tests expecting runc, and to allow for other custom runtimes,
+ # this section explicitly sets CONTAINER_DEFAULT_RUNTIME in the run-ptest script.
+ # The value is determined by the VIRTUAL-RUNTIME_container_runtime variable.
+ if [ "${VIRTUAL-RUNTIME_container_runtime}" = "virtual-runc" ]; then
+ sed -i '/^.\/test\/test_runner/iexport CONTAINER_DEFAULT_RUNTIME=runc' ${D}${PTEST_PATH}/run-ptest
+ else
+ sed -i '/^.\/test\/test_runner/iexport CONTAINER_DEFAULT_RUNTIME=${VIRTUAL-RUNTIME_container_runtime}' ${D}${PTEST_PATH}/run-ptest
+ fi
+
}
FILES:${PN}-config = "${sysconfdir}/crio/config/*"
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-virtualization][PATCH] cri-o: Add CONTAINER_DEFAULT_RUNTIME to run-ptest
2025-03-11 6:56 [meta-virtualization][PATCH] cri-o: Add CONTAINER_DEFAULT_RUNTIME to run-ptest peng.zhang1.cn
@ 2025-03-20 19:28 ` Bruce Ashfield
2025-03-21 10:09 ` Peng Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2025-03-20 19:28 UTC (permalink / raw)
To: peng.zhang1.cn; +Cc: meta-virtualization
[-- Attachment #1: Type: text/plain, Size: 3012 bytes --]
I haven't forgotten about this, I'm just overloaded trying to complete some
package upgrades and will get to pending patches shortly.
Bruce
On Tue, Mar 11, 2025 at 2:57 AM Zhang, Peng (Paul) (CN) via
lists.yoctoproject.org <peng.zhang1.cn=windriver.com@lists.yoctoproject.org>
wrote:
> From: Zhang Peng <peng.zhang1.cn@windriver.com>
>
> CRI-O version 1.31 and later defaults to crun instead of runc.
> This change cause ptests to fail if crun is not installed on the
> target system, as the test runner verifies the runtime's availability
> using 'command -v "$CONTAINER_DEFAULT_RUNTIME"'.
>
> Additionally, CRI-O specifies the runtime via the
> VIRTUAL-RUNTIME_container_runtime variable as a dependency.
>
> This commit explicitly sets the CONTAINER_DEFAULT_RUNTIME environment
> variable within the run-ptest script, based on the value of
> VIRTUAL-RUNTIME_container_runtime. This ensures ptests execute with
> the expected container runtime.
>
> Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
> ---
> recipes-containers/cri-o/cri-o_git.bb | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/recipes-containers/cri-o/cri-o_git.bb
> b/recipes-containers/cri-o/cri-o_git.bb
> index 1ef32ab0..4622e8d7 100644
> --- a/recipes-containers/cri-o/cri-o_git.bb
> +++ b/recipes-containers/cri-o/cri-o_git.bb
> @@ -117,6 +117,16 @@ do_install_ptest() {
> install -d ${D}${PTEST_PATH}/bin
> cp -rf ${S}/src/import/test ${D}${PTEST_PATH}
> cp -rf ${S}/src/import/bin ${D}${PTEST_PATH}
> + # CRI-O testing changed the default container runtime from runc to
> crun in version 1.31+.
> + # To maintain compatibility with older tests expecting runc, and to
> allow for other custom runtimes,
> + # this section explicitly sets CONTAINER_DEFAULT_RUNTIME in the
> run-ptest script.
> + # The value is determined by the VIRTUAL-RUNTIME_container_runtime
> variable.
> + if [ "${VIRTUAL-RUNTIME_container_runtime}" = "virtual-runc" ]; then
> + sed -i '/^.\/test\/test_runner/iexport
> CONTAINER_DEFAULT_RUNTIME=runc' ${D}${PTEST_PATH}/run-ptest
> + else
> + sed -i '/^.\/test\/test_runner/iexport
> CONTAINER_DEFAULT_RUNTIME=${VIRTUAL-RUNTIME_container_runtime}'
> ${D}${PTEST_PATH}/run-ptest
> + fi
> +
> }
>
> FILES:${PN}-config = "${sysconfdir}/crio/config/*"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9162):
> https://lists.yoctoproject.org/g/meta-virtualization/message/9162
> Mute This Topic: https://lists.yoctoproject.org/mt/111635727/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [
> bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
[-- Attachment #2: Type: text/html, Size: 4847 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-virtualization][PATCH] cri-o: Add CONTAINER_DEFAULT_RUNTIME to run-ptest
2025-03-20 19:28 ` Bruce Ashfield
@ 2025-03-21 10:09 ` Peng Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Peng Zhang @ 2025-03-21 10:09 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: meta-virtualization
[-- Attachment #1: Type: text/plain, Size: 5489 bytes --]
Hi, Bruce
Thanks very much!
Paul
On 3/21/25 03:28, Bruce Ashfield wrote:
> **
> *CAUTION: This email comes from a non Wind River email account!*
> Do not click links or open attachments unless you recognize the sender
> and know the content is safe.
> I haven't forgotten about this, I'm just overloaded trying to complete
> some package upgrades and will get to pending patches shortly.
>
> Bruce
>
> On Tue, Mar 11, 2025 at 2:57 AM Zhang, Peng (Paul) (CN) via
> lists.yoctoproject.org
> <https://urldefense.com/v3/__http://lists.yoctoproject.org__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO01UWXkj4$>
> <peng.zhang1.cn
> <https://urldefense.com/v3/__http://peng.zhang1.cn__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0x6vyBnP$>=windriver.com@lists.yoctoproject.org>
> wrote:
>
> From: Zhang Peng <peng.zhang1.cn@windriver.com>
>
> CRI-O version 1.31 and later defaults to crun instead of runc.
> This change cause ptests to fail if crun is not installed on the
> target system, as the test runner verifies the runtime's availability
> using 'command -v "$CONTAINER_DEFAULT_RUNTIME"'.
>
> Additionally, CRI-O specifies the runtime via the
> VIRTUAL-RUNTIME_container_runtime variable as a dependency.
>
> This commit explicitly sets the CONTAINER_DEFAULT_RUNTIME environment
> variable within the run-ptest script, based on the value of
> VIRTUAL-RUNTIME_container_runtime. This ensures ptests execute with
> the expected container runtime.
>
> Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
> ---
> recipes-containers/cri-o/cri-o_git.bb
> <https://urldefense.com/v3/__http://cri-o_git.bb__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0285Nrba$>
> | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/recipes-containers/cri-o/cri-o_git.bb
> <https://urldefense.com/v3/__http://cri-o_git.bb__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0285Nrba$>
> b/recipes-containers/cri-o/cri-o_git.bb
> <https://urldefense.com/v3/__http://cri-o_git.bb__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0285Nrba$>
> index 1ef32ab0..4622e8d7 100644
> --- a/recipes-containers/cri-o/cri-o_git.bb
> <https://urldefense.com/v3/__http://cri-o_git.bb__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0285Nrba$>
> +++ b/recipes-containers/cri-o/cri-o_git.bb
> <https://urldefense.com/v3/__http://cri-o_git.bb__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0285Nrba$>
> @@ -117,6 +117,16 @@ do_install_ptest() {
> install -d ${D}${PTEST_PATH}/bin
> cp -rf ${S}/src/import/test ${D}${PTEST_PATH}
> cp -rf ${S}/src/import/bin ${D}${PTEST_PATH}
> + # CRI-O testing changed the default container runtime from
> runc to crun in version 1.31+.
> + # To maintain compatibility with older tests expecting runc,
> and to allow for other custom runtimes,
> + # this section explicitly sets CONTAINER_DEFAULT_RUNTIME in
> the run-ptest script.
> + # The value is determined by the
> VIRTUAL-RUNTIME_container_runtime variable.
> + if [ "${VIRTUAL-RUNTIME_container_runtime}" = "virtual-runc"
> ]; then
> + sed -i '/^.\/test\/test_runner/iexport
> CONTAINER_DEFAULT_RUNTIME=runc' ${D}${PTEST_PATH}/run-ptest
> + else
> + sed -i '/^.\/test\/test_runner/iexport
> CONTAINER_DEFAULT_RUNTIME=${VIRTUAL-RUNTIME_container_runtime}'
> ${D}${PTEST_PATH}/run-ptest
> + fi
> +
> }
>
> FILES:${PN}-config = "${sysconfdir}/crio/config/*"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9162):
> https://lists.yoctoproject.org/g/meta-virtualization/message/9162
> <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/meta-virtualization/message/9162__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0xPfE-7k$>
> Mute This Topic:
> https://lists.yoctoproject.org/mt/111635727/1050810
> <https://urldefense.com/v3/__https://lists.yoctoproject.org/mt/111635727/1050810__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO0z9cDloz$>
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> <mailto:meta-virtualization%2Bowner@lists.yoctoproject.org>
> Unsubscribe:
> https://lists.yoctoproject.org/g/meta-virtualization/unsub
> <https://urldefense.com/v3/__https://lists.yoctoproject.org/g/meta-virtualization/unsub__;!!AjveYdw8EvQ!fyjHHpqvIL2T09f253eB3Gu5TOFkR8-UdswtupGd91EHYkU-Czz9qwcoyUst6aWoDXNEG-w3uvr3l_blq8lxfsBO01u_Mjbd$>
> [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
[-- Attachment #2: Type: text/html, Size: 9153 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-21 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11 6:56 [meta-virtualization][PATCH] cri-o: Add CONTAINER_DEFAULT_RUNTIME to run-ptest peng.zhang1.cn
2025-03-20 19:28 ` Bruce Ashfield
2025-03-21 10:09 ` Peng Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).