Skip to contentSkip to conversation

ofono: upgrade 2.7 -> 2.8

PATCH Superseded Martin Hundebøll 2 participants 6 messages Jun 17, 2024 – Jun 18, 2024 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ofono: upgrade 2.7 -> 2.8

Changelog:
* Release 2.8
* build: Require at least version 0.66 when building with external ELL
* qmi: Remove unused shutdown members in qmi_device_qrtr
* drivers: Use the new license header format
* plugins: Use the new license header format
* isimodem: Use the new license header format
* rilmodem: Use the new license header format
* mbimmodem: Use the new license header format
* unit: Use the new license header format
* tools: Use the new license header format
* include: Use the new license header format
* dundee: Use the new license header format
* core: Use the new license header format
* qmimodem: Use the new license header format
* atmodem: Use the new license header format
* build: Add notifylist.[ch] from ell
* udevng: Fix detection of USB attached tty devices
* udevng: Don't crash for non-QMI devices
* qmimodem: Remove the create exclusive service API
* voicecall: Fix use after free
* atmodem: gprs-context: use default PPP ACCM for Quectel serial modems
* atmodem: sim: Fix CRSM result handling
* qmi: gprs-context: support bind_mux for pcie devices
* udevng: Add mhi subsystem detection
* udevng: add and use get_ifname() for netdev nodes
* gobi: ensure required properties are provided
* gobi: Rename KernelDriver to NetworkInterfaceDriver
* gobi: add / use DeviceProtocol property
* qmi: Use l_basename instead of basename
* log: Use l_basename instead of basename
* build: link dundee with ell
* log: Handle dladdr failure

License-Update: license header replaced with spdx identifier

---
 .../recipes-connectivity/ofono/{ofono_2.7.bb => ofono_2.8.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-connectivity/ofono/{ofono_2.7.bb => ofono_2.8.bb} (89%)
meta/recipes-connectivity/ofono/ofono_2.8.bb renamed from meta/recipes-connectivity/ofono/ofono_2.7.bb +2 -2
similarity index 89%
rename from meta/recipes-connectivity/ofono/ofono_2.7.bb
rename to meta/recipes-connectivity/ofono/ofono_2.8.bb
index bc1f3efd04db..809485d42178 100644
@@ -4,14 +4,14 @@ HOMEPAGE = "http://www.ofono.org"
 BUGTRACKER = "https://01.org/jira/browse/OF"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
-                    file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee"
+                    file://src/ofono.h;beginline=1;endline=6;md5=13e42133935ceecfc9bcb547f256e277"
 DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell"
 
 SRC_URI = "\
     ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
     file://ofono \
 "
-SRC_URI[sha256sum] = "dabf6ef06b94beaad65253200abe3887046a4e722f4fe373c4264f357ae47ad3"
+SRC_URI[sha256sum] = "b5aef455b3a374ce43bad43c2ade9d0430d9c0d28952385c44ac7d0dc933bbb8"
 
 inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data
 
Signature · 1 line
2.45.2
#1 lore raw

PATCH 2/3 ell: add ptest

Depends on openssl-native and xxd-native to allow generating certificates used for testing.

Create the ${B}/unit dir as that seems to be missing with the automake patches used for building tests separately from running them.

In order to build the test cases, both --enable-tests and --enable-maintainer-mode must be passed to configure.

A few unit tests looks for files in ../ell-0.66/unit (i.e. $(top_srcdir) in automake) when running. Instead of playing games with symlinks or install paths, the "correct" path is just (re)defined in CFLAGS.

A (submitted) patch is added to make dbus-server run correctly when testing with "nonetwork" passed to runqemu.

Skip a few tests that require additional kernel modules to be enabled.

Test execution time is about 10 seconds.

---
 .../distro/include/ptest-packagelists.inc     |  1 +
 meta/recipes-core/ell/ell_0.66.bb             | 25 ++++++++++--
 ...-specify-tcp-hostname-in-dbus-config.patch | 38 +++++++++++++++++++
 meta/recipes-core/ell/files/run-ptest         | 23 +++++++++++
 4 files changed, 84 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-core/ell/files/0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch
 create mode 100644 meta/recipes-core/ell/files/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index da6fa6ee9723..c60575a45cc2 100644
@@ -15,6 +15,7 @@ PTESTS_FAST = "\
     cpio \
     diffstat \
     diffutils \
+    ell \
     ethtool \
     expat \
     expect \
meta/recipes-core/ell/ell_0.66.bb +22 -3
index 899e2f684936..d53db2edc189 100644
@@ -10,9 +10,28 @@ SECTION = "libs"
 LICENSE  = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
 
-DEPENDS = "dbus"
+DEPENDS = "dbus openssl-native xxd-native"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
-SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI = " \
+    https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \
+    file://0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch \
+    file://run-ptest \
+"
 SRC_URI[sha256sum] = "7a78b757080ed6518c1c4fa26ad6a7a3d6e4e385386a20b6fb52379e7d1ffa36"
+
+EXTRA_OECONF += "--enable-tests --enable-maintainer-mode"
+CFLAGS += "-UUNITDIR -DUNITDIR="\\"./unit/\\"""
+
+do_compile:prepend() {
+    mkdir -p ${B}/unit
+}
+
+do_install_ptest() {
+    install -m755 -Dt ${D}${PTEST_PATH} $(find ${B}/unit -executable -type f)
+    install -Dt ${D}${PTEST_PATH}/unit \
+        ${S}/unit/dbus.conf \
+        ${S}/unit/settings.test \
+        $(find ${B}/unit -name \*.pem -type f)
+}
meta/recipes-core/ell/files/0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch new file +38 -0
new file mode 100644
index 000000000000..328e51683215
@@ -0,0 +1,38 @@
+From d5ebbb5ea68848c5fad5517adf2f885de142a66e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <[email protected]>
+Date: Mon, 17 Jun 2024 14:14:03 +0200
+Subject: [PATCH] unit: don't specify tcp hostname in dbus config
+To: [email protected]
+
+Testing dbus with no network interfaces available on the host fails
+with:
+  dbus-daemon[291]: Failed to start message bus: Failed to lookup host/port: "*:14046": Name or service not known (-2)
+
+Seems like "*" isn't a valid hostname in such cases:
+  https://bugs.freedesktop.org/show_bug.cgi?id=28979
+
+According to the linked issue, the fix is to simply omit the host= and
+bind= parameters in the config.
+
+Signed-off-by: Martin Hundebøll <[email protected]>
+Upstream-Status: Submitted [https://lore.kernel.org/ell/[email protected]/]
+---
+ unit/dbus.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/unit/dbus.conf b/unit/dbus.conf
+index 5fe41a9ad6a6..3651e44538b1 100644
+--- a/unit/dbus.conf
++++ b/unit/dbus.conf
+@@ -7,7 +7,7 @@
+   <allow_anonymous />
+ 
+   <listen>unix:path=/tmp/ell-test-bus</listen>
+-  <listen>tcp:host=localhost,bind=*,port=14046,family=ipv4</listen>
++  <listen>tcp:port=14046</listen>
+   <apparmor mode="disabled" />
+ 
+   <policy context="default">
+-- 
+2.45.2
+
meta/recipes-core/ell/files/run-ptest new file +23 -0
new file mode 100644
index 000000000000..5b3acdd98b8a
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+ret_val=0
+
+for test in test-*; do
+    case "$test" in
+        test-pem | test-key)
+            if ! [ -d /sys/module/pkcs8_key_parser ]; then
+                echo "SKIP: $test"
+                continue
+            fi
+            ;;
+    esac
+
+    if "./$test" >> ell_test.log 2>&1; then
+        echo "PASS: $test"
+    else
+        echo "FAIL: $test"
+        ret_val=1
+    fi
+done
+
+exit $ret_val
Signature · 1 line
2.45.2
#2 lore raw

Re: [OE-core] [PATCH 2/3] ell: add ptest

Hello,

I didn't test v2 but I guess it was not updated. This caused reproducibility issues:

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20240618-sbhq7ol0/packages/diff-html/

and ptest failures:

{'ell': ['test-dbus', 'test-dbus-message-fds', 'test-dbus-properties']}

https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/6547/steps/13/logs/stdio
https://autobuilder.yocto.io/pub/non-release/20240618-14/testresults/qemuarm64-ptest/ell.log

https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/6725/steps/12/logs/stdio
https://autobuilder.yocto.io/pub/non-release/20240618-14/testresults/qemux86-64-ptest/ell.log

Quoted 164 lines · Martin Hundeb?ll

Depends on openssl-native and xxd-native to allow generating certificates used for testing.

Create the ${B}/unit dir as that seems to be missing with the automake patches used for building tests separately from running them.

In order to build the test cases, both --enable-tests and --enable-maintainer-mode must be passed to configure.

A few unit tests looks for files in ../ell-0.66/unit (i.e. $(top_srcdir) in automake) when running. Instead of playing games with symlinks or install paths, the "correct" path is just (re)defined in CFLAGS.

A (submitted) patch is added to make dbus-server run correctly when testing with "nonetwork" passed to runqemu.

Skip a few tests that require additional kernel modules to be enabled.

Test execution time is about 10 seconds.

---
 .../distro/include/ptest-packagelists.inc     |  1 +
 meta/recipes-core/ell/ell_0.66.bb             | 25 ++++++++++--
 ...-specify-tcp-hostname-in-dbus-config.patch | 38 +++++++++++++++++++
 meta/recipes-core/ell/files/run-ptest         | 23 +++++++++++
 4 files changed, 84 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-core/ell/files/0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch
 create mode 100644 meta/recipes-core/ell/files/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index da6fa6ee9723..c60575a45cc2 100644
@@ -15,6 +15,7 @@ PTESTS_FAST = "\
     cpio \
     diffstat \
     diffutils \
+    ell \
     ethtool \
     expat \
     expect \
meta/recipes-core/ell/ell_0.66.bb +22 -3
index 899e2f684936..d53db2edc189 100644
@@ -10,9 +10,28 @@ SECTION = "libs"
 LICENSE  = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
 
-DEPENDS = "dbus"
+DEPENDS = "dbus openssl-native xxd-native"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
-SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI = " \
+    https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \
+    file://0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch \
+    file://run-ptest \
+"
 SRC_URI[sha256sum] = "7a78b757080ed6518c1c4fa26ad6a7a3d6e4e385386a20b6fb52379e7d1ffa36"
+
+EXTRA_OECONF += "--enable-tests --enable-maintainer-mode"
+CFLAGS += "-UUNITDIR -DUNITDIR="\\"./unit/\\"""
+
+do_compile:prepend() {
+    mkdir -p ${B}/unit
+}
+
+do_install_ptest() {
+    install -m755 -Dt ${D}${PTEST_PATH} $(find ${B}/unit -executable -type f)
+    install -Dt ${D}${PTEST_PATH}/unit \
+        ${S}/unit/dbus.conf \
+        ${S}/unit/settings.test \
+        $(find ${B}/unit -name \*.pem -type f)
+}
meta/recipes-core/ell/files/0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch new file +38 -0
new file mode 100644
index 000000000000..328e51683215
@@ -0,0 +1,38 @@
+From d5ebbb5ea68848c5fad5517adf2f885de142a66e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <[email protected]>
+Date: Mon, 17 Jun 2024 14:14:03 +0200
+Subject: [PATCH] unit: don't specify tcp hostname in dbus config
+To: [email protected]
+
+Testing dbus with no network interfaces available on the host fails
+with:
+  dbus-daemon[291]: Failed to start message bus: Failed to lookup host/port: "*:14046": Name or service not known (-2)
+
+Seems like "*" isn't a valid hostname in such cases:
+  https://bugs.freedesktop.org/show_bug.cgi?id=28979
+
+According to the linked issue, the fix is to simply omit the host= and
+bind= parameters in the config.
+
+Signed-off-by: Martin Hundeb�ll <[email protected]>
+Upstream-Status: Submitted [https://lore.kernel.org/ell/[email protected]/]
+---
+ unit/dbus.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/unit/dbus.conf b/unit/dbus.conf
+index 5fe41a9ad6a6..3651e44538b1 100644
+--- a/unit/dbus.conf
++++ b/unit/dbus.conf
+@@ -7,7 +7,7 @@
+   <allow_anonymous />
+ 
+   <listen>unix:path=/tmp/ell-test-bus</listen>
+-  <listen>tcp:host=localhost,bind=*,port=14046,family=ipv4</listen>
++  <listen>tcp:port=14046</listen>
+   <apparmor mode="disabled" />
+ 
+   <policy context="default">
+-- 
+2.45.2
+
meta/recipes-core/ell/files/run-ptest new file +23 -0
new file mode 100644
index 000000000000..5b3acdd98b8a
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+ret_val=0
+
+for test in test-*; do
+    case "$test" in
+        test-pem | test-key)
+            if ! [ -d /sys/module/pkcs8_key_parser ]; then
+                echo "SKIP: $test"
+                continue
+            fi
+            ;;
+    esac
+
+    if "./$test" >> ell_test.log 2>&1; then
+        echo "PASS: $test"
+    else
+        echo "FAIL: $test"
+        ret_val=1
+    fi
+done
+
+exit $ret_val
Signature · 11 lines
2.45.2



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200839): https://lists.openembedded.org/g/openembedded-core/message/200839
Mute This Topic: https://lists.openembedded.org/mt/106720607/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [OE-core] [PATCH 2/3] ell: add ptest

