* [OE-core][PATCH] libyaml: add ptest support
@ 2025-11-21 10:56 Pratik Farkase
2025-11-21 11:22 ` Yoann Congal
2025-11-21 11:54 ` [OE-core][PATCH v2] " Pratik Farkase
0 siblings, 2 replies; 11+ messages in thread
From: Pratik Farkase @ 2025-11-21 10:56 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support for libyaml to enable running the test suite
on target devices. This includes:
- test-version: Verifies library version information
- test-reader: Tests YAML reading functionality
The tests are built from the upstream test suite using the
autotools check_PROGRAMS infrastructure.
All 2 upstream tests pass successfully:
START: ptest-runner
BEGIN: /usr/lib/libyaml/ptest
PASS: test-version
PASS: test-reader
DURATION: 0
END: /usr/lib/libyaml/ptest
STOP: ptest-runner
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
.../recipes-support/libyaml/libyaml/run-ptest | 49 +++++++++++++++++++
meta/recipes-support/libyaml/libyaml_0.2.5.bb | 21 +++++++-
2 files changed, 68 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest b/meta/recipes-support/libyaml/libyaml/run-ptest
new file mode 100755
index 0000000000..885e4b68d5
--- /dev/null
+++ b/meta/recipes-support/libyaml/libyaml/run-ptest
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# run-ptest - Execute libyaml test suite
+
+cd tests || exit 1
+
+TOTAL=0
+PASS=0
+FAIL=0
+SKIP=0
+
+run_test() {
+ test_name="$1"
+ test_bin="./${test_name}"
+
+ TOTAL=$((TOTAL + 1))
+
+ if [ ! -x "${test_bin}" ]; then
+ echo "SKIP: ${test_name}"
+ SKIP=$((SKIP + 1))
+ return
+ fi
+
+ if ${test_bin} >/dev/null 2>&1; then
+ echo "PASS: ${test_name}"
+ PASS=$((PASS + 1))
+ else
+ echo "FAIL: ${test_name}"
+ FAIL=$((FAIL + 1))
+ return 1
+ fi
+}
+
+run_test "test-version"
+run_test "test-reader"
+
+echo "============================================================================"
+echo "Testsuite summary for yaml 0.2.5"
+echo "============================================================================"
+echo "# TOTAL: ${TOTAL}"
+echo "# PASS: ${PASS}"
+echo "# SKIP: ${SKIP}"
+echo "# XFAIL: 0"
+echo "# FAIL: ${FAIL}"
+echo "# XPASS: 0"
+echo "# ERROR: 0"
+echo "============================================================================"
+
+test ${FAIL} -eq 0
diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
index 0d8e8762d5..1d950572ab 100644
--- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
+++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
@@ -7,14 +7,31 @@ SECTION = "libs/devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
-SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
+SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
+ file://run-ptest \
+"
SRC_URI[sha256sum] = "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
S = "${UNPACKDIR}/yaml-${PV}"
-inherit autotools
+inherit autotools ptest
DISABLE_STATIC:class-nativesdk = ""
DISABLE_STATIC:class-native = ""
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ oe_runmake -C tests ${PTEST_TESTS}
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ for test in ${PTEST_TESTS}; do
+ if [ -f ${B}/tests/.libs/${test} ]; then
+ install -m 0755 ${B}/tests/.libs/${test} ${D}${PTEST_PATH}/tests/
+ fi
+ done
+}
+
+PTEST_TESTS = "test-version test-reader"
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [OE-core][PATCH] libyaml: add ptest support
2025-11-21 10:56 [OE-core][PATCH] libyaml: add ptest support Pratik Farkase
@ 2025-11-21 11:22 ` Yoann Congal
2025-11-21 11:57 ` Pratik Farkase
2025-11-21 11:54 ` [OE-core][PATCH v2] " Pratik Farkase
1 sibling, 1 reply; 11+ messages in thread
From: Yoann Congal @ 2025-11-21 11:22 UTC (permalink / raw)
To: pratik.farkase; +Cc: openembedded-core, pratik.farkase
[-- Attachment #1: Type: text/plain, Size: 4875 bytes --]
Hello,
Le ven. 21 nov. 2025 à 11:56, Pratik Farkase via lists.openembedded.org
<pratik.farkase=est.tech@lists.openembedded.org> a écrit :
> Add ptest support for libyaml to enable running the test suite
> on target devices. This includes:
>
> - test-version: Verifies library version information
> - test-reader: Tests YAML reading functionality
>
> The tests are built from the upstream test suite using the
> autotools check_PROGRAMS infrastructure.
>
> All 2 upstream tests pass successfully:
> START: ptest-runner
> BEGIN: /usr/lib/libyaml/ptest
> PASS: test-version
> PASS: test-reader
> DURATION: 0
> END: /usr/lib/libyaml/ptest
> STOP: ptest-runner
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---
> .../recipes-support/libyaml/libyaml/run-ptest | 49 +++++++++++++++++++
> meta/recipes-support/libyaml/libyaml_0.2.5.bb | 21 +++++++-
> 2 files changed, 68 insertions(+), 2 deletions(-)
> create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
>
> diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest
> b/meta/recipes-support/libyaml/libyaml/run-ptest
> new file mode 100755
> index 0000000000..885e4b68d5
> --- /dev/null
> +++ b/meta/recipes-support/libyaml/libyaml/run-ptest
> @@ -0,0 +1,49 @@
> +#!/bin/sh
> +
> +# run-ptest - Execute libyaml test suite
> +
> +cd tests || exit 1
> +
> +TOTAL=0
> +PASS=0
> +FAIL=0
> +SKIP=0
> +
> +run_test() {
> + test_name="$1"
> + test_bin="./${test_name}"
> +
> + TOTAL=$((TOTAL + 1))
> +
> + if [ ! -x "${test_bin}" ]; then
> + echo "SKIP: ${test_name}"
> + SKIP=$((SKIP + 1))
> + return
> + fi
> +
> + if ${test_bin} >/dev/null 2>&1; then
> + echo "PASS: ${test_name}"
> + PASS=$((PASS + 1))
> + else
> + echo "FAIL: ${test_name}"
> + FAIL=$((FAIL + 1))
> + return 1
> + fi
> +}
> +
> +run_test "test-version"
> +run_test "test-reader"
>
This is the duplication of PTEST_TESTS. Is there any way to avoid the
repetition?
Run every binary in tests/ maybe?
> +
> +echo
> "============================================================================"
> +echo "Testsuite summary for yaml 0.2.5"
>
This hard-coded "0.2.5" version will most likely *not* be updated on future
upgrades.
Either remove it (my recommendation) or generate it from $PV.
> +echo
> "============================================================================"
> +echo "# TOTAL: ${TOTAL}"
> +echo "# PASS: ${PASS}"
> +echo "# SKIP: ${SKIP}"
> +echo "# XFAIL: 0"
> +echo "# FAIL: ${FAIL}"
> +echo "# XPASS: 0"
> +echo "# ERROR: 0"
> +echo
> "============================================================================"
>
The lines forced to "0" are not used by any tools (that I know of) and
provide little info (being static). How about removing them?
> +
> +test ${FAIL} -eq 0
> diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> index 0d8e8762d5..1d950572ab 100644
> --- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> +++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> @@ -7,14 +7,31 @@ SECTION = "libs/devel"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
>
> -SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
> +SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
> + file://run-ptest \
> +"
> SRC_URI[sha256sum] =
> "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
>
> S = "${UNPACKDIR}/yaml-${PV}"
>
> -inherit autotools
> +inherit autotools ptest
>
> DISABLE_STATIC:class-nativesdk = ""
> DISABLE_STATIC:class-native = ""
>
> BBCLASSEXTEND = "native nativesdk"
> +
> +do_compile_ptest() {
> + oe_runmake -C tests ${PTEST_TESTS}
> +}
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}/tests
> + for test in ${PTEST_TESTS}; do
> + if [ -f ${B}/tests/.libs/${test} ]; then
> + install -m 0755 ${B}/tests/.libs/${test}
> ${D}${PTEST_PATH}/tests/
> + fi
> + done
> +}
> +
> +PTEST_TESTS = "test-version test-reader"
>
Can you put this definition above the tasks where it is used? That would
make the code easier to read.
Thanks!
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#226667):
> https://lists.openembedded.org/g/openembedded-core/message/226667
> Mute This Topic: https://lists.openembedded.org/mt/116405792/4316185
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> yoann.congal@smile.fr]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
--
Yoann Congal
Smile ECS
[-- Attachment #2: Type: text/html, Size: 7831 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [OE-core][PATCH] libyaml: add ptest support
2025-11-21 11:22 ` Yoann Congal
@ 2025-11-21 11:57 ` Pratik Farkase
0 siblings, 0 replies; 11+ messages in thread
From: Pratik Farkase @ 2025-11-21 11:57 UTC (permalink / raw)
To: Yoann Congal
Cc: openembedded-core@lists.openembedded.org,
pratik.farkase@ericsson.com
Hi Yoann,
Thank you for the quick review and helpful feedback!
I've addressed all your comments in v2:
- Removed hardcoded "0.2.5" version from test summary
- Removed static XFAIL/XPASS/ERROR lines (always 0)
- Moved PTEST_TESTS definition above the functions for better readability
- Changed run-ptest to auto-discover test binaries instead of hardcoding names
v2 patch is sent separately.
Thanks again for the review!
Best Regards,
Pratik
________________________________________
From: Yoann Congal <yoann.congal@smile.fr>
Sent: Friday, November 21, 2025 12:22 PM
To: Pratik Farkase
Cc: openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH] libyaml: add ptest support
Hello,
Le ven. 21 nov. 2025 à 11:56, Pratik Farkase via lists.openembedded.org<http://lists.openembedded.org> <pratik.farkase=est.tech@lists.openembedded.org<mailto:est.tech@lists.openembedded.org>> a écrit :
Add ptest support for libyaml to enable running the test suite
on target devices. This includes:
- test-version: Verifies library version information
- test-reader: Tests YAML reading functionality
The tests are built from the upstream test suite using the
autotools check_PROGRAMS infrastructure.
All 2 upstream tests pass successfully:
START: ptest-runner
BEGIN: /usr/lib/libyaml/ptest
PASS: test-version
PASS: test-reader
DURATION: 0
END: /usr/lib/libyaml/ptest
STOP: ptest-runner
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
.../recipes-support/libyaml/libyaml/run-ptest | 49 +++++++++++++++++++
meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb> | 21 +++++++-
2 files changed, 68 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest b/meta/recipes-support/libyaml/libyaml/run-ptest
new file mode 100755
index 0000000000..885e4b68d5
--- /dev/null
+++ b/meta/recipes-support/libyaml/libyaml/run-ptest
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# run-ptest - Execute libyaml test suite
+
+cd tests || exit 1
+
+TOTAL=0
+PASS=0
+FAIL=0
+SKIP=0
+
+run_test() {
+ test_name="$1"
+ test_bin="./${test_name}"
+
+ TOTAL=$((TOTAL + 1))
+
+ if [ ! -x "${test_bin}" ]; then
+ echo "SKIP: ${test_name}"
+ SKIP=$((SKIP + 1))
+ return
+ fi
+
+ if ${test_bin} >/dev/null 2>&1; then
+ echo "PASS: ${test_name}"
+ PASS=$((PASS + 1))
+ else
+ echo "FAIL: ${test_name}"
+ FAIL=$((FAIL + 1))
+ return 1
+ fi
+}
+
+run_test "test-version"
+run_test "test-reader"
This is the duplication of PTEST_TESTS. Is there any way to avoid the repetition?
Run every binary in tests/ maybe?
+
+echo "============================================================================"
+echo "Testsuite summary for yaml 0.2.5"
This hard-coded "0.2.5" version will most likely *not* be updated on future upgrades.
Either remove it (my recommendation) or generate it from $PV.
+echo "============================================================================"
+echo "# TOTAL: ${TOTAL}"
+echo "# PASS: ${PASS}"
+echo "# SKIP: ${SKIP}"
+echo "# XFAIL: 0"
+echo "# FAIL: ${FAIL}"
+echo "# XPASS: 0"
+echo "# ERROR: 0"
+echo "============================================================================"
The lines forced to "0" are not used by any tools (that I know of) and provide little info (being static). How about removing them?
+
+test ${FAIL} -eq 0
diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb> b/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb>
index 0d8e8762d5..1d950572ab 100644
--- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb>
+++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb>
@@ -7,14 +7,31 @@ SECTION = "libs/devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
-SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz<https://pyyaml.org/download/libyaml/yaml-$%7BPV%7D.tar.gz>"
+SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz<https://pyyaml.org/download/libyaml/yaml-$%7BPV%7D.tar.gz> \
+ file://run-ptest \
+"
SRC_URI[sha256sum] = "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
S = "${UNPACKDIR}/yaml-${PV}"
-inherit autotools
+inherit autotools ptest
DISABLE_STATIC:class-nativesdk = ""
DISABLE_STATIC:class-native = ""
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ oe_runmake -C tests ${PTEST_TESTS}
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ for test in ${PTEST_TESTS}; do
+ if [ -f ${B}/tests/.libs/${test} ]; then
+ install -m 0755 ${B}/tests/.libs/${test} ${D}${PTEST_PATH}/tests/
+ fi
+ done
+}
+
+PTEST_TESTS = "test-version test-reader"
Can you put this definition above the tasks where it is used? That would make the code easier to read.
Thanks!
--
2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#226667): https://lists.openembedded.org/g/openembedded-core/message/226667
Mute This Topic: https://lists.openembedded.org/mt/116405792/4316185
Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core%2Bowner@lists.openembedded.org>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [yoann.congal@smile.fr<mailto:yoann.congal@smile.fr>]
-=-=-=-=-=-=-=-=-=-=-=-
--
Yoann Congal
Smile ECS
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OE-core][PATCH v2] libyaml: add ptest support
2025-11-21 10:56 [OE-core][PATCH] libyaml: add ptest support Pratik Farkase
2025-11-21 11:22 ` Yoann Congal
@ 2025-11-21 11:54 ` Pratik Farkase
2025-11-21 12:32 ` Yoann Congal
2025-11-21 13:13 ` [OE-core][PATCH v3] " Pratik Farkase
1 sibling, 2 replies; 11+ messages in thread
From: Pratik Farkase @ 2025-11-21 11:54 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support for libyaml to enable running the test suite
on target devices. This includes:
- test-version: Verifies library version information
- test-reader: Tests YAML reading functionality
All 2 upstream tests pass successfully:
START: ptest-runner
BEGIN: /usr/lib/libyaml/ptest
PASS: test-version
PASS: test-reader
DURATION: 0
END: /usr/lib/libyaml/ptest
STOP: ptest-runner
Changes in v2:
- Remove hardcoded version from test summary
- Remove static XFAIL/XPASS/ERROR lines (always 0)
- Move PTEST_TESTS definition above functions for better readability
- Auto-discover test binaries in run-ptest
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
.../distro/include/ptest-packagelists.inc | 1 +
.../recipes-support/libyaml/libyaml/run-ptest | 46 +++++++++++++++++++
meta/recipes-support/libyaml/libyaml_0.2.5.bb | 21 ++++++++-
3 files changed, 66 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 06d113e264..6a0c23586e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -49,6 +49,7 @@ PTESTS_FAST = "\
libxml-simple-perl \
libxml2 \
libxmlb \
+ libyaml \
logrotate \
lua \
lzo \
diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest b/meta/recipes-support/libyaml/libyaml/run-ptest
new file mode 100755
index 0000000000..a9cbe9cf0d
--- /dev/null
+++ b/meta/recipes-support/libyaml/libyaml/run-ptest
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# run-ptest - Execute libyaml test suite
+
+cd tests || exit 1
+
+TOTAL=0
+PASS=0
+FAIL=0
+SKIP=0
+
+run_test() {
+ test_name="$1"
+ test_bin="./${test_name}"
+
+ TOTAL=$((TOTAL + 1))
+
+ if [ ! -x "${test_bin}" ]; then
+ echo "SKIP: ${test_name}"
+ SKIP=$((SKIP + 1))
+ return
+ fi
+
+ if ${test_bin} >/dev/null 2>&1; then
+ echo "PASS: ${test_name}"
+ PASS=$((PASS + 1))
+ else
+ echo "FAIL: ${test_name}"
+ FAIL=$((FAIL + 1))
+ return 1
+ fi
+}
+
+for test_bin in ./test-*; do
+ if [ -x "${test_bin}" ]; then
+ test_name=$(basename "${test_bin}")
+ run_test "${test_name}"
+ fi
+done
+
+echo "# TOTAL: ${TOTAL}"
+echo "# PASS: ${PASS}"
+echo "# SKIP: ${SKIP}"
+echo "# FAIL: ${FAIL}"
+
+test ${FAIL} -eq 0
diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
index 0d8e8762d5..9a905215d3 100644
--- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
+++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
@@ -7,14 +7,31 @@ SECTION = "libs/devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
-SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
+SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
+ file://run-ptest \
+"
SRC_URI[sha256sum] = "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
S = "${UNPACKDIR}/yaml-${PV}"
-inherit autotools
+inherit autotools ptest
DISABLE_STATIC:class-nativesdk = ""
DISABLE_STATIC:class-native = ""
BBCLASSEXTEND = "native nativesdk"
+
+PTEST_TESTS = "test-version test-reader"
+
+do_compile_ptest() {
+ oe_runmake -C tests ${PTEST_TESTS}
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ for test in ${PTEST_TESTS}; do
+ if [ -f ${B}/tests/.libs/${test} ]; then
+ install -m 0755 ${B}/tests/.libs/${test} ${D}${PTEST_PATH}/tests/
+ fi
+ done
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [OE-core][PATCH v2] libyaml: add ptest support
2025-11-21 11:54 ` [OE-core][PATCH v2] " Pratik Farkase
@ 2025-11-21 12:32 ` Yoann Congal
2025-11-21 13:17 ` Pratik Farkase
2025-11-21 13:13 ` [OE-core][PATCH v3] " Pratik Farkase
1 sibling, 1 reply; 11+ messages in thread
From: Yoann Congal @ 2025-11-21 12:32 UTC (permalink / raw)
To: pratik.farkase; +Cc: openembedded-core, pratik.farkase
[-- Attachment #1: Type: text/plain, Size: 4873 bytes --]
Le ven. 21 nov. 2025 à 12:54, Pratik Farkase via lists.openembedded.org
<pratik.farkase=est.tech@lists.openembedded.org> a écrit :
> Add ptest support for libyaml to enable running the test suite
> on target devices. This includes:
>
> - test-version: Verifies library version information
> - test-reader: Tests YAML reading functionality
>
> All 2 upstream tests pass successfully:
> START: ptest-runner
> BEGIN: /usr/lib/libyaml/ptest
> PASS: test-version
> PASS: test-reader
> DURATION: 0
> END: /usr/lib/libyaml/ptest
> STOP: ptest-runner
>
> Changes in v2:
> - Remove hardcoded version from test summary
> - Remove static XFAIL/XPASS/ERROR lines (always 0)
> - Move PTEST_TESTS definition above functions for better readability
> - Auto-discover test binaries in run-ptest
>
^ this changelog is nice but need to go after the "---" line (that way, it
is in mails for review but not in final commit message)
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
> ---
> .../distro/include/ptest-packagelists.inc | 1 +
> .../recipes-support/libyaml/libyaml/run-ptest | 46 +++++++++++++++++++
> meta/recipes-support/libyaml/libyaml_0.2.5.bb | 21 ++++++++-
> 3 files changed, 66 insertions(+), 2 deletions(-)
> create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc
> b/meta/conf/distro/include/ptest-packagelists.inc
> index 06d113e264..6a0c23586e 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -49,6 +49,7 @@ PTESTS_FAST = "\
> libxml-simple-perl \
> libxml2 \
> libxmlb \
> + libyaml \
> logrotate \
> lua \
> lzo \
> diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest
> b/meta/recipes-support/libyaml/libyaml/run-ptest
> new file mode 100755
> index 0000000000..a9cbe9cf0d
> --- /dev/null
> +++ b/meta/recipes-support/libyaml/libyaml/run-ptest
> @@ -0,0 +1,46 @@
> +#!/bin/sh
> +
> +# run-ptest - Execute libyaml test suite
> +
> +cd tests || exit 1
> +
> +TOTAL=0
> +PASS=0
> +FAIL=0
> +SKIP=0
> +
> +run_test() {
> + test_name="$1"
> + test_bin="./${test_name}"
> +
> + TOTAL=$((TOTAL + 1))
> +
> + if [ ! -x "${test_bin}" ]; then
> + echo "SKIP: ${test_name}"
> + SKIP=$((SKIP + 1))
> + return
> + fi
>
This test is now redundant. You can remove it.
> +
> + if ${test_bin} >/dev/null 2>&1; then
> + echo "PASS: ${test_name}"
> + PASS=$((PASS + 1))
> + else
> + echo "FAIL: ${test_name}"
> + FAIL=$((FAIL + 1))
> + return 1
> + fi
> +}
> +
> +for test_bin in ./test-*; do
> + if [ -x "${test_bin}" ]; then
> + test_name=$(basename "${test_bin}")
> + run_test "${test_name}"
> + fi
> +done
> +
> +echo "# TOTAL: ${TOTAL}"
> +echo "# PASS: ${PASS}"
> +echo "# SKIP: ${SKIP}"
> +echo "# FAIL: ${FAIL}"
> +
> +test ${FAIL} -eq 0
> diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> index 0d8e8762d5..9a905215d3 100644
> --- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> +++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> @@ -7,14 +7,31 @@ SECTION = "libs/devel"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
>
> -SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
> +SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
> + file://run-ptest \
> +"
> SRC_URI[sha256sum] =
> "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
>
> S = "${UNPACKDIR}/yaml-${PV}"
>
> -inherit autotools
> +inherit autotools ptest
>
> DISABLE_STATIC:class-nativesdk = ""
> DISABLE_STATIC:class-native = ""
>
> BBCLASSEXTEND = "native nativesdk"
> +
> +PTEST_TESTS = "test-version test-reader"
> +
> +do_compile_ptest() {
> + oe_runmake -C tests ${PTEST_TESTS}
> +}
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}/tests
> + for test in ${PTEST_TESTS}; do
> + if [ -f ${B}/tests/.libs/${test} ]; then
> + install -m 0755 ${B}/tests/.libs/${test}
> ${D}${PTEST_PATH}/tests/
> + fi
> + done
> +}
> --
> 2.43.0
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#226673):
> https://lists.openembedded.org/g/openembedded-core/message/226673
> Mute This Topic: https://lists.openembedded.org/mt/116406209/4316185
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> yoann.congal@smile.fr]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
--
Yoann Congal
Smile ECS
[-- Attachment #2: Type: text/html, Size: 7499 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [OE-core][PATCH v2] libyaml: add ptest support
2025-11-21 12:32 ` Yoann Congal
@ 2025-11-21 13:17 ` Pratik Farkase
0 siblings, 0 replies; 11+ messages in thread
From: Pratik Farkase @ 2025-11-21 13:17 UTC (permalink / raw)
To: Yoann Congal
Cc: openembedded-core@lists.openembedded.org,
pratik.farkase@ericsson.com
Hi Yoann,
Thanks again for feedback, sent a v3 addressing the comments.
Best Regards,
Pratik
________________________________________
From: Yoann Congal <yoann.congal@smile.fr>
Sent: Friday, November 21, 2025 1:32 PM
To: Pratik Farkase
Cc: openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v2] libyaml: add ptest support
Le ven. 21 nov. 2025 à 12:54, Pratik Farkase via lists.openembedded.org<http://lists.openembedded.org> <pratik.farkase=est.tech@lists.openembedded.org<mailto:est.tech@lists.openembedded.org>> a écrit :
Add ptest support for libyaml to enable running the test suite
on target devices. This includes:
- test-version: Verifies library version information
- test-reader: Tests YAML reading functionality
All 2 upstream tests pass successfully:
START: ptest-runner
BEGIN: /usr/lib/libyaml/ptest
PASS: test-version
PASS: test-reader
DURATION: 0
END: /usr/lib/libyaml/ptest
STOP: ptest-runner
Changes in v2:
- Remove hardcoded version from test summary
- Remove static XFAIL/XPASS/ERROR lines (always 0)
- Move PTEST_TESTS definition above functions for better readability
- Auto-discover test binaries in run-ptest
^ this changelog is nice but need to go after the "---" line (that way, it is in mails for review but not in final commit message)
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
.../distro/include/ptest-packagelists.inc | 1 +
.../recipes-support/libyaml/libyaml/run-ptest | 46 +++++++++++++++++++
meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb> | 21 ++++++++-
3 files changed, 66 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 06d113e264..6a0c23586e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -49,6 +49,7 @@ PTESTS_FAST = "\
libxml-simple-perl \
libxml2 \
libxmlb \
+ libyaml \
logrotate \
lua \
lzo \
diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest b/meta/recipes-support/libyaml/libyaml/run-ptest
new file mode 100755
index 0000000000..a9cbe9cf0d
--- /dev/null
+++ b/meta/recipes-support/libyaml/libyaml/run-ptest
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# run-ptest - Execute libyaml test suite
+
+cd tests || exit 1
+
+TOTAL=0
+PASS=0
+FAIL=0
+SKIP=0
+
+run_test() {
+ test_name="$1"
+ test_bin="./${test_name}"
+
+ TOTAL=$((TOTAL + 1))
+
+ if [ ! -x "${test_bin}" ]; then
+ echo "SKIP: ${test_name}"
+ SKIP=$((SKIP + 1))
+ return
+ fi
This test is now redundant. You can remove it.
+
+ if ${test_bin} >/dev/null 2>&1; then
+ echo "PASS: ${test_name}"
+ PASS=$((PASS + 1))
+ else
+ echo "FAIL: ${test_name}"
+ FAIL=$((FAIL + 1))
+ return 1
+ fi
+}
+
+for test_bin in ./test-*; do
+ if [ -x "${test_bin}" ]; then
+ test_name=$(basename "${test_bin}")
+ run_test "${test_name}"
+ fi
+done
+
+echo "# TOTAL: ${TOTAL}"
+echo "# PASS: ${PASS}"
+echo "# SKIP: ${SKIP}"
+echo "# FAIL: ${FAIL}"
+
+test ${FAIL} -eq 0
diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb> b/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb>
index 0d8e8762d5..9a905215d3 100644
--- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb>
+++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb<http://libyaml_0.2.5.bb>
@@ -7,14 +7,31 @@ SECTION = "libs/devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
-SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz<https://pyyaml.org/download/libyaml/yaml-$%7BPV%7D.tar.gz>"
+SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz<https://pyyaml.org/download/libyaml/yaml-$%7BPV%7D.tar.gz> \
+ file://run-ptest \
+"
SRC_URI[sha256sum] = "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
S = "${UNPACKDIR}/yaml-${PV}"
-inherit autotools
+inherit autotools ptest
DISABLE_STATIC:class-nativesdk = ""
DISABLE_STATIC:class-native = ""
BBCLASSEXTEND = "native nativesdk"
+
+PTEST_TESTS = "test-version test-reader"
+
+do_compile_ptest() {
+ oe_runmake -C tests ${PTEST_TESTS}
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ for test in ${PTEST_TESTS}; do
+ if [ -f ${B}/tests/.libs/${test} ]; then
+ install -m 0755 ${B}/tests/.libs/${test} ${D}${PTEST_PATH}/tests/
+ fi
+ done
+}
--
2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#226673): https://lists.openembedded.org/g/openembedded-core/message/226673
Mute This Topic: https://lists.openembedded.org/mt/116406209/4316185
Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core%2Bowner@lists.openembedded.org>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [yoann.congal@smile.fr<mailto:yoann.congal@smile.fr>]
-=-=-=-=-=-=-=-=-=-=-=-
--
Yoann Congal
Smile ECS
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OE-core][PATCH v3] libyaml: add ptest support
2025-11-21 11:54 ` [OE-core][PATCH v2] " Pratik Farkase
2025-11-21 12:32 ` Yoann Congal
@ 2025-11-21 13:13 ` Pratik Farkase
2025-11-21 14:46 ` Yoann Congal
` (3 more replies)
1 sibling, 4 replies; 11+ messages in thread
From: Pratik Farkase @ 2025-11-21 13:13 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support for libyaml to enable running the test suite
on target devices. This includes:
- test-version: Verifies library version information
- test-reader: Tests YAML reading functionality
All 2 upstream tests pass successfully:
START: ptest-runner
BEGIN: /usr/lib/libyaml/ptest
PASS: test-version
PASS: test-reader
DURATION: 0
END: /usr/lib/libyaml/ptest
STOP: ptest-runner
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
Changes in v3:
- Remove redundant executable check in run_test function
Changes in v2:
- Remove hardcoded version from test summary
- Remove static XFAIL/XPASS/ERROR lines (always 0)
- Move PTEST_TESTS definition above functions for better readability
- Auto-discover test binaries in run-ptest
---
.../distro/include/ptest-packagelists.inc | 1 +
.../recipes-support/libyaml/libyaml/run-ptest | 38 +++++++++++++++++++
meta/recipes-support/libyaml/libyaml_0.2.5.bb | 21 +++++++++-
3 files changed, 58 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 06d113e264..6a0c23586e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -49,6 +49,7 @@ PTESTS_FAST = "\
libxml-simple-perl \
libxml2 \
libxmlb \
+ libyaml \
logrotate \
lua \
lzo \
diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest b/meta/recipes-support/libyaml/libyaml/run-ptest
new file mode 100755
index 0000000000..a5f554a15b
--- /dev/null
+++ b/meta/recipes-support/libyaml/libyaml/run-ptest
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# run-ptest - Execute libyaml test suite
+
+cd tests || exit 1
+
+TOTAL=0
+PASS=0
+FAIL=0
+
+run_test() {
+ test_name="$1"
+ test_bin="./${test_name}"
+
+ TOTAL=$((TOTAL + 1))
+
+ if ${test_bin} >/dev/null 2>&1; then
+ echo "PASS: ${test_name}"
+ PASS=$((PASS + 1))
+ else
+ echo "FAIL: ${test_name}"
+ FAIL=$((FAIL + 1))
+ return 1
+ fi
+}
+
+for test_bin in ./test-*; do
+ if [ -x "${test_bin}" ]; then
+ test_name=$(basename "${test_bin}")
+ run_test "${test_name}"
+ fi
+done
+
+echo "# TOTAL: ${TOTAL}"
+echo "# PASS: ${PASS}"
+echo "# FAIL: ${FAIL}"
+
+test ${FAIL} -eq 0
diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
index 0d8e8762d5..9a905215d3 100644
--- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
+++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
@@ -7,14 +7,31 @@ SECTION = "libs/devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
-SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
+SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
+ file://run-ptest \
+"
SRC_URI[sha256sum] = "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
S = "${UNPACKDIR}/yaml-${PV}"
-inherit autotools
+inherit autotools ptest
DISABLE_STATIC:class-nativesdk = ""
DISABLE_STATIC:class-native = ""
BBCLASSEXTEND = "native nativesdk"
+
+PTEST_TESTS = "test-version test-reader"
+
+do_compile_ptest() {
+ oe_runmake -C tests ${PTEST_TESTS}
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ for test in ${PTEST_TESTS}; do
+ if [ -f ${B}/tests/.libs/${test} ]; then
+ install -m 0755 ${B}/tests/.libs/${test} ${D}${PTEST_PATH}/tests/
+ fi
+ done
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [OE-core][PATCH v3] libyaml: add ptest support
2025-11-21 13:13 ` [OE-core][PATCH v3] " Pratik Farkase
@ 2025-11-21 14:46 ` Yoann Congal
2025-12-01 17:39 ` Ross Burton
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Yoann Congal @ 2025-11-21 14:46 UTC (permalink / raw)
To: pratik.farkase; +Cc: openembedded-core, pratik.farkase
[-- Attachment #1: Type: text/plain, Size: 4678 bytes --]
Le ven. 21 nov. 2025 à 14:13, Pratik Farkase via lists.openembedded.org
<pratik.farkase=est.tech@lists.openembedded.org> a écrit :
> Add ptest support for libyaml to enable running the test suite
> on target devices. This includes:
>
> - test-version: Verifies library version information
> - test-reader: Tests YAML reading functionality
>
> All 2 upstream tests pass successfully:
> START: ptest-runner
> BEGIN: /usr/lib/libyaml/ptest
> PASS: test-version
> PASS: test-reader
> DURATION: 0
> END: /usr/lib/libyaml/ptest
> STOP: ptest-runner
>
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
>
Thanks! Looks good to me now :)
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
>
> ---
> Changes in v3:
> - Remove redundant executable check in run_test function
>
> Changes in v2:
> - Remove hardcoded version from test summary
> - Remove static XFAIL/XPASS/ERROR lines (always 0)
> - Move PTEST_TESTS definition above functions for better readability
> - Auto-discover test binaries in run-ptest
> ---
> .../distro/include/ptest-packagelists.inc | 1 +
> .../recipes-support/libyaml/libyaml/run-ptest | 38 +++++++++++++++++++
> meta/recipes-support/libyaml/libyaml_0.2.5.bb | 21 +++++++++-
> 3 files changed, 58 insertions(+), 2 deletions(-)
> create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc
> b/meta/conf/distro/include/ptest-packagelists.inc
> index 06d113e264..6a0c23586e 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -49,6 +49,7 @@ PTESTS_FAST = "\
> libxml-simple-perl \
> libxml2 \
> libxmlb \
> + libyaml \
> logrotate \
> lua \
> lzo \
> diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest
> b/meta/recipes-support/libyaml/libyaml/run-ptest
> new file mode 100755
> index 0000000000..a5f554a15b
> --- /dev/null
> +++ b/meta/recipes-support/libyaml/libyaml/run-ptest
> @@ -0,0 +1,38 @@
> +#!/bin/sh
> +
> +# run-ptest - Execute libyaml test suite
> +
> +cd tests || exit 1
> +
> +TOTAL=0
> +PASS=0
> +FAIL=0
> +
> +run_test() {
> + test_name="$1"
> + test_bin="./${test_name}"
> +
> + TOTAL=$((TOTAL + 1))
> +
> + if ${test_bin} >/dev/null 2>&1; then
> + echo "PASS: ${test_name}"
> + PASS=$((PASS + 1))
> + else
> + echo "FAIL: ${test_name}"
> + FAIL=$((FAIL + 1))
> + return 1
> + fi
> +}
> +
> +for test_bin in ./test-*; do
> + if [ -x "${test_bin}" ]; then
> + test_name=$(basename "${test_bin}")
> + run_test "${test_name}"
> + fi
> +done
> +
> +echo "# TOTAL: ${TOTAL}"
> +echo "# PASS: ${PASS}"
> +echo "# FAIL: ${FAIL}"
> +
> +test ${FAIL} -eq 0
> diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> index 0d8e8762d5..9a905215d3 100644
> --- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> +++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
> @@ -7,14 +7,31 @@ SECTION = "libs/devel"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
>
> -SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
> +SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
> + file://run-ptest \
> +"
> SRC_URI[sha256sum] =
> "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
>
> S = "${UNPACKDIR}/yaml-${PV}"
>
> -inherit autotools
> +inherit autotools ptest
>
> DISABLE_STATIC:class-nativesdk = ""
> DISABLE_STATIC:class-native = ""
>
> BBCLASSEXTEND = "native nativesdk"
> +
> +PTEST_TESTS = "test-version test-reader"
> +
> +do_compile_ptest() {
> + oe_runmake -C tests ${PTEST_TESTS}
> +}
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}/tests
> + for test in ${PTEST_TESTS}; do
> + if [ -f ${B}/tests/.libs/${test} ]; then
> + install -m 0755 ${B}/tests/.libs/${test}
> ${D}${PTEST_PATH}/tests/
> + fi
> + done
> +}
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#226677):
> https://lists.openembedded.org/g/openembedded-core/message/226677
> Mute This Topic: https://lists.openembedded.org/mt/116406990/4316185
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> yoann.congal@smile.fr]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
--
Yoann Congal
Smile ECS
[-- Attachment #2: Type: text/html, Size: 7152 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [OE-core][PATCH v3] libyaml: add ptest support
2025-11-21 13:13 ` [OE-core][PATCH v3] " Pratik Farkase
2025-11-21 14:46 ` Yoann Congal
@ 2025-12-01 17:39 ` Ross Burton
2025-12-04 13:24 ` Ross Burton
2026-01-08 9:17 ` [OE-core][PATCH v4] " Pratik Farkase
3 siblings, 0 replies; 11+ messages in thread
From: Ross Burton @ 2025-12-01 17:39 UTC (permalink / raw)
To: pratik.farkase@est.tech
Cc: openembedded-core@lists.openembedded.org,
pratik.farkase@ericsson.com
On 21 Nov 2025, at 13:13, Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org> wrote:
> + if [ -f ${B}/tests/.libs/${test} ]; then
Don’t make this conditional, as otherwise the test list won’t be updated.
> + install -m 0755 ${B}/tests/.libs/${test} ${D}${PTEST_PATH}/tests/
Use ${B}/libtool —mode=install install ${B}/tests/$test ${D}${PTEST_PATH}/tests/ please. Assuming that libtool writes into .libs/ is a bad assumption.
Ross
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [OE-core][PATCH v3] libyaml: add ptest support
2025-11-21 13:13 ` [OE-core][PATCH v3] " Pratik Farkase
2025-11-21 14:46 ` Yoann Congal
2025-12-01 17:39 ` Ross Burton
@ 2025-12-04 13:24 ` Ross Burton
2026-01-08 9:17 ` [OE-core][PATCH v4] " Pratik Farkase
3 siblings, 0 replies; 11+ messages in thread
From: Ross Burton @ 2025-12-04 13:24 UTC (permalink / raw)
To: pratik.farkase@est.tech
Cc: openembedded-core@lists.openembedded.org,
pratik.farkase@ericsson.com
On 21 Nov 2025, at 13:13, Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org> wrote:
>
> + if ${test_bin} >/dev/null 2>&1; then
If the test fails, it would be useful to have output to say why it failed. So I suggest not redirecting the output.
Ross
^ permalink raw reply [flat|nested] 11+ messages in thread* [OE-core][PATCH v4] libyaml: add ptest support
2025-11-21 13:13 ` [OE-core][PATCH v3] " Pratik Farkase
` (2 preceding siblings ...)
2025-12-04 13:24 ` Ross Burton
@ 2026-01-08 9:17 ` Pratik Farkase
3 siblings, 0 replies; 11+ messages in thread
From: Pratik Farkase @ 2026-01-08 9:17 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support for libyaml to enable running the test suite
on target devices. This includes:
- test-version: Verifies library version information
- test-reader: Tests YAML reading functionality
All 2 upstream tests pass successfully:
START: ptest-runner
BEGIN: /usr/lib/libyaml/ptest
checking utf-8 sequences...
a simple test:
+ (no error)
an empty line:
+ (no error)
u-0 is a control character:
+ (reader error: control characters are not allowed: #0 at 0)
u-80 is a control character:
+ (reader error: control characters are not allowed: #80 at 0)
u-800 is valid:
+ (no error)
u-10000 is valid:
+ (no error)
5 bytes sequences are not allowed:
+ (reader error: invalid leading UTF-8 octet: #F8 at 0)
6 bytes sequences are not allowed:
+ (reader error: invalid leading UTF-8 octet: #FC at 0)
u-7f is a control character:
+ (reader error: control characters are not allowed: #7F at 0)
u-7FF is valid:
+ (no error)
u-FFFF is a control character:
+ (reader error: control characters are not allowed: #FFFF at 0)
u-1FFFFF is too large:
+ (reader error: invalid Unicode character: #1FFFFF at 0)
u-3FFFFFF is 5 bytes:
+ (reader error: invalid leading UTF-8 octet: #FB at 0)
u-7FFFFFFF is 6 bytes:
+ (reader error: invalid leading UTF-8 octet: #FD at 0)
u-D7FF:
+ (no error)
u-E000:
+ (no error)
u-FFFD:
+ (no error)
u-10FFFF:
+ (no error)
u-110000:
+ (reader error: invalid Unicode character: #110000 at 0)
first continuation byte:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
last continuation byte:
+ (reader error: invalid leading UTF-8 octet: #BF at 0)
2 continuation bytes:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
3 continuation bytes:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
4 continuation bytes:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
5 continuation bytes:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
6 continuation bytes:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
7 continuation bytes:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
sequence of all 64 possible continuation bytes:
+ (reader error: invalid leading UTF-8 octet: #80 at 0)
+ (reader error: invalid leading UTF-8 octet: #81 at 0)
+ (reader error: invalid leading UTF-8 octet: #82 at 0)
+ (reader error: invalid leading UTF-8 octet: #83 at 0)
+ (reader error: invalid leading UTF-8 octet: #84 at 0)
+ (reader error: invalid leading UTF-8 octet: #85 at 0)
+ (reader error: invalid leading UTF-8 octet: #86 at 0)
+ (reader error: invalid leading UTF-8 octet: #87 at 0)
+ (reader error: invalid leading UTF-8 octet: #88 at 0)
+ (reader error: invalid leading UTF-8 octet: #89 at 0)
+ (reader error: invalid leading UTF-8 octet: #8A at 0)
+ (reader error: invalid leading UTF-8 octet: #8B at 0)
+ (reader error: invalid leading UTF-8 octet: #8C at 0)
+ (reader error: invalid leading UTF-8 octet: #8D at 0)
+ (reader error: invalid leading UTF-8 octet: #8E at 0)
+ (reader error: invalid leading UTF-8 octet: #8F at 0)
+ (reader error: invalid leading UTF-8 octet: #90 at 0)
+ (reader error: invalid leading UTF-8 octet: #91 at 0)
+ (reader error: invalid leading UTF-8 octet: #92 at 0)
+ (reader error: invalid leading UTF-8 octet: #93 at 0)
+ (reader error: invalid leading UTF-8 octet: #94 at 0)
+ (reader error: invalid leading UTF-8 octet: #95 at 0)
+ (reader error: invalid leading UTF-8 octet: #96 at 0)
+ (reader error: invalid leading UTF-8 octet: #97 at 0)
+ (reader error: invalid leading UTF-8 octet: #98 at 0)
+ (reader error: invalid leading UTF-8 octet: #99 at 0)
+ (reader error: invalid leading UTF-8 octet: #9A at 0)
+ (reader error: invalid leading UTF-8 octet: #9B at 0)
+ (reader error: invalid leading UTF-8 octet: #9C at 0)
+ (reader error: invalid leading UTF-8 octet: #9D at 0)
+ (reader error: invalid leading UTF-8 octet: #9E at 0)
+ (reader error: invalid leading UTF-8 octet: #9F at 0)
+ (reader error: invalid leading UTF-8 octet: #A0 at 0)
+ (reader error: invalid leading UTF-8 octet: #A1 at 0)
+ (reader error: invalid leading UTF-8 octet: #A2 at 0)
+ (reader error: invalid leading UTF-8 octet: #A3 at 0)
+ (reader error: invalid leading UTF-8 octet: #A4 at 0)
+ (reader error: invalid leading UTF-8 octet: #A5 at 0)
+ (reader error: invalid leading UTF-8 octet: #A6 at 0)
+ (reader error: invalid leading UTF-8 octet: #A7 at 0)
+ (reader error: invalid leading UTF-8 octet: #A8 at 0)
+ (reader error: invalid leading UTF-8 octet: #A9 at 0)
+ (reader error: invalid leading UTF-8 octet: #AA at 0)
+ (reader error: invalid leading UTF-8 octet: #AB at 0)
+ (reader error: invalid leading UTF-8 octet: #AC at 0)
+ (reader error: invalid leading UTF-8 octet: #AD at 0)
+ (reader error: invalid leading UTF-8 octet: #AE at 0)
+ (reader error: invalid leading UTF-8 octet: #AF at 0)
+ (reader error: invalid leading UTF-8 octet: #B0 at 0)
+ (reader error: invalid leading UTF-8 octet: #B1 at 0)
+ (reader error: invalid leading UTF-8 octet: #B2 at 0)
+ (reader error: invalid leading UTF-8 octet: #B3 at 0)
+ (reader error: invalid leading UTF-8 octet: #B4 at 0)
+ (reader error: invalid leading UTF-8 octet: #B5 at 0)
+ (reader error: invalid leading UTF-8 octet: #B6 at 0)
+ (reader error: invalid leading UTF-8 octet: #B7 at 0)
+ (reader error: invalid leading UTF-8 octet: #B8 at 0)
+ (reader error: invalid leading UTF-8 octet: #B9 at 0)
+ (reader error: invalid leading UTF-8 octet: #BA at 0)
+ (reader error: invalid leading UTF-8 octet: #BB at 0)
+ (reader error: invalid leading UTF-8 octet: #BC at 0)
+ (reader error: invalid leading UTF-8 octet: #BD at 0)
+ (reader error: invalid leading UTF-8 octet: #BE at 0)
+ (reader error: invalid leading UTF-8 octet: #BF at 0)
32 first bytes of 2-byte sequences {0xc0-0xdf}:
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
+ (reader error: invalid trailing UTF-8 octet: #20 at 1)
16 first bytes of 3-byte sequences {0xe0-0xef}:
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
8 first bytes of 4-byte sequences {0xf0-0xf7}:
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
4 first bytes of 5-byte sequences {0xf8-0xfb}:
+ (reader error: invalid leading UTF-8 octet: #F8 at 0)
+ (reader error: invalid leading UTF-8 octet: #F9 at 0)
+ (reader error: invalid leading UTF-8 octet: #FA at 0)
+ (reader error: invalid leading UTF-8 octet: #FB at 0)
2 first bytes of 6-byte sequences {0xfc-0xfd}:
+ (reader error: invalid leading UTF-8 octet: #FC at 0)
+ (reader error: invalid leading UTF-8 octet: #FD at 0)
sequences with last byte missing {u-0}:
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: invalid leading UTF-8 octet: #F8 at 0)
+ (reader error: invalid leading UTF-8 octet: #FC at 0)
sequences with last byte missing {u-...FF}:
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: incomplete UTF-8 octet sequence at 0)
+ (reader error: invalid leading UTF-8 octet: #FB at 0)
+ (reader error: invalid leading UTF-8 octet: #FD at 0)
impossible bytes:
+ (reader error: invalid leading UTF-8 octet: #FE at 0)
+ (reader error: invalid leading UTF-8 octet: #FF at 0)
+ (reader error: invalid leading UTF-8 octet: #FE at 0)
overlong sequences {u-2f}:
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid leading UTF-8 octet: #F8 at 0)
+ (reader error: invalid leading UTF-8 octet: #FC at 0)
maximum overlong sequences:
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid leading UTF-8 octet: #F8 at 0)
+ (reader error: invalid leading UTF-8 octet: #FC at 0)
overlong representation of the NUL character:
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid length of a UTF-8 sequence at 0)
+ (reader error: invalid leading UTF-8 octet: #F8 at 0)
+ (reader error: invalid leading UTF-8 octet: #FC at 0)
single UTF-16 surrogates:
+ (reader error: invalid Unicode character: #D800 at 0)
+ (reader error: invalid Unicode character: #DB7F at 0)
+ (reader error: invalid Unicode character: #DB80 at 0)
+ (reader error: invalid Unicode character: #DBFF at 0)
+ (reader error: invalid Unicode character: #DC00 at 0)
+ (reader error: invalid Unicode character: #DF80 at 0)
+ (reader error: invalid Unicode character: #DFFF at 0)
paired UTF-16 surrogates:
+ (reader error: invalid Unicode character: #D800 at 0)
+ (reader error: invalid Unicode character: #D800 at 0)
+ (reader error: invalid Unicode character: #DB7F at 0)
+ (reader error: invalid Unicode character: #DB7F at 0)
+ (reader error: invalid Unicode character: #DB80 at 0)
+ (reader error: invalid Unicode character: #DB80 at 0)
+ (reader error: invalid Unicode character: #DBFF at 0)
+ (reader error: invalid Unicode character: #DBFF at 0)
other illegal code positions:
+ (reader error: control characters are not allowed: #FFFE at 0)
+ (reader error: control characters are not allowed: #FFFF at 0)
checking utf-8 sequences: 0 fail(s)
checking boms...
no bom (utf-8): +
bom (utf-8): +
bom (utf-16-le): +
bom (utf-16-be): +
checking boms: 0 fail(s)
checking a long utf8 sequence...
checking a long utf8 sequence: 0 fail(s)
checking a long utf16 sequence...
checking a long utf16 sequence: 0 fail(s)
PASS: test-reader
sizeof(token) = 80
sizeof(event) = 104
sizeof(parser) = 480
PASS: test-version
DURATION: 0
END: /usr/lib/libyaml/ptest
STOP: ptest-runner
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
Changes in v4:
- Remove conditional check in do_install_ptest
- Use libtool --mode=install instead of direct install from .libs/
- Don't redirect test output to allow debugging of failures
Changes in v3:
- Remove redundant executable check in run_test function
Changes in v2:
- Remove hardcoded version from test summary
- Remove static XFAIL/XPASS/ERROR lines (always 0)
- Move PTEST_TESTS definition above functions for better readability
- Auto-discover test binaries in run-ptest
---
.../distro/include/ptest-packagelists.inc | 1 +
.../recipes-support/libyaml/libyaml/run-ptest | 38 +++++++++++++++++++
meta/recipes-support/libyaml/libyaml_0.2.5.bb | 19 +++++++++-
3 files changed, 56 insertions(+), 2 deletions(-)
create mode 100755 meta/recipes-support/libyaml/libyaml/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 06d113e264..6a0c23586e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -49,6 +49,7 @@ PTESTS_FAST = "\
libxml-simple-perl \
libxml2 \
libxmlb \
+ libyaml \
logrotate \
lua \
lzo \
diff --git a/meta/recipes-support/libyaml/libyaml/run-ptest b/meta/recipes-support/libyaml/libyaml/run-ptest
new file mode 100755
index 0000000000..fa7d9bdb5a
--- /dev/null
+++ b/meta/recipes-support/libyaml/libyaml/run-ptest
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# run-ptest - Execute libyaml test suite
+
+cd tests || exit 1
+
+TOTAL=0
+PASS=0
+FAIL=0
+
+run_test() {
+ test_name="$1"
+ test_bin="./${test_name}"
+
+ TOTAL=$((TOTAL + 1))
+
+ if ${test_bin}; then
+ echo "PASS: ${test_name}"
+ PASS=$((PASS + 1))
+ else
+ echo "FAIL: ${test_name}"
+ FAIL=$((FAIL + 1))
+ return 1
+ fi
+}
+
+for test_bin in ./test-*; do
+ if [ -x "${test_bin}" ]; then
+ test_name=$(basename "${test_bin}")
+ run_test "${test_name}"
+ fi
+done
+
+echo "# TOTAL: ${TOTAL}"
+echo "# PASS: ${PASS}"
+echo "# FAIL: ${FAIL}"
+
+test ${FAIL} -eq 0
diff --git a/meta/recipes-support/libyaml/libyaml_0.2.5.bb b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
index 0d8e8762d5..3587f2f250 100644
--- a/meta/recipes-support/libyaml/libyaml_0.2.5.bb
+++ b/meta/recipes-support/libyaml/libyaml_0.2.5.bb
@@ -7,14 +7,29 @@ SECTION = "libs/devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://License;md5=7bbd28caa69f81f5cd5f48647236663d"
-SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz"
+SRC_URI = "https://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
+ file://run-ptest \
+"
SRC_URI[sha256sum] = "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
S = "${UNPACKDIR}/yaml-${PV}"
-inherit autotools
+inherit autotools ptest
DISABLE_STATIC:class-nativesdk = ""
DISABLE_STATIC:class-native = ""
BBCLASSEXTEND = "native nativesdk"
+
+PTEST_TESTS = "test-version test-reader"
+
+do_compile_ptest() {
+ oe_runmake -C tests ${PTEST_TESTS}
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ for test in ${PTEST_TESTS}; do
+ ${B}/libtool --mode=install install ${B}/tests/${test} ${D}${PTEST_PATH}/tests/
+ done
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-01-08 9:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 10:56 [OE-core][PATCH] libyaml: add ptest support Pratik Farkase
2025-11-21 11:22 ` Yoann Congal
2025-11-21 11:57 ` Pratik Farkase
2025-11-21 11:54 ` [OE-core][PATCH v2] " Pratik Farkase
2025-11-21 12:32 ` Yoann Congal
2025-11-21 13:17 ` Pratik Farkase
2025-11-21 13:13 ` [OE-core][PATCH v3] " Pratik Farkase
2025-11-21 14:46 ` Yoann Congal
2025-12-01 17:39 ` Ross Burton
2025-12-04 13:24 ` Ross Burton
2026-01-08 9:17 ` [OE-core][PATCH v4] " Pratik Farkase
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox