Hello Everyone,

Some background for the patches that I send.
I am continuing the initial work from Pascal with netavark and I adapted the 
podman recipe to integrate with netavark, aardvark-dns and crun. To activate 
them, it has to be done probably from your distro overwrites and do something 
like:
```
DEFAULT_CONTAINER_RUNTIME:pn-podman = "crun"
DEFAULT_NETWORK_STACK:pn-podman = "netavark"
```
For the moment I kept the backwards compatibility and it is an opt-in change. 
But maybe we should consider changing the default behaviour, because fedora is 
already shipping with crun, netavark, and aardvark-dns by default.

Furthermore, I had some problems with the tests (even without my changes). When 
I tried to execute the podman tests in the device I was getting:
```
START: ptest-runner
2022-10-17T09:38
BEGIN: /usr/lib/podman/ptest
Makefile:176: *** Required variable NATIVE_GOOS value is undefined, whitespace, 
or empty.  Stop.

ERROR: Exit status is 2
DURATION: 0
END: /usr/lib/podman/ptest
2022-10-17T09:38
STOP: ptest-runner
TOTAL: 1 FAIL: 1
```
It is a minor problem, but even when I executed the tests manually I still had 
many of them failing

```
root@cxg3:~# cd /usr/lib/podman/ptest
root@cxg3:/usr/lib/podman/ptest# bats ./test/system/ ...
373 tests, 77 failures, 38 skipped, 15 not run
 ``` 

Do we have to set up the device in a specific way? Is there an example on how 
to deploy podman on a device?

Finally, I was wondering if there are any plans on back-porting podman 4.2 to 
the kirkstone branch? Is that something of interest, or do we prefer to avoid 
it?

Kind regards,
Vasileios

-----Original Message-----
From: [email protected] 
<[email protected]> On Behalf Of Vasileios 
Anagnostopoulos via lists.yoctoproject.org
Sent: Monday, 17 October 2022 13:11
To: [email protected]
Cc: Anagnostopoulos, Vasileios (SI BP R&D ZG FW ITW) 
<[email protected]>
Subject: [meta-virtualization][PATCH 7/7] aardvark-dns: Add ptest support

---
 .../aardvark-dns/aardvark-dns.inc             | 24 +++++++++++++++++++
 .../aardvark-dns/files/run-ptest              |  3 +++
 2 files changed, 27 insertions(+)
 create mode 100644 recipes-containers/aardvark-dns/files/run-ptest

diff --git a/recipes-containers/aardvark-dns/aardvark-dns.inc 
b/recipes-containers/aardvark-dns/aardvark-dns.inc
index 4123a2d..70c94dd 100644
--- a/recipes-containers/aardvark-dns/aardvark-dns.inc
+++ b/recipes-containers/aardvark-dns/aardvark-dns.inc
@@ -1,6 +1,30 @@
+inherit ptest
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
 # Cargo installs the binary to bin so move it to where podman expects it
 do_install:append() {
     install -d ${D}${libexecdir}/podman/
     mv ${D}${bindir}/* ${D}${libexecdir}/podman/
     rm -rf ${D}${bindir}/
 }
+
+
+do_install_ptest () {
+       cp -r ${S}/test ${D}${PTEST_PATH}
+}
+
+RDEPENDS:${PN}-ptest += " \
+    bats \
+    bash \
+    coreutils \
+    jq \
+    iproute2 \
+    slirp4netns \
+    dbus-daemon-proxy \
+    util-linux-unshare \
+    bind-utils \
+    ipcalc \
+"
diff --git a/recipes-containers/aardvark-dns/files/run-ptest 
b/recipes-containers/aardvark-dns/files/run-ptest
new file mode 100644
index 0000000..b33d8fd
--- /dev/null
+++ b/recipes-containers/aardvark-dns/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+NETAVARK=/usr/libexec/podman/netavark 
+AARDVARK=/usr/libexec/podman/aardvark-dns bats ./test/
--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7660): 
https://lists.yoctoproject.org/g/meta-virtualization/message/7660
Mute This Topic: https://lists.yoctoproject.org/mt/94381678/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to