Quoted 9 lines · Alexandre Belloni via lists.openembedded.org

Hello,

I didn't test v2 but I guess it was not updated. This caused reproducibility issues:

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20240618-sbhq7ol0/packages/diff-html/

and ptest failures:

Quoted 8 lines

{'ell': ['test-dbus', 'test-dbus-message-fds', 'test-dbus-properties']}

https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/6547/steps/13/logs/stdio
https://autobuilder.yocto.io/pub/non-release/20240618-14/testresults/qemuarm64-ptest/ell.log

https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/6725/steps/12/logs/stdio
https://autobuilder.yocto.io/pub/non-release/20240618-14/testresults/qemux86-64-ptest/ell.log

It also breaks on arm and clang:

https://autobuilder.yoctoproject.org/typhoon/#/builders/166/builds/508/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/142/builds/293/steps/12/logs/stdio

Quoted 176 lines · Martin Hundeb?ll
Quoted 158 lines

Depends on openssl-native and xxd-native to allow generating certificates used for testing.

Create the ${B}/unit dir as that seems to be missing with the automake patches used for building tests separately from running them.

In order to build the test cases, both --enable-tests and --enable-maintainer-mode must be passed to configure.

A few unit tests looks for files in ../ell-0.66/unit (i.e. $(top_srcdir) in automake) when running. Instead of playing games with symlinks or install paths, the "correct" path is just (re)defined in CFLAGS.

A (submitted) patch is added to make dbus-server run correctly when testing with "nonetwork" passed to runqemu.

Skip a few tests that require additional kernel modules to be enabled.

Test execution time is about 10 seconds.

---
 .../distro/include/ptest-packagelists.inc     |  1 +
 meta/recipes-core/ell/ell_0.66.bb             | 25 ++++++++++--
 ...-specify-tcp-hostname-in-dbus-config.patch | 38 +++++++++++++++++++
 meta/recipes-core/ell/files/run-ptest         | 23 +++++++++++
 4 files changed, 84 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-core/ell/files/0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch
 create mode 100644 meta/recipes-core/ell/files/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index da6fa6ee9723..c60575a45cc2 100644
@@ -15,6 +15,7 @@ PTESTS_FAST = "\
     cpio \
     diffstat \
     diffutils \
+    ell \
     ethtool \
     expat \
     expect \
meta/recipes-core/ell/ell_0.66.bb +22 -3
index 899e2f684936..d53db2edc189 100644
@@ -10,9 +10,28 @@ SECTION = "libs"
 LICENSE  = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
 
-DEPENDS = "dbus"
+DEPENDS = "dbus openssl-native xxd-native"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
-SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI = " \
+    https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \
+    file://0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch \
+    file://run-ptest \
+"
 SRC_URI[sha256sum] = "7a78b757080ed6518c1c4fa26ad6a7a3d6e4e385386a20b6fb52379e7d1ffa36"
+
+EXTRA_OECONF += "--enable-tests --enable-maintainer-mode"
+CFLAGS += "-UUNITDIR -DUNITDIR="\\"./unit/\\"""
+
+do_compile:prepend() {
+    mkdir -p ${B}/unit
+}
+
+do_install_ptest() {
+    install -m755 -Dt ${D}${PTEST_PATH} $(find ${B}/unit -executable -type f)
+    install -Dt ${D}${PTEST_PATH}/unit \
+        ${S}/unit/dbus.conf \
+        ${S}/unit/settings.test \
+        $(find ${B}/unit -name \*.pem -type f)
+}
meta/recipes-core/ell/files/0001-unit-don-t-specify-tcp-hostname-in-dbus-config.patch new file +38 -0
new file mode 100644
index 000000000000..328e51683215
@@ -0,0 +1,38 @@
+From d5ebbb5ea68848c5fad5517adf2f885de142a66e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <[email protected]>
+Date: Mon, 17 Jun 2024 14:14:03 +0200
+Subject: [PATCH] unit: don't specify tcp hostname in dbus config
+To: [email protected]
+
+Testing dbus with no network interfaces available on the host fails
+with:
+  dbus-daemon[291]: Failed to start message bus: Failed to lookup host/port: "*:14046": Name or service not known (-2)
+
+Seems like "*" isn't a valid hostname in such cases:
+  https://bugs.freedesktop.org/show_bug.cgi?id=28979
+
+According to the linked issue, the fix is to simply omit the host= and
+bind= parameters in the config.
+
+Signed-off-by: Martin Hundeb�ll <[email protected]>
+Upstream-Status: Submitted [https://lore.kernel.org/ell/[email protected]/]
+---
+ unit/dbus.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/unit/dbus.conf b/unit/dbus.conf
+index 5fe41a9ad6a6..3651e44538b1 100644
+--- a/unit/dbus.conf
++++ b/unit/dbus.conf
+@@ -7,7 +7,7 @@
+   <allow_anonymous />
+ 
+   <listen>unix:path=/tmp/ell-test-bus</listen>
+-  <listen>tcp:host=localhost,bind=*,port=14046,family=ipv4</listen>
++  <listen>tcp:port=14046</listen>
+   <apparmor mode="disabled" />
+ 
+   <policy context="default">
+-- 
+2.45.2
+
meta/recipes-core/ell/files/run-ptest new file +23 -0
new file mode 100644
index 000000000000..5b3acdd98b8a
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+ret_val=0
+
+for test in test-*; do
+    case "$test" in
+        test-pem | test-key)
+            if ! [ -d /sys/module/pkcs8_key_parser ]; then
+                echo "SKIP: $test"
+                continue
+            fi
+            ;;
+    esac
+
+    if "./$test" >> ell_test.log 2>&1; then
+        echo "PASS: $test"
+    else
+        echo "FAIL: $test"
+        ret_val=1
+    fi
+done
+
+exit $ret_val
Signature · 1 line
2.45.2
Signature · 12 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200878): https://lists.openembedded.org/g/openembedded-core/message/200878
Mute This Topic: https://lists.openembedded.org/mt/106720607/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 3/3 ofono: add ptests

In reply to Martin Hundebøll

Install and run the unit tests already provided by ofono. Test execution time is about a second.

---
 meta/conf/distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-connectivity/ofono/ofono_2.8.bb    | 12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index c60575a45cc2..60cbea0f19e9 100644
@@ -53,6 +53,7 @@ PTESTS_FAST = "\
     lzo \
     m4 \
     nettle \
+    ofono \
     opkg \
     pango \
     popt \
meta/recipes-connectivity/ofono/ofono_2.8.bb +11 -1
index 809485d42178..f54367848f05 100644
@@ -10,10 +10,11 @@ DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell"
 SRC_URI = "\
     ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
     file://ofono \
+    file://run-ptest \
 "
 SRC_URI[sha256sum] = "b5aef455b3a374ce43bad43c2ade9d0430d9c0d28952385c44ac7d0dc933bbb8"
 
-inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data
+inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data ptest
 
 INITSCRIPT_NAME = "ofono"
 INITSCRIPT_PARAMS = "defaults 22"
@@ -28,11 +29,20 @@ PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5"
 
 EXTRA_OECONF += "--enable-test --enable-external-ell"
 
+do_compile_ptest() {
+    oe_runmake buildtest-TESTS
+}
+
 do_install:append() {
     install -d ${D}${sysconfdir}/init.d/
     install -m 0755 ${UNPACKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
 }
 
+do_install_ptest() {
+    install -m755 -Dt ${D}${PTEST_PATH} $(find ${B}/unit -executable -type f)
+    install -m644 -Dt ${D}${PTEST_PATH}/unit ${B}/unit/test-provision.db
+}
+
 PACKAGES =+ "${PN}-tests"
 
 FILES:${PN} += "${systemd_unitdir}"
Signature · 1 line
2.45.2
#6 lore raw

Re: [OE-core] [PATCH 3/3] ofono: add ptests

ERROR: /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono_2.8.bb: Unable to get checksum for ofono SRC_URI entry run-ptest: file could not be found The following paths were searched:
/home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono-2.8/poky/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono/poky/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/files/poky/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono-2.8/qemux86-64/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono/qemux86-64/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/files/qemux86-64/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono-2.8/qemuall/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono/qemuall/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/files/qemuall/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono-2.8/x86-64/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono/x86-64/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/files/x86-64/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono-2.8/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/ofono/run-ptest /home/pokybuild/yocto-worker/a-full/build/meta/recipes-connectivity/ofono/files/run-ptest
ERROR: Parsing halted due to errors, see error messages above

Quoted 72 lines · Martin Hundeb?ll

Install and run the unit tests already provided by ofono. Test execution time is about a second.

---
 meta/conf/distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-connectivity/ofono/ofono_2.8.bb    | 12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index c60575a45cc2..60cbea0f19e9 100644
@@ -53,6 +53,7 @@ PTESTS_FAST = "\
     lzo \
     m4 \
     nettle \
+    ofono \
     opkg \
     pango \
     popt \
meta/recipes-connectivity/ofono/ofono_2.8.bb +11 -1
index 809485d42178..f54367848f05 100644
@@ -10,10 +10,11 @@ DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell"
 SRC_URI = "\
     ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
     file://ofono \
+    file://run-ptest \
 "
 SRC_URI[sha256sum] = "b5aef455b3a374ce43bad43c2ade9d0430d9c0d28952385c44ac7d0dc933bbb8"
 
-inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data
+inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data ptest
 
 INITSCRIPT_NAME = "ofono"
 INITSCRIPT_PARAMS = "defaults 22"
@@ -28,11 +29,20 @@ PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5"
 
 EXTRA_OECONF += "--enable-test --enable-external-ell"
 
+do_compile_ptest() {
+    oe_runmake buildtest-TESTS
+}
+
 do_install:append() {
     install -d ${D}${sysconfdir}/init.d/
     install -m 0755 ${UNPACKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
 }
 
+do_install_ptest() {
+    install -m755 -Dt ${D}${PTEST_PATH} $(find ${B}/unit -executable -type f)
+    install -m644 -Dt ${D}${PTEST_PATH}/unit ${B}/unit/test-provision.db
+}
+
 PACKAGES =+ "${PN}-tests"
 
 FILES:${PN} += "${systemd_unitdir}"
Signature · 11 lines
2.45.2



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200838): https://lists.openembedded.org/g/openembedded-core/message/200838
Mute This Topic: https://lists.openembedded.org/mt/106720606/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com