public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [OE-core][PATCH v1] libconfig: add ptest support
@ 2026-01-28 14:06 Pratik Farkase
  2026-01-29  0:26 ` Randy MacLeod
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Pratik Farkase @ 2026-01-28 14:06 UTC (permalink / raw)
  To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase

Add ptest support to enable automated testing of libconfig
using ptest-runner.

The implementation uses libtool --mode=install to properly
install test binaries, avoiding issues with libtool wrapper
scripts. Tests are built via 'make check TESTS=' to compile
without running during the build phase.

The test suite includes 16 tests covering parsing, formatting,
binary/hex values, escaped strings, and various edge cases.
All tests pass successfully on qemux86-64 :
START: ptest-runner
BEGIN: /usr/lib/libconfig/ptest
[TEST] ParsingAndFormatting
parsing testdata/input_0.cfg
parsing testdata/input_1.cfg
parsing testdata/input_2.cfg
parsing testdata/input_3.cfg
parsing testdata/input_4.cfg
parsing testdata/input_5.cfg
parsing testdata/input_6.cfg
parsing testdata/input_7.cfg
[ OK ] ParsingAndFormatting

[TEST] ParseInvalidFiles
[ OK ] ParseInvalidFiles

[TEST] ParseInvalidStrings
[ OK ] ParseInvalidStrings

[TEST] BigInt1
[ OK ] BigInt1

[TEST] BigInt2
[ OK ] BigInt2

[TEST] BigInt3
[ OK ] BigInt3

[TEST] BigInt4
[ OK ] BigInt4

[TEST] BigInt5
[ OK ] BigInt5

[TEST] BigInt6
[ OK ] BigInt6

[TEST] BigInt7
[ OK ] BigInt7

[TEST] RemoveSetting
[ OK ] RemoveSetting

[TEST] EscapedStrings
[ OK ] EscapedStrings

[TEST] OverrideSetting
[ OK ] OverrideSetting

[TEST] SettingLookups
[ OK ] SettingLookups

[TEST] ReadStream
[ OK ] ReadStream

[TEST] BinaryAndHex
some auto big hex: 4294967296
some auto big bin: 8589934591
negativehex: -1430532899
[ OK ] BinaryAndHex

16 tests; 16 passed, 0 failed
PASS: libconfig_tests
DURATION: 0
END: /usr/lib/libconfig/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++
 .../libconfig/libconfig_1.8.2.bb              | 21 ++++++++++++++++++-
 3 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 739995bcfe..7c5810f252 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -29,6 +29,7 @@ PTESTS_FAST = "\
     json-c \
     json-glib \
     libcheck \
+    libconfig \
     libconvert-asn1-perl \
     libexif \
     libgpg-error\
diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
new file mode 100755
index 0000000000..d81fcf4def
--- /dev/null
+++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+cd tests
+
+for t in libconfig_tests; do
+    if [ -x ./$t ]; then
+        ./$t
+        if [ $? -eq 0 ]; then
+            echo "PASS: $t"
+        else
+            echo "FAIL: $t"
+        fi
+    else
+        echo "SKIP: $t"
+    fi
+done
diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
index 6e08a7b04b..9ae0ce2e6e 100644
--- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
+++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"
 
 SRC_URI = " \
     git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
+    file://run-ptest \
 "
 SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
 
@@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
 
 UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
 PACKAGE_BEFORE_PN = "${PN}++"
 FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
@@ -27,3 +28,21 @@ do_compile:prepend() {
     rm -f ${S}/lib/grammar.[ch]
     rm -f ${S}/lib/scanner.[ch]
 }
+
+do_compile_ptest() {
+    oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+
+    if [ -f ${B}/tests/libconfig_tests ]; then
+        libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
+    fi
+
+    if [ -d ${S}/tests/testdata ]; then
+        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
+    fi
+}
+
+RDEPENDS:${PN}-ptest += "bash"
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-01-28 14:06 [OE-core][PATCH v1] libconfig: add ptest support Pratik Farkase
@ 2026-01-29  0:26 ` Randy MacLeod
  2026-01-29  8:33   ` Pratik Farkase
  2026-01-29  8:30 ` [OE-core][PATCH v2] " Pratik Farkase
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Randy MacLeod @ 2026-01-29  0:26 UTC (permalink / raw)
  To: pratik.farkase, openembedded-core; +Cc: pratik.farkase

[-- Attachment #1: Type: text/plain, Size: 5424 bytes --]

Hi Pratik,

On 2026-01-28 9:06 a.m., Pratik Farkase via lists.openembedded.org wrote:
> Add ptest support to enable automated testing of libconfig
> using ptest-runner.
Nice, thanks.
>
> The implementation uses libtool --mode=install to properly
> install test binaries, avoiding issues with libtool wrapper
> scripts. Tests are built via 'make check TESTS=' to compile
> without running during the build phase.
>
> The test suite includes 16 tests covering parsing, formatting,
> binary/hex values, escaped strings, and various edge cases.
> All tests pass successfully on qemux86-64 :
> START: ptest-runner
> BEGIN: /usr/lib/libconfig/ptest
> [TEST] ParsingAndFormatting
> parsing testdata/input_0.cfg
> parsing testdata/input_1.cfg
> parsing testdata/input_2.cfg
> parsing testdata/input_3.cfg
> parsing testdata/input_4.cfg
> parsing testdata/input_5.cfg
> parsing testdata/input_6.cfg
> parsing testdata/input_7.cfg
> [ OK ] ParsingAndFormatting
>
> [TEST] ParseInvalidFiles
> [ OK ] ParseInvalidFiles
>
> [TEST] ParseInvalidStrings
> [ OK ] ParseInvalidStrings
>
> [TEST] BigInt1
> [ OK ] BigInt1
>
> [TEST] BigInt2
> [ OK ] BigInt2
>
> [TEST] BigInt3
> [ OK ] BigInt3
>
> [TEST] BigInt4
> [ OK ] BigInt4
>
> [TEST] BigInt5
> [ OK ] BigInt5
>
> [TEST] BigInt6
> [ OK ] BigInt6
>
> [TEST] BigInt7
> [ OK ] BigInt7
>
> [TEST] RemoveSetting
> [ OK ] RemoveSetting
>
> [TEST] EscapedStrings
> [ OK ] EscapedStrings
>
> [TEST] OverrideSetting
> [ OK ] OverrideSetting
>
> [TEST] SettingLookups
> [ OK ] SettingLookups
>
> [TEST] ReadStream
> [ OK ] ReadStream
>
> [TEST] BinaryAndHex
> some auto big hex: 4294967296
> some auto big bin: 8589934591
> negativehex: -1430532899
> [ OK ] BinaryAndHex
>
> 16 tests; 16 passed, 0 failed
> PASS: libconfig_tests
> DURATION: 0
> END: /usr/lib/libconfig/ptest
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
>
> Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
> Signed-off-by: Pratik Farkase<pratik.farkase@est.tech>
> ---
>   .../distro/include/ptest-packagelists.inc     |  1 +
>   .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++
>   .../libconfig/libconfig_1.8.2.bb              | 21 ++++++++++++++++++-
>   3 files changed, 37 insertions(+), 1 deletion(-)
>   create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index 739995bcfe..7c5810f252 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -29,6 +29,7 @@ PTESTS_FAST = "\
>       json-c \
>       json-glib \
>       libcheck \
> +    libconfig \
>       libconvert-asn1-perl \
>       libexif \
>       libgpg-error\
> diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
> new file mode 100755
> index 0000000000..d81fcf4def
> --- /dev/null
> +++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +cd tests
> +
> +for t in libconfig_tests; do
> +    if [ -x ./$t ]; then
> +        ./$t
> +        if [ $? -eq 0 ]; then
> +            echo "PASS: $t"
> +        else
> +            echo "FAIL: $t"
> +        fi
> +    else
> +        echo "SKIP: $t"
> +    fi
> +done
> diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> index 6e08a7b04b..9ae0ce2e6e 100644
> --- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> +++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM ="file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"
>   
>   SRC_URI = " \
>       git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
> +file://run-ptest \
>   "
>   SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
>   
> @@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
>   
>   UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
>   
> -inherit autotools pkgconfig
> +inherit autotools pkgconfig ptest
>   
>   PACKAGE_BEFORE_PN = "${PN}++"
>   FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}" @@ -27,3 +28,21 @@ do_compile:prepend() { rm -f 
> ${S}/lib/grammar.[ch] rm -f ${S}/lib/scanner.[ch] } + 
> +do_compile_ptest() { + oe_runmake -C tests check TESTS= +} + 
> +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + + if [ -f 
> ${B}/tests/libconfig_tests ]; then + libtool --mode=install install -m 
> 0755 ${B}/tests/libconfig_tests 
> ${D}${PTEST_PATH}/tests/libconfig_tests + fi + + if [ -d 
> ${S}/tests/testdata ]; then + cp -r ${S}/tests/testdata 
> ${D}${PTEST_PATH}/tests/ + fi +} + +RDEPENDS:${PN}-ptest += "bash"
Why do you need bash rather than any posix shell?
We run the ptests in a minimal environment so if busybox shell works, 
please drop this.

If not, please either remove the bash dependency or explain it in the 
commit log.

Thanks,

../Randy


>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#230097):https://lists.openembedded.org/g/openembedded-core/message/230097
> Mute This Topic:https://lists.openembedded.org/mt/117507676/3616765
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

-- 
# Randy MacLeod
# Wind River Linux

[-- Attachment #2: Type: text/html, Size: 7441 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [OE-core][PATCH v2] libconfig: add ptest support
  2026-01-28 14:06 [OE-core][PATCH v1] libconfig: add ptest support Pratik Farkase
  2026-01-29  0:26 ` Randy MacLeod
@ 2026-01-29  8:30 ` Pratik Farkase
  2026-02-04 14:58 ` [OE-core][PATCH v3] " Pratik Farkase
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Pratik Farkase @ 2026-01-29  8:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase

Add ptest support to enable automated testing of libconfig
using ptest-runner.

The implementation uses libtool --mode=install to properly
install test binaries, avoiding issues with libtool wrapper
scripts. Tests are built via 'make check TESTS=' to compile
without running during the build phase.

The test suite includes 16 tests covering parsing, formatting,
binary/hex values, escaped strings, and various edge cases.
All tests pass successfully on qemux86-64 :
START: ptest-runner
BEGIN: /usr/lib/libconfig/ptest
[TEST] ParsingAndFormatting
parsing testdata/input_0.cfg
parsing testdata/input_1.cfg
parsing testdata/input_2.cfg
parsing testdata/input_3.cfg
parsing testdata/input_4.cfg
parsing testdata/input_5.cfg
parsing testdata/input_6.cfg
parsing testdata/input_7.cfg
[ OK ] ParsingAndFormatting

[TEST] ParseInvalidFiles
[ OK ] ParseInvalidFiles

[TEST] ParseInvalidStrings
[ OK ] ParseInvalidStrings

[TEST] BigInt1
[ OK ] BigInt1

[TEST] BigInt2
[ OK ] BigInt2

[TEST] BigInt3
[ OK ] BigInt3

[TEST] BigInt4
[ OK ] BigInt4

[TEST] BigInt5
[ OK ] BigInt5

[TEST] BigInt6
[ OK ] BigInt6

[TEST] BigInt7
[ OK ] BigInt7

[TEST] RemoveSetting
[ OK ] RemoveSetting

[TEST] EscapedStrings
[ OK ] EscapedStrings

[TEST] OverrideSetting
[ OK ] OverrideSetting

[TEST] SettingLookups
[ OK ] SettingLookups

[TEST] ReadStream
[ OK ] ReadStream

[TEST] BinaryAndHex
some auto big hex: 4294967296
some auto big bin: 8589934591
negativehex: -1430532899
[ OK ] BinaryAndHex

16 tests; 16 passed, 0 failed
PASS: libconfig_tests
DURATION: 0
END: /usr/lib/libconfig/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>

---
Changes in v2:
- Removed RDEPENDS on bash
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++++
 .../libconfig/libconfig_1.8.2.bb              | 19 ++++++++++++++++++-
 3 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 739995bcfe..7c5810f252 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -29,6 +29,7 @@ PTESTS_FAST = "\
     json-c \
     json-glib \
     libcheck \
+    libconfig \
     libconvert-asn1-perl \
     libexif \
     libgpg-error\
diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
new file mode 100755
index 0000000000..d81fcf4def
--- /dev/null
+++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+cd tests
+
+for t in libconfig_tests; do
+    if [ -x ./$t ]; then
+        ./$t
+        if [ $? -eq 0 ]; then
+            echo "PASS: $t"
+        else
+            echo "FAIL: $t"
+        fi
+    else
+        echo "SKIP: $t"
+    fi
+done
diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
index 6e08a7b04b..f4319545f3 100644
--- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
+++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"
 
 SRC_URI = " \
     git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
+    file://run-ptest \
 "
 SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
 
@@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
 
 UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
 PACKAGE_BEFORE_PN = "${PN}++"
 FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
@@ -27,3 +28,19 @@ do_compile:prepend() {
     rm -f ${S}/lib/grammar.[ch]
     rm -f ${S}/lib/scanner.[ch]
 }
+
+do_compile_ptest() {
+    oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+
+    if [ -f ${B}/tests/libconfig_tests ]; then
+        libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
+    fi
+
+    if [ -d ${S}/tests/testdata ]; then
+        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
+    fi
+}
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-01-29  0:26 ` Randy MacLeod
@ 2026-01-29  8:33   ` Pratik Farkase
  2026-02-04 11:09     ` Alexander Kanavin
  0 siblings, 1 reply; 16+ messages in thread
From: Pratik Farkase @ 2026-01-29  8:33 UTC (permalink / raw)
  To: Randy MacLeod, openembedded-core@lists.openembedded.org
  Cc: pratik.farkase@ericsson.com

Hi Randy,

Good catch! You're absolutely right - the bash dependency was unnecessary.

I've removed the RDEPENDS on bash. Patch v2 is sent separately.

Thanks for the review!

Best Regards,
Pratik

________________________________________
From: Randy MacLeod <randy.macleod@windriver.com>
Sent: Thursday, January 29, 2026 1:26 AM
To: Pratik Farkase; openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support

Hi Pratik,

On 2026-01-28 9:06 a.m., Pratik Farkase via lists.openembedded.org wrote:

Add ptest support to enable automated testing of libconfig
using ptest-runner.

Nice, thanks.



The implementation uses libtool --mode=install to properly
install test binaries, avoiding issues with libtool wrapper
scripts. Tests are built via 'make check TESTS=' to compile
without running during the build phase.

The test suite includes 16 tests covering parsing, formatting,
binary/hex values, escaped strings, and various edge cases.
All tests pass successfully on qemux86-64 :
START: ptest-runner
BEGIN: /usr/lib/libconfig/ptest
[TEST] ParsingAndFormatting
parsing testdata/input_0.cfg
parsing testdata/input_1.cfg
parsing testdata/input_2.cfg
parsing testdata/input_3.cfg
parsing testdata/input_4.cfg
parsing testdata/input_5.cfg
parsing testdata/input_6.cfg
parsing testdata/input_7.cfg
[ OK ] ParsingAndFormatting

[TEST] ParseInvalidFiles
[ OK ] ParseInvalidFiles

[TEST] ParseInvalidStrings
[ OK ] ParseInvalidStrings

[TEST] BigInt1
[ OK ] BigInt1

[TEST] BigInt2
[ OK ] BigInt2

[TEST] BigInt3
[ OK ] BigInt3

[TEST] BigInt4
[ OK ] BigInt4

[TEST] BigInt5
[ OK ] BigInt5

[TEST] BigInt6
[ OK ] BigInt6

[TEST] BigInt7
[ OK ] BigInt7

[TEST] RemoveSetting
[ OK ] RemoveSetting

[TEST] EscapedStrings
[ OK ] EscapedStrings

[TEST] OverrideSetting
[ OK ] OverrideSetting

[TEST] SettingLookups
[ OK ] SettingLookups

[TEST] ReadStream
[ OK ] ReadStream

[TEST] BinaryAndHex
some auto big hex: 4294967296
some auto big bin: 8589934591
negativehex: -1430532899
[ OK ] BinaryAndHex

16 tests; 16 passed, 0 failed
PASS: libconfig_tests
DURATION: 0
END: /usr/lib/libconfig/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech><mailto:pratik.farkase@est.tech>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++
 .../libconfig/libconfig_1.8.2.bb              | 21 ++++++++++++++++++-
 3 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 739995bcfe..7c5810f252 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -29,6 +29,7 @@ PTESTS_FAST = "\
     json-c \
     json-glib \
     libcheck \
+    libconfig \
     libconvert-asn1-perl \
     libexif \
     libgpg-error\
diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
new file mode 100755
index 0000000000..d81fcf4def
--- /dev/null
+++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+cd tests
+
+for t in libconfig_tests; do
+    if [ -x ./$t ]; then
+        ./$t
+        if [ $? -eq 0 ]; then
+            echo "PASS: $t"
+        else
+            echo "FAIL: $t"
+        fi
+    else
+        echo "SKIP: $t"
+    fi
+done
diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
index 6e08a7b04b..9ae0ce2e6e 100644
--- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
+++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"<file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac>

 SRC_URI = " \
     git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
+    file://run-ptest \
 "
 SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"

@@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"

 UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"

-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest

 PACKAGE_BEFORE_PN = "${PN}++"
 FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
@@ -27,3 +28,21 @@ do_compile:prepend() {
     rm -f ${S}/lib/grammar.[ch]
     rm -f ${S}/lib/scanner.[ch]
 }
+
+do_compile_ptest() {
+    oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+
+    if [ -f ${B}/tests/libconfig_tests ]; then
+        libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
+    fi
+
+    if [ -d ${S}/tests/testdata ]; then
+        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
+    fi
+}
+
+RDEPENDS:${PN}-ptest += "<mailto:@@-27,3+28,21@@do_compile:prepend(){rm-f${S}/lib/grammar.[ch]rm-f${S}/lib/scanner.[ch]}++do_compile_ptest(){+oe_runmake-CtestscheckTESTS=+}++do_install_ptest(){+install-d${D}${PTEST_PATH}/tests++if[-f${B}/tests/libconfig_tests];then+libtool--mode=installinstall-m0755${B}/tests/libconfig_tests${D}${PTEST_PATH}/tests/libconfig_tests+fi++if[-d${S}/tests/testdata];then+cp-r${S}/tests/testdata${D}${PTEST_PATH}/tests/+fi+}++RDEPENDS:${PN}-ptest+=>bash"

Why do you need bash rather than any posix shell?
We run the ptests in a minimal environment so if busybox shell works, please drop this.

If not, please either remove the bash dependency or explain it in the commit log.

Thanks,

../Randy







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#230097): https://lists.openembedded.org/g/openembedded-core/message/230097
Mute This Topic: https://lists.openembedded.org/mt/117507676/3616765
Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core+owner@lists.openembedded.org>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com<mailto:randy.macleod@windriver.com>]
-=-=-=-=-=-=-=-=-=-=-=-




--
# Randy MacLeod
# Wind River Linux


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-01-29  8:33   ` Pratik Farkase
@ 2026-02-04 11:09     ` Alexander Kanavin
  2026-02-04 12:02       ` Mathieu Dubois-Briand
  2026-02-04 15:12       ` Pratik Farkase
  0 siblings, 2 replies; 16+ messages in thread
From: Alexander Kanavin @ 2026-02-04 11:09 UTC (permalink / raw)
  To: pratik.farkase
  Cc: Randy MacLeod, openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com, Richard Purdie

Unfortunately this was merged to master prematurely, and I just had to
sent a revert:

https://lists.openembedded.org/g/openembedded-core/message/230509

Please address the issues and resend.

Alex


On Thu, 29 Jan 2026 at 09:33, Pratik Farkase via
lists.openembedded.org
<pratik.farkase=est.tech@lists.openembedded.org> wrote:
>
> Hi Randy,
>
> Good catch! You're absolutely right - the bash dependency was unnecessary.
>
> I've removed the RDEPENDS on bash. Patch v2 is sent separately.
>
> Thanks for the review!
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Randy MacLeod <randy.macleod@windriver.com>
> Sent: Thursday, January 29, 2026 1:26 AM
> To: Pratik Farkase; openembedded-core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com
> Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support
>
> Hi Pratik,
>
> On 2026-01-28 9:06 a.m., Pratik Farkase via lists.openembedded.org wrote:
>
> Add ptest support to enable automated testing of libconfig
> using ptest-runner.
>
> Nice, thanks.
>
>
>
> The implementation uses libtool --mode=install to properly
> install test binaries, avoiding issues with libtool wrapper
> scripts. Tests are built via 'make check TESTS=' to compile
> without running during the build phase.
>
> The test suite includes 16 tests covering parsing, formatting,
> binary/hex values, escaped strings, and various edge cases.
> All tests pass successfully on qemux86-64 :
> START: ptest-runner
> BEGIN: /usr/lib/libconfig/ptest
> [TEST] ParsingAndFormatting
> parsing testdata/input_0.cfg
> parsing testdata/input_1.cfg
> parsing testdata/input_2.cfg
> parsing testdata/input_3.cfg
> parsing testdata/input_4.cfg
> parsing testdata/input_5.cfg
> parsing testdata/input_6.cfg
> parsing testdata/input_7.cfg
> [ OK ] ParsingAndFormatting
>
> [TEST] ParseInvalidFiles
> [ OK ] ParseInvalidFiles
>
> [TEST] ParseInvalidStrings
> [ OK ] ParseInvalidStrings
>
> [TEST] BigInt1
> [ OK ] BigInt1
>
> [TEST] BigInt2
> [ OK ] BigInt2
>
> [TEST] BigInt3
> [ OK ] BigInt3
>
> [TEST] BigInt4
> [ OK ] BigInt4
>
> [TEST] BigInt5
> [ OK ] BigInt5
>
> [TEST] BigInt6
> [ OK ] BigInt6
>
> [TEST] BigInt7
> [ OK ] BigInt7
>
> [TEST] RemoveSetting
> [ OK ] RemoveSetting
>
> [TEST] EscapedStrings
> [ OK ] EscapedStrings
>
> [TEST] OverrideSetting
> [ OK ] OverrideSetting
>
> [TEST] SettingLookups
> [ OK ] SettingLookups
>
> [TEST] ReadStream
> [ OK ] ReadStream
>
> [TEST] BinaryAndHex
> some auto big hex: 4294967296
> some auto big bin: 8589934591
> negativehex: -1430532899
> [ OK ] BinaryAndHex
>
> 16 tests; 16 passed, 0 failed
> PASS: libconfig_tests
> DURATION: 0
> END: /usr/lib/libconfig/ptest
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
>
> Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech><mailto:pratik.farkase@est.tech>
> ---
>  .../distro/include/ptest-packagelists.inc     |  1 +
>  .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++
>  .../libconfig/libconfig_1.8.2.bb              | 21 ++++++++++++++++++-
>  3 files changed, 37 insertions(+), 1 deletion(-)
>  create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index 739995bcfe..7c5810f252 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -29,6 +29,7 @@ PTESTS_FAST = "\
>      json-c \
>      json-glib \
>      libcheck \
> +    libconfig \
>      libconvert-asn1-perl \
>      libexif \
>      libgpg-error\
> diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
> new file mode 100755
> index 0000000000..d81fcf4def
> --- /dev/null
> +++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +cd tests
> +
> +for t in libconfig_tests; do
> +    if [ -x ./$t ]; then
> +        ./$t
> +        if [ $? -eq 0 ]; then
> +            echo "PASS: $t"
> +        else
> +            echo "FAIL: $t"
> +        fi
> +    else
> +        echo "SKIP: $t"
> +    fi
> +done
> diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> index 6e08a7b04b..9ae0ce2e6e 100644
> --- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> +++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"<file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac>
>
>  SRC_URI = " \
>      git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
> +    file://run-ptest \
>  "
>  SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
>
> @@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
>
>  UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
>
> -inherit autotools pkgconfig
> +inherit autotools pkgconfig ptest
>
>  PACKAGE_BEFORE_PN = "${PN}++"
>  FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
> @@ -27,3 +28,21 @@ do_compile:prepend() {
>      rm -f ${S}/lib/grammar.[ch]
>      rm -f ${S}/lib/scanner.[ch]
>  }
> +
> +do_compile_ptest() {
> +    oe_runmake -C tests check TESTS=
> +}
> +
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +
> +    if [ -f ${B}/tests/libconfig_tests ]; then
> +        libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
> +    fi
> +
> +    if [ -d ${S}/tests/testdata ]; then
> +        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
> +    fi
> +}
> +
> +RDEPENDS:${PN}-ptest += "<mailto:@@-27,3+28,21@@do_compile:prepend(){rm-f${S}/lib/grammar.[ch]rm-f${S}/lib/scanner.[ch]}++do_compile_ptest(){+oe_runmake-CtestscheckTESTS=+}++do_install_ptest(){+install-d${D}${PTEST_PATH}/tests++if[-f${B}/tests/libconfig_tests];then+libtool--mode=installinstall-m0755${B}/tests/libconfig_tests${D}${PTEST_PATH}/tests/libconfig_tests+fi++if[-d${S}/tests/testdata];then+cp-r${S}/tests/testdata${D}${PTEST_PATH}/tests/+fi+}++RDEPENDS:${PN}-ptest+=>bash"
>
> Why do you need bash rather than any posix shell?
> We run the ptests in a minimal environment so if busybox shell works, please drop this.
>
> If not, please either remove the bash dependency or explain it in the commit log.
>
> Thanks,
>
> ../Randy
>
>
>
>
>
>
>
>
>
>
>
>
> --
> # Randy MacLeod
> # Wind River Linux
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#230125): https://lists.openembedded.org/g/openembedded-core/message/230125
> Mute This Topic: https://lists.openembedded.org/mt/117507676/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-02-04 11:09     ` Alexander Kanavin
@ 2026-02-04 12:02       ` Mathieu Dubois-Briand
  2026-02-04 15:12       ` Pratik Farkase
  1 sibling, 0 replies; 16+ messages in thread
From: Mathieu Dubois-Briand @ 2026-02-04 12:02 UTC (permalink / raw)
  To: alex.kanavin, pratik.farkase
  Cc: Randy MacLeod, openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com, Richard Purdie

On Wed Feb 4, 2026 at 12:09 PM CET, Alexander Kanavin via lists.openembedded.org wrote:
> Unfortunately this was merged to master prematurely, and I just had to
> sent a revert:
>
> https://lists.openembedded.org/g/openembedded-core/message/230509
>
> Please address the issues and resend.
>
> Alex
>

Just to be clear: the v2 was merged, not this v1. Yet, I confirm we
have the issues mentioned by Alex.

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [OE-core][PATCH v3] libconfig: add ptest support
  2026-01-28 14:06 [OE-core][PATCH v1] libconfig: add ptest support Pratik Farkase
  2026-01-29  0:26 ` Randy MacLeod
  2026-01-29  8:30 ` [OE-core][PATCH v2] " Pratik Farkase
@ 2026-02-04 14:58 ` Pratik Farkase
  2026-02-10 12:13   ` Ross Burton
  2026-02-10 18:47 ` [OE-core][PATCH v4] " Pratik Farkase
  2026-02-10 20:39 ` [OE-core][PATCH v5] " Pratik Farkase
  4 siblings, 1 reply; 16+ messages in thread
From: Pratik Farkase @ 2026-02-04 14:58 UTC (permalink / raw)
  To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase

Add ptest support to enable automated testing of libconfig
using ptest-runner.

The implementation uses libtool --mode=install to properly
install test binaries, avoiding issues with libtool wrapper
scripts. Tests are built via 'make check TESTS=' to compile
without running during the build phase.

The test suite includes 16 tests covering parsing, formatting,
binary/hex values, escaped strings, and various edge cases.
All tests pass successfully on qemux86-64 :
START: ptest-runner
BEGIN: /usr/lib/libconfig/ptest
[TEST] ParsingAndFormatting
parsing testdata/input_0.cfg
parsing testdata/input_1.cfg
parsing testdata/input_2.cfg
parsing testdata/input_3.cfg
parsing testdata/input_4.cfg
parsing testdata/input_5.cfg
parsing testdata/input_6.cfg
parsing testdata/input_7.cfg
[ OK ] ParsingAndFormatting

[TEST] ParseInvalidFiles
[ OK ] ParseInvalidFiles

[TEST] ParseInvalidStrings
[ OK ] ParseInvalidStrings

[TEST] BigInt1
[ OK ] BigInt1

[TEST] BigInt2
[ OK ] BigInt2

[TEST] BigInt3
[ OK ] BigInt3

[TEST] BigInt4
[ OK ] BigInt4

[TEST] BigInt5
[ OK ] BigInt5

[TEST] BigInt6
[ OK ] BigInt6

[TEST] BigInt7
[ OK ] BigInt7

[TEST] RemoveSetting
[ OK ] RemoveSetting

[TEST] EscapedStrings
[ OK ] EscapedStrings

[TEST] OverrideSetting
[ OK ] OverrideSetting

[TEST] SettingLookups
[ OK ] SettingLookups

[TEST] ReadStream
[ OK ] ReadStream

[TEST] BinaryAndHex
some auto big hex: 4294967296
some auto big bin: 8589934591
negativehex: -1430532899
[ OK ] BinaryAndHex

16 tests; 16 passed, 0 failed
PASS: libconfig_tests
DURATION: 0
END: /usr/lib/libconfig/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>

---
Changes in v3:
- Use ${B}/libtool instead of libtool from PATH
- Fixes TMPDIR build path leakage
- Resolves ptest runtime dependency QA warnings

Changes in v2:
- Removed RDEPENDS on bash
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++++
 .../libconfig/libconfig_1.8.2.bb              | 19 ++++++++++++++++++-
 3 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 739995bcfe..7c5810f252 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -29,6 +29,7 @@ PTESTS_FAST = "\
     json-c \
     json-glib \
     libcheck \
+    libconfig \
     libconvert-asn1-perl \
     libexif \
     libgpg-error\
diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
new file mode 100755
index 0000000000..d81fcf4def
--- /dev/null
+++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+cd tests
+
+for t in libconfig_tests; do
+    if [ -x ./$t ]; then
+        ./$t
+        if [ $? -eq 0 ]; then
+            echo "PASS: $t"
+        else
+            echo "FAIL: $t"
+        fi
+    else
+        echo "SKIP: $t"
+    fi
+done
diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
index 6e08a7b04b..7a17791aeb 100644
--- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
+++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"
 
 SRC_URI = " \
     git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
+    file://run-ptest \
 "
 SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
 
@@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
 
 UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
 PACKAGE_BEFORE_PN = "${PN}++"
 FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
@@ -27,3 +28,19 @@ do_compile:prepend() {
     rm -f ${S}/lib/grammar.[ch]
     rm -f ${S}/lib/scanner.[ch]
 }
+
+do_compile_ptest() {
+    oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+
+    if [ -f ${B}/tests/libconfig_tests ]; then
+        ${B}/libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
+    fi
+
+    if [ -d ${S}/tests/testdata ]; then
+        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
+    fi
+}
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-02-04 11:09     ` Alexander Kanavin
  2026-02-04 12:02       ` Mathieu Dubois-Briand
@ 2026-02-04 15:12       ` Pratik Farkase
  2026-02-04 15:14         ` Alexander Kanavin
  1 sibling, 1 reply; 16+ messages in thread
From: Pratik Farkase @ 2026-02-04 15:12 UTC (permalink / raw)
  To: Alexander Kanavin
  Cc: Randy MacLeod, openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com, Richard Purdie

Hi,

Thanks for catching this error. I have sent a v3 separately.

Best Regards,
Pratik

________________________________________
From: Alexander Kanavin <alex.kanavin@gmail.com>
Sent: Wednesday, February 4, 2026 12:09 PM
To: Pratik Farkase
Cc: Randy MacLeod; openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com; Richard Purdie
Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support

Unfortunately this was merged to master prematurely, and I just had to
sent a revert:

https://lists.openembedded.org/g/openembedded-core/message/230509

Please address the issues and resend.

Alex


On Thu, 29 Jan 2026 at 09:33, Pratik Farkase via
lists.openembedded.org
<pratik.farkase=est.tech@lists.openembedded.org> wrote:
>
> Hi Randy,
>
> Good catch! You're absolutely right - the bash dependency was unnecessary.
>
> I've removed the RDEPENDS on bash. Patch v2 is sent separately.
>
> Thanks for the review!
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Randy MacLeod <randy.macleod@windriver.com>
> Sent: Thursday, January 29, 2026 1:26 AM
> To: Pratik Farkase; openembedded-core@lists.openembedded.org
> Cc: pratik.farkase@ericsson.com
> Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support
>
> Hi Pratik,
>
> On 2026-01-28 9:06 a.m., Pratik Farkase via lists.openembedded.org wrote:
>
> Add ptest support to enable automated testing of libconfig
> using ptest-runner.
>
> Nice, thanks.
>
>
>
> The implementation uses libtool --mode=install to properly
> install test binaries, avoiding issues with libtool wrapper
> scripts. Tests are built via 'make check TESTS=' to compile
> without running during the build phase.
>
> The test suite includes 16 tests covering parsing, formatting,
> binary/hex values, escaped strings, and various edge cases.
> All tests pass successfully on qemux86-64 :
> START: ptest-runner
> BEGIN: /usr/lib/libconfig/ptest
> [TEST] ParsingAndFormatting
> parsing testdata/input_0.cfg
> parsing testdata/input_1.cfg
> parsing testdata/input_2.cfg
> parsing testdata/input_3.cfg
> parsing testdata/input_4.cfg
> parsing testdata/input_5.cfg
> parsing testdata/input_6.cfg
> parsing testdata/input_7.cfg
> [ OK ] ParsingAndFormatting
>
> [TEST] ParseInvalidFiles
> [ OK ] ParseInvalidFiles
>
> [TEST] ParseInvalidStrings
> [ OK ] ParseInvalidStrings
>
> [TEST] BigInt1
> [ OK ] BigInt1
>
> [TEST] BigInt2
> [ OK ] BigInt2
>
> [TEST] BigInt3
> [ OK ] BigInt3
>
> [TEST] BigInt4
> [ OK ] BigInt4
>
> [TEST] BigInt5
> [ OK ] BigInt5
>
> [TEST] BigInt6
> [ OK ] BigInt6
>
> [TEST] BigInt7
> [ OK ] BigInt7
>
> [TEST] RemoveSetting
> [ OK ] RemoveSetting
>
> [TEST] EscapedStrings
> [ OK ] EscapedStrings
>
> [TEST] OverrideSetting
> [ OK ] OverrideSetting
>
> [TEST] SettingLookups
> [ OK ] SettingLookups
>
> [TEST] ReadStream
> [ OK ] ReadStream
>
> [TEST] BinaryAndHex
> some auto big hex: 4294967296
> some auto big bin: 8589934591
> negativehex: -1430532899
> [ OK ] BinaryAndHex
>
> 16 tests; 16 passed, 0 failed
> PASS: libconfig_tests
> DURATION: 0
> END: /usr/lib/libconfig/ptest
> STOP: ptest-runner
> TOTAL: 1 FAIL: 0
>
> Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
> Signed-off-by: Pratik Farkase <pratik.farkase@est.tech><mailto:pratik.farkase@est.tech>
> ---
>  .../distro/include/ptest-packagelists.inc     |  1 +
>  .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++
>  .../libconfig/libconfig_1.8.2.bb              | 21 ++++++++++++++++++-
>  3 files changed, 37 insertions(+), 1 deletion(-)
>  create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index 739995bcfe..7c5810f252 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -29,6 +29,7 @@ PTESTS_FAST = "\
>      json-c \
>      json-glib \
>      libcheck \
> +    libconfig \
>      libconvert-asn1-perl \
>      libexif \
>      libgpg-error\
> diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
> new file mode 100755
> index 0000000000..d81fcf4def
> --- /dev/null
> +++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +cd tests
> +
> +for t in libconfig_tests; do
> +    if [ -x ./$t ]; then
> +        ./$t
> +        if [ $? -eq 0 ]; then
> +            echo "PASS: $t"
> +        else
> +            echo "FAIL: $t"
> +        fi
> +    else
> +        echo "SKIP: $t"
> +    fi
> +done
> diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> index 6e08a7b04b..9ae0ce2e6e 100644
> --- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> +++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"<file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac>
>
>  SRC_URI = " \
>      git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
> +    file://run-ptest \
>  "
>  SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
>
> @@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
>
>  UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
>
> -inherit autotools pkgconfig
> +inherit autotools pkgconfig ptest
>
>  PACKAGE_BEFORE_PN = "${PN}++"
>  FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
> @@ -27,3 +28,21 @@ do_compile:prepend() {
>      rm -f ${S}/lib/grammar.[ch]
>      rm -f ${S}/lib/scanner.[ch]
>  }
> +
> +do_compile_ptest() {
> +    oe_runmake -C tests check TESTS=
> +}
> +
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +
> +    if [ -f ${B}/tests/libconfig_tests ]; then
> +        libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
> +    fi
> +
> +    if [ -d ${S}/tests/testdata ]; then
> +        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
> +    fi
> +}
> +
> +RDEPENDS:${PN}-ptest += "<mailto:@@-27,3+28,21@@do_compile:prepend(){rm-f${S}/lib/grammar.[ch]rm-f${S}/lib/scanner.[ch]}++do_compile_ptest(){+oe_runmake-CtestscheckTESTS=+}++do_install_ptest(){+install-d${D}${PTEST_PATH}/tests++if[-f${B}/tests/libconfig_tests];then+libtool--mode=installinstall-m0755${B}/tests/libconfig_tests${D}${PTEST_PATH}/tests/libconfig_tests+fi++if[-d${S}/tests/testdata];then+cp-r${S}/tests/testdata${D}${PTEST_PATH}/tests/+fi+}++RDEPENDS:${PN}-ptest+=>bash"
>
> Why do you need bash rather than any posix shell?
> We run the ptests in a minimal environment so if busybox shell works, please drop this.
>
> If not, please either remove the bash dependency or explain it in the commit log.
>
> Thanks,
>
> ../Randy
>
>
>
>
>
>
>
>
>
>
>
>
> --
> # Randy MacLeod
> # Wind River Linux
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#230125): https://lists.openembedded.org/g/openembedded-core/message/230125
> Mute This Topic: https://lists.openembedded.org/mt/117507676/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-02-04 15:12       ` Pratik Farkase
@ 2026-02-04 15:14         ` Alexander Kanavin
  2026-02-04 15:16           ` Pratik Farkase
  2026-02-04 15:18           ` Quentin Schulz
  0 siblings, 2 replies; 16+ messages in thread
From: Alexander Kanavin @ 2026-02-04 15:14 UTC (permalink / raw)
  To: Pratik Farkase
  Cc: Randy MacLeod, openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com, Richard Purdie

I am struggling to see if there are any differences in v3 compared to
v2 though. Can you point them out please?

Alex

On Wed, 4 Feb 2026 at 16:12, Pratik Farkase <pratik.farkase@est.tech> wrote:
>
> Hi,
>
> Thanks for catching this error. I have sent a v3 separately.
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: Wednesday, February 4, 2026 12:09 PM
> To: Pratik Farkase
> Cc: Randy MacLeod; openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com; Richard Purdie
> Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support
>
> Unfortunately this was merged to master prematurely, and I just had to
> sent a revert:
>
> https://lists.openembedded.org/g/openembedded-core/message/230509
>
> Please address the issues and resend.
>
> Alex
>
>
> On Thu, 29 Jan 2026 at 09:33, Pratik Farkase via
> lists.openembedded.org
> <pratik.farkase=est.tech@lists.openembedded.org> wrote:
> >
> > Hi Randy,
> >
> > Good catch! You're absolutely right - the bash dependency was unnecessary.
> >
> > I've removed the RDEPENDS on bash. Patch v2 is sent separately.
> >
> > Thanks for the review!
> >
> > Best Regards,
> > Pratik
> >
> > ________________________________________
> > From: Randy MacLeod <randy.macleod@windriver.com>
> > Sent: Thursday, January 29, 2026 1:26 AM
> > To: Pratik Farkase; openembedded-core@lists.openembedded.org
> > Cc: pratik.farkase@ericsson.com
> > Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support
> >
> > Hi Pratik,
> >
> > On 2026-01-28 9:06 a.m., Pratik Farkase via lists.openembedded.org wrote:
> >
> > Add ptest support to enable automated testing of libconfig
> > using ptest-runner.
> >
> > Nice, thanks.
> >
> >
> >
> > The implementation uses libtool --mode=install to properly
> > install test binaries, avoiding issues with libtool wrapper
> > scripts. Tests are built via 'make check TESTS=' to compile
> > without running during the build phase.
> >
> > The test suite includes 16 tests covering parsing, formatting,
> > binary/hex values, escaped strings, and various edge cases.
> > All tests pass successfully on qemux86-64 :
> > START: ptest-runner
> > BEGIN: /usr/lib/libconfig/ptest
> > [TEST] ParsingAndFormatting
> > parsing testdata/input_0.cfg
> > parsing testdata/input_1.cfg
> > parsing testdata/input_2.cfg
> > parsing testdata/input_3.cfg
> > parsing testdata/input_4.cfg
> > parsing testdata/input_5.cfg
> > parsing testdata/input_6.cfg
> > parsing testdata/input_7.cfg
> > [ OK ] ParsingAndFormatting
> >
> > [TEST] ParseInvalidFiles
> > [ OK ] ParseInvalidFiles
> >
> > [TEST] ParseInvalidStrings
> > [ OK ] ParseInvalidStrings
> >
> > [TEST] BigInt1
> > [ OK ] BigInt1
> >
> > [TEST] BigInt2
> > [ OK ] BigInt2
> >
> > [TEST] BigInt3
> > [ OK ] BigInt3
> >
> > [TEST] BigInt4
> > [ OK ] BigInt4
> >
> > [TEST] BigInt5
> > [ OK ] BigInt5
> >
> > [TEST] BigInt6
> > [ OK ] BigInt6
> >
> > [TEST] BigInt7
> > [ OK ] BigInt7
> >
> > [TEST] RemoveSetting
> > [ OK ] RemoveSetting
> >
> > [TEST] EscapedStrings
> > [ OK ] EscapedStrings
> >
> > [TEST] OverrideSetting
> > [ OK ] OverrideSetting
> >
> > [TEST] SettingLookups
> > [ OK ] SettingLookups
> >
> > [TEST] ReadStream
> > [ OK ] ReadStream
> >
> > [TEST] BinaryAndHex
> > some auto big hex: 4294967296
> > some auto big bin: 8589934591
> > negativehex: -1430532899
> > [ OK ] BinaryAndHex
> >
> > 16 tests; 16 passed, 0 failed
> > PASS: libconfig_tests
> > DURATION: 0
> > END: /usr/lib/libconfig/ptest
> > STOP: ptest-runner
> > TOTAL: 1 FAIL: 0
> >
> > Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
> > Signed-off-by: Pratik Farkase <pratik.farkase@est.tech><mailto:pratik.farkase@est.tech>
> > ---
> >  .../distro/include/ptest-packagelists.inc     |  1 +
> >  .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++
> >  .../libconfig/libconfig_1.8.2.bb              | 21 ++++++++++++++++++-
> >  3 files changed, 37 insertions(+), 1 deletion(-)
> >  create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest
> >
> > diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> > index 739995bcfe..7c5810f252 100644
> > --- a/meta/conf/distro/include/ptest-packagelists.inc
> > +++ b/meta/conf/distro/include/ptest-packagelists.inc
> > @@ -29,6 +29,7 @@ PTESTS_FAST = "\
> >      json-c \
> >      json-glib \
> >      libcheck \
> > +    libconfig \
> >      libconvert-asn1-perl \
> >      libexif \
> >      libgpg-error\
> > diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
> > new file mode 100755
> > index 0000000000..d81fcf4def
> > --- /dev/null
> > +++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
> > @@ -0,0 +1,16 @@
> > +#!/bin/sh
> > +
> > +cd tests
> > +
> > +for t in libconfig_tests; do
> > +    if [ -x ./$t ]; then
> > +        ./$t
> > +        if [ $? -eq 0 ]; then
> > +            echo "PASS: $t"
> > +        else
> > +            echo "FAIL: $t"
> > +        fi
> > +    else
> > +        echo "SKIP: $t"
> > +    fi
> > +done
> > diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> > index 6e08a7b04b..9ae0ce2e6e 100644
> > --- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> > +++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> > @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"<file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac>
> >
> >  SRC_URI = " \
> >      git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
> > +    file://run-ptest \
> >  "
> >  SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
> >
> > @@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
> >
> >  UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
> >
> > -inherit autotools pkgconfig
> > +inherit autotools pkgconfig ptest
> >
> >  PACKAGE_BEFORE_PN = "${PN}++"
> >  FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
> > @@ -27,3 +28,21 @@ do_compile:prepend() {
> >      rm -f ${S}/lib/grammar.[ch]
> >      rm -f ${S}/lib/scanner.[ch]
> >  }
> > +
> > +do_compile_ptest() {
> > +    oe_runmake -C tests check TESTS=
> > +}
> > +
> > +do_install_ptest() {
> > +    install -d ${D}${PTEST_PATH}/tests
> > +
> > +    if [ -f ${B}/tests/libconfig_tests ]; then
> > +        libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
> > +    fi
> > +
> > +    if [ -d ${S}/tests/testdata ]; then
> > +        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
> > +    fi
> > +}
> > +
> > +RDEPENDS:${PN}-ptest += "<mailto:@@-27,3+28,21@@do_compile:prepend(){rm-f${S}/lib/grammar.[ch]rm-f${S}/lib/scanner.[ch]}++do_compile_ptest(){+oe_runmake-CtestscheckTESTS=+}++do_install_ptest(){+install-d${D}${PTEST_PATH}/tests++if[-f${B}/tests/libconfig_tests];then+libtool--mode=installinstall-m0755${B}/tests/libconfig_tests${D}${PTEST_PATH}/tests/libconfig_tests+fi++if[-d${S}/tests/testdata];then+cp-r${S}/tests/testdata${D}${PTEST_PATH}/tests/+fi+}++RDEPENDS:${PN}-ptest+=>bash"
> >
> > Why do you need bash rather than any posix shell?
> > We run the ptests in a minimal environment so if busybox shell works, please drop this.
> >
> > If not, please either remove the bash dependency or explain it in the commit log.
> >
> > Thanks,
> >
> > ../Randy
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > # Randy MacLeod
> > # Wind River Linux
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#230125): https://lists.openembedded.org/g/openembedded-core/message/230125
> > Mute This Topic: https://lists.openembedded.org/mt/117507676/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-02-04 15:14         ` Alexander Kanavin
@ 2026-02-04 15:16           ` Pratik Farkase
  2026-02-04 15:18           ` Quentin Schulz
  1 sibling, 0 replies; 16+ messages in thread
From: Pratik Farkase @ 2026-02-04 15:16 UTC (permalink / raw)
  To: Alexander Kanavin
  Cc: Randy MacLeod, openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com, Richard Purdie

We use ${B}/libtool instead of libtool from PATH. The build was invoking the host/native libtool instead of the
package-specific libtool generated during the configure step.

Best Regards,
Pratik

________________________________________
From: Alexander Kanavin <alex.kanavin@gmail.com>
Sent: Wednesday, February 4, 2026 4:14 PM
To: Pratik Farkase
Cc: Randy MacLeod; openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com; Richard Purdie
Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support

I am struggling to see if there are any differences in v3 compared to
v2 though. Can you point them out please?

Alex

On Wed, 4 Feb 2026 at 16:12, Pratik Farkase <pratik.farkase@est.tech> wrote:
>
> Hi,
>
> Thanks for catching this error. I have sent a v3 separately.
>
> Best Regards,
> Pratik
>
> ________________________________________
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: Wednesday, February 4, 2026 12:09 PM
> To: Pratik Farkase
> Cc: Randy MacLeod; openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com; Richard Purdie
> Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support
>
> Unfortunately this was merged to master prematurely, and I just had to
> sent a revert:
>
> https://lists.openembedded.org/g/openembedded-core/message/230509
>
> Please address the issues and resend.
>
> Alex
>
>
> On Thu, 29 Jan 2026 at 09:33, Pratik Farkase via
> lists.openembedded.org
> <pratik.farkase=est.tech@lists.openembedded.org> wrote:
> >
> > Hi Randy,
> >
> > Good catch! You're absolutely right - the bash dependency was unnecessary.
> >
> > I've removed the RDEPENDS on bash. Patch v2 is sent separately.
> >
> > Thanks for the review!
> >
> > Best Regards,
> > Pratik
> >
> > ________________________________________
> > From: Randy MacLeod <randy.macleod@windriver.com>
> > Sent: Thursday, January 29, 2026 1:26 AM
> > To: Pratik Farkase; openembedded-core@lists.openembedded.org
> > Cc: pratik.farkase@ericsson.com
> > Subject: Re: [OE-core][PATCH v1] libconfig: add ptest support
> >
> > Hi Pratik,
> >
> > On 2026-01-28 9:06 a.m., Pratik Farkase via lists.openembedded.org wrote:
> >
> > Add ptest support to enable automated testing of libconfig
> > using ptest-runner.
> >
> > Nice, thanks.
> >
> >
> >
> > The implementation uses libtool --mode=install to properly
> > install test binaries, avoiding issues with libtool wrapper
> > scripts. Tests are built via 'make check TESTS=' to compile
> > without running during the build phase.
> >
> > The test suite includes 16 tests covering parsing, formatting,
> > binary/hex values, escaped strings, and various edge cases.
> > All tests pass successfully on qemux86-64 :
> > START: ptest-runner
> > BEGIN: /usr/lib/libconfig/ptest
> > [TEST] ParsingAndFormatting
> > parsing testdata/input_0.cfg
> > parsing testdata/input_1.cfg
> > parsing testdata/input_2.cfg
> > parsing testdata/input_3.cfg
> > parsing testdata/input_4.cfg
> > parsing testdata/input_5.cfg
> > parsing testdata/input_6.cfg
> > parsing testdata/input_7.cfg
> > [ OK ] ParsingAndFormatting
> >
> > [TEST] ParseInvalidFiles
> > [ OK ] ParseInvalidFiles
> >
> > [TEST] ParseInvalidStrings
> > [ OK ] ParseInvalidStrings
> >
> > [TEST] BigInt1
> > [ OK ] BigInt1
> >
> > [TEST] BigInt2
> > [ OK ] BigInt2
> >
> > [TEST] BigInt3
> > [ OK ] BigInt3
> >
> > [TEST] BigInt4
> > [ OK ] BigInt4
> >
> > [TEST] BigInt5
> > [ OK ] BigInt5
> >
> > [TEST] BigInt6
> > [ OK ] BigInt6
> >
> > [TEST] BigInt7
> > [ OK ] BigInt7
> >
> > [TEST] RemoveSetting
> > [ OK ] RemoveSetting
> >
> > [TEST] EscapedStrings
> > [ OK ] EscapedStrings
> >
> > [TEST] OverrideSetting
> > [ OK ] OverrideSetting
> >
> > [TEST] SettingLookups
> > [ OK ] SettingLookups
> >
> > [TEST] ReadStream
> > [ OK ] ReadStream
> >
> > [TEST] BinaryAndHex
> > some auto big hex: 4294967296
> > some auto big bin: 8589934591
> > negativehex: -1430532899
> > [ OK ] BinaryAndHex
> >
> > 16 tests; 16 passed, 0 failed
> > PASS: libconfig_tests
> > DURATION: 0
> > END: /usr/lib/libconfig/ptest
> > STOP: ptest-runner
> > TOTAL: 1 FAIL: 0
> >
> > Change-Id: Ibd69ccd63ce0168571d46a199c08be59ea748d69
> > Signed-off-by: Pratik Farkase <pratik.farkase@est.tech><mailto:pratik.farkase@est.tech>
> > ---
> >  .../distro/include/ptest-packagelists.inc     |  1 +
> >  .../libconfig/libconfig/run-ptest             | 16 ++++++++++++++
> >  .../libconfig/libconfig_1.8.2.bb              | 21 ++++++++++++++++++-
> >  3 files changed, 37 insertions(+), 1 deletion(-)
> >  create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest
> >
> > diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> > index 739995bcfe..7c5810f252 100644
> > --- a/meta/conf/distro/include/ptest-packagelists.inc
> > +++ b/meta/conf/distro/include/ptest-packagelists.inc
> > @@ -29,6 +29,7 @@ PTESTS_FAST = "\
> >      json-c \
> >      json-glib \
> >      libcheck \
> > +    libconfig \
> >      libconvert-asn1-perl \
> >      libexif \
> >      libgpg-error\
> > diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
> > new file mode 100755
> > index 0000000000..d81fcf4def
> > --- /dev/null
> > +++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
> > @@ -0,0 +1,16 @@
> > +#!/bin/sh
> > +
> > +cd tests
> > +
> > +for t in libconfig_tests; do
> > +    if [ -x ./$t ]; then
> > +        ./$t
> > +        if [ $? -eq 0 ]; then
> > +            echo "PASS: $t"
> > +        else
> > +            echo "FAIL: $t"
> > +        fi
> > +    else
> > +        echo "SKIP: $t"
> > +    fi
> > +done
> > diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> > index 6e08a7b04b..9ae0ce2e6e 100644
> > --- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> > +++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
> > @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"<file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac>
> >
> >  SRC_URI = " \
> >      git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
> > +    file://run-ptest \
> >  "
> >  SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
> >
> > @@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
> >
> >  UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
> >
> > -inherit autotools pkgconfig
> > +inherit autotools pkgconfig ptest
> >
> >  PACKAGE_BEFORE_PN = "${PN}++"
> >  FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
> > @@ -27,3 +28,21 @@ do_compile:prepend() {
> >      rm -f ${S}/lib/grammar.[ch]
> >      rm -f ${S}/lib/scanner.[ch]
> >  }
> > +
> > +do_compile_ptest() {
> > +    oe_runmake -C tests check TESTS=
> > +}
> > +
> > +do_install_ptest() {
> > +    install -d ${D}${PTEST_PATH}/tests
> > +
> > +    if [ -f ${B}/tests/libconfig_tests ]; then
> > +        libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
> > +    fi
> > +
> > +    if [ -d ${S}/tests/testdata ]; then
> > +        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
> > +    fi
> > +}
> > +
> > +RDEPENDS:${PN}-ptest += "<mailto:@@-27,3+28,21@@do_compile:prepend(){rm-f${S}/lib/grammar.[ch]rm-f${S}/lib/scanner.[ch]}++do_compile_ptest(){+oe_runmake-CtestscheckTESTS=+}++do_install_ptest(){+install-d${D}${PTEST_PATH}/tests++if[-f${B}/tests/libconfig_tests];then+libtool--mode=installinstall-m0755${B}/tests/libconfig_tests${D}${PTEST_PATH}/tests/libconfig_tests+fi++if[-d${S}/tests/testdata];then+cp-r${S}/tests/testdata${D}${PTEST_PATH}/tests/+fi+}++RDEPENDS:${PN}-ptest+=>bash"
> >
> > Why do you need bash rather than any posix shell?
> > We run the ptests in a minimal environment so if busybox shell works, please drop this.
> >
> > If not, please either remove the bash dependency or explain it in the commit log.
> >
> > Thanks,
> >
> > ../Randy
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > # Randy MacLeod
> > # Wind River Linux
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#230125): https://lists.openembedded.org/g/openembedded-core/message/230125
> > Mute This Topic: https://lists.openembedded.org/mt/117507676/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v1] libconfig: add ptest support
  2026-02-04 15:14         ` Alexander Kanavin
  2026-02-04 15:16           ` Pratik Farkase
@ 2026-02-04 15:18           ` Quentin Schulz
  1 sibling, 0 replies; 16+ messages in thread
From: Quentin Schulz @ 2026-02-04 15:18 UTC (permalink / raw)
  To: alex.kanavin, Pratik Farkase
  Cc: Randy MacLeod, openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com, Richard Purdie

Hi Alex,

On 2/4/26 4:14 PM, Alexander Kanavin via lists.openembedded.org wrote:
> I am struggling to see if there are any differences in v3 compared to
> v2 though. Can you point them out please?
> 

b4 may help you with that:

b4 diff -v 2 3 -- 
https://lore.kernel.org/openembedded-core/CANNYZj8E3-sucj4aqHh-OqzV0Z668aZ+YKUpLWccQboCEgNWHg@mail.gmail.com/T/\#t

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v3] libconfig: add ptest support
  2026-02-04 14:58 ` [OE-core][PATCH v3] " Pratik Farkase
@ 2026-02-10 12:13   ` Ross Burton
  2026-02-10 18:54     ` Pratik Farkase
  0 siblings, 1 reply; 16+ messages in thread
From: Ross Burton @ 2026-02-10 12:13 UTC (permalink / raw)
  To: pratik.farkase@est.tech
  Cc: openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com

Hi Patrik,

> On 4 Feb 2026, at 14:58, Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org> wrote:
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +
> +    if [ -f ${B}/tests/libconfig_tests ]; then
> +        ${B}/libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
> +    fi
> +
> +    if [ -d ${S}/tests/testdata ]; then
> +        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
> +    fi
> +}

Same comments are before: don’t use conditions when installing or running the tests unless there’s a very good reason: we _want_ the build or tests to fail if things change.

(this one hasn’t merged, so please send a v4)

Thanks,
Ross


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [OE-core][PATCH v4] libconfig: add ptest support
  2026-01-28 14:06 [OE-core][PATCH v1] libconfig: add ptest support Pratik Farkase
                   ` (2 preceding siblings ...)
  2026-02-04 14:58 ` [OE-core][PATCH v3] " Pratik Farkase
@ 2026-02-10 18:47 ` Pratik Farkase
  2026-02-10 20:39 ` [OE-core][PATCH v5] " Pratik Farkase
  4 siblings, 0 replies; 16+ messages in thread
From: Pratik Farkase @ 2026-02-10 18:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase

Add ptest support to enable automated testing of libconfig
using ptest-runner.

The implementation uses libtool --mode=install to properly
install test binaries, avoiding issues with libtool wrapper
scripts. Tests are built via 'make check TESTS=' to compile
without running during the build phase.

The test suite includes 16 tests covering parsing, formatting,
binary/hex values, escaped strings, and various edge cases.
All tests pass successfully on qemux86-64 :
START: ptest-runner
BEGIN: /usr/lib/libconfig/ptest
[TEST] ParsingAndFormatting
parsing testdata/input_0.cfg
parsing testdata/input_1.cfg
parsing testdata/input_2.cfg
parsing testdata/input_3.cfg
parsing testdata/input_4.cfg
parsing testdata/input_5.cfg
parsing testdata/input_6.cfg
parsing testdata/input_7.cfg
[ OK ] ParsingAndFormatting

[TEST] ParseInvalidFiles
[ OK ] ParseInvalidFiles

[TEST] ParseInvalidStrings
[ OK ] ParseInvalidStrings

[TEST] BigInt1
[ OK ] BigInt1

[TEST] BigInt2
[ OK ] BigInt2

[TEST] BigInt3
[ OK ] BigInt3

[TEST] BigInt4
[ OK ] BigInt4

[TEST] BigInt5
[ OK ] BigInt5

[TEST] BigInt6
[ OK ] BigInt6

[TEST] BigInt7
[ OK ] BigInt7

[TEST] RemoveSetting
[ OK ] RemoveSetting

[TEST] EscapedStrings
[ OK ] EscapedStrings

[TEST] OverrideSetting
[ OK ] OverrideSetting

[TEST] SettingLookups
[ OK ] SettingLookups

[TEST] ReadStream
[ OK ] ReadStream

[TEST] BinaryAndHex
some auto big hex: 4294967296
some auto big bin: 8589934591
negativehex: -1430532899
[ OK ] BinaryAndHex

16 tests; 16 passed, 0 failed
PASS: libconfig_tests
DURATION: 0
END: /usr/lib/libconfig/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>

---
Changes in v4:
- Remove conditional installation guards in do_install_ptest()

Changes in v3:
- Use ${B}/libtool instead of libtool from PATH
- Fixes TMPDIR build path leakage
- Resolves ptest runtime dependency QA warnings

Changes in v2:
- Removed RDEPENDS on bash
---
 meta/conf/distro/include/ptest-packagelists.inc  |  1 +
 .../libconfig/libconfig/run-ptest                | 16 ++++++++++++++++
 .../libconfig/libconfig_1.8.2.bb                 | 13 ++++++++++++-
 3 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 739995bcfe..7c5810f252 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -29,6 +29,7 @@ PTESTS_FAST = "\
     json-c \
     json-glib \
     libcheck \
+    libconfig \
     libconvert-asn1-perl \
     libexif \
     libgpg-error\
diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
new file mode 100755
index 0000000000..d81fcf4def
--- /dev/null
+++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+cd tests
+
+for t in libconfig_tests; do
+    if [ -x ./$t ]; then
+        ./$t
+        if [ $? -eq 0 ]; then
+            echo "PASS: $t"
+        else
+            echo "FAIL: $t"
+        fi
+    else
+        echo "SKIP: $t"
+    fi
+done
diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
index 6e08a7b04b..c3582828f7 100644
--- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
+++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"
 
 SRC_URI = " \
     git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
+    file://run-ptest \
 "
 SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
 
@@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
 
 UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
 PACKAGE_BEFORE_PN = "${PN}++"
 FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
@@ -27,3 +28,13 @@ do_compile:prepend() {
     rm -f ${S}/lib/grammar.[ch]
     rm -f ${S}/lib/scanner.[ch]
 }
+
+do_compile_ptest() {
+    oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    ${B}/libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
+    cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
+}
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v3] libconfig: add ptest support
  2026-02-10 12:13   ` Ross Burton
@ 2026-02-10 18:54     ` Pratik Farkase
  2026-02-10 20:41       ` Pratik Farkase
  0 siblings, 1 reply; 16+ messages in thread
From: Pratik Farkase @ 2026-02-10 18:54 UTC (permalink / raw)
  To: Ross Burton
  Cc: openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com

Hi Ross,

Thanks for the review.

I have removed the conditional checks in do_install_ptest() so the build will fail if the test artifacts are missing, as suggested. Patch v4 is sent here:

https://lore.kernel.org/all/20260210184719.7219-1-pratik.farkase@est.tech/

Thanks for your feedback. I will keep this in mind for future implementations. 

Best Regards,
Pratik


________________________________________
From: Ross Burton <Ross.Burton@arm.com>
Sent: Tuesday, February 10, 2026 1:13 PM
To: Pratik Farkase
Cc: openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v3] libconfig: add ptest support

Hi Patrik,

> On 4 Feb 2026, at 14:58, Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org> wrote:
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +
> +    if [ -f ${B}/tests/libconfig_tests ]; then
> +        ${B}/libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
> +    fi
> +
> +    if [ -d ${S}/tests/testdata ]; then
> +        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
> +    fi
> +}

Same comments are before: don’t use conditions when installing or running the tests unless there’s a very good reason: we _want_ the build or tests to fail if things change.

(this one hasn’t merged, so please send a v4)

Thanks,
Ross



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [OE-core][PATCH v5] libconfig: add ptest support
  2026-01-28 14:06 [OE-core][PATCH v1] libconfig: add ptest support Pratik Farkase
                   ` (3 preceding siblings ...)
  2026-02-10 18:47 ` [OE-core][PATCH v4] " Pratik Farkase
@ 2026-02-10 20:39 ` Pratik Farkase
  4 siblings, 0 replies; 16+ messages in thread
From: Pratik Farkase @ 2026-02-10 20:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase

Add ptest support to enable automated testing of libconfig
using ptest-runner.

The implementation uses libtool --mode=install to properly
install test binaries, avoiding issues with libtool wrapper
scripts. Tests are built via 'make check TESTS=' to compile
without running during the build phase.

The test suite includes 16 tests covering parsing, formatting,
binary/hex values, escaped strings, and various edge cases.
All tests pass successfully on qemux86-64 :
START: ptest-runner
BEGIN: /usr/lib/libconfig/ptest
[TEST] ParsingAndFormatting
parsing testdata/input_0.cfg
parsing testdata/input_1.cfg
parsing testdata/input_2.cfg
parsing testdata/input_3.cfg
parsing testdata/input_4.cfg
parsing testdata/input_5.cfg
parsing testdata/input_6.cfg
parsing testdata/input_7.cfg
[ OK ] ParsingAndFormatting

[TEST] ParseInvalidFiles
[ OK ] ParseInvalidFiles

[TEST] ParseInvalidStrings
[ OK ] ParseInvalidStrings

[TEST] BigInt1
[ OK ] BigInt1

[TEST] BigInt2
[ OK ] BigInt2

[TEST] BigInt3
[ OK ] BigInt3

[TEST] BigInt4
[ OK ] BigInt4

[TEST] BigInt5
[ OK ] BigInt5

[TEST] BigInt6
[ OK ] BigInt6

[TEST] BigInt7
[ OK ] BigInt7

[TEST] RemoveSetting
[ OK ] RemoveSetting

[TEST] EscapedStrings
[ OK ] EscapedStrings

[TEST] OverrideSetting
[ OK ] OverrideSetting

[TEST] SettingLookups
[ OK ] SettingLookups

[TEST] ReadStream
[ OK ] ReadStream

[TEST] BinaryAndHex
some auto big hex: 4294967296
some auto big bin: 8589934591
negativehex: -1430532899
[ OK ] BinaryAndHex

16 tests; 16 passed, 0 failed
PASS: libconfig_tests
DURATION: 0
END: /usr/lib/libconfig/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>

---
Changes in v5:
- Remove existence checks from run-ptest

Changes in v4:
- Remove conditional installation guards in do_install_ptest()

Changes in v3:
- Use ${B}/libtool instead of libtool from PATH
- Fixes TMPDIR build path leakage
- Resolves ptest runtime dependency QA warnings

Changes in v2:
- Removed RDEPENDS on bash
---
 meta/conf/distro/include/ptest-packagelists.inc     |  1 +
 meta/recipes-extended/libconfig/libconfig/run-ptest | 12 ++++++++++++
 meta/recipes-extended/libconfig/libconfig_1.8.2.bb  | 13 ++++++++++++-
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-extended/libconfig/libconfig/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 739995bcfe..7c5810f252 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -29,6 +29,7 @@ PTESTS_FAST = "\
     json-c \
     json-glib \
     libcheck \
+    libconfig \
     libconvert-asn1-perl \
     libexif \
     libgpg-error\
diff --git a/meta/recipes-extended/libconfig/libconfig/run-ptest b/meta/recipes-extended/libconfig/libconfig/run-ptest
new file mode 100755
index 0000000000..047d9554be
--- /dev/null
+++ b/meta/recipes-extended/libconfig/libconfig/run-ptest
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cd tests
+
+for t in libconfig_tests; do
+    ./$t
+    if [ $? -eq 0 ]; then
+        echo "PASS: $t"
+    else
+        echo "FAIL: $t"
+    fi
+done
diff --git a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
index 6e08a7b04b..c3582828f7 100644
--- a/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
+++ b/meta/recipes-extended/libconfig/libconfig_1.8.2.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"
 
 SRC_URI = " \
     git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
+    file://run-ptest \
 "
 SRCREV = "a42cb47c1526a4f2ed025fcbb2289863375bc898"
 
@@ -17,7 +18,7 @@ DEPENDS += "bison-native flex-native"
 
 UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
 
 PACKAGE_BEFORE_PN = "${PN}++"
 FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
@@ -27,3 +28,13 @@ do_compile:prepend() {
     rm -f ${S}/lib/grammar.[ch]
     rm -f ${S}/lib/scanner.[ch]
 }
+
+do_compile_ptest() {
+    oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    ${B}/libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
+    cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
+}
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [OE-core][PATCH v3] libconfig: add ptest support
  2026-02-10 18:54     ` Pratik Farkase
@ 2026-02-10 20:41       ` Pratik Farkase
  0 siblings, 0 replies; 16+ messages in thread
From: Pratik Farkase @ 2026-02-10 20:41 UTC (permalink / raw)
  To: Ross Burton
  Cc: openembedded-core@lists.openembedded.org,
	pratik.farkase@ericsson.com

Patch v5 sent here:

https://lists.openembedded.org/g/openembedded-core/message/230936

removes conditional checks for both run-ptest and do_install_ptest().

Best Regards,
Pratik

________________________________________
From: Pratik Farkase <pratik.farkase@est.tech>
Sent: Tuesday, February 10, 2026 7:54 PM
To: Ross Burton
Cc: openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v3] libconfig: add ptest support

Hi Ross,

Thanks for the review.

I have removed the conditional checks in do_install_ptest() so the build will fail if the test artifacts are missing, as suggested. Patch v4 is sent here:

https://lore.kernel.org/all/20260210184719.7219-1-pratik.farkase@est.tech/

Thanks for your feedback. I will keep this in mind for future implementations.

Best Regards,
Pratik


________________________________________
From: Ross Burton <Ross.Burton@arm.com>
Sent: Tuesday, February 10, 2026 1:13 PM
To: Pratik Farkase
Cc: openembedded-core@lists.openembedded.org; pratik.farkase@ericsson.com
Subject: Re: [OE-core][PATCH v3] libconfig: add ptest support

Hi Patrik,

> On 4 Feb 2026, at 14:58, Pratik Farkase via lists.openembedded.org <pratik.farkase=est.tech@lists.openembedded.org> wrote:
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +
> +    if [ -f ${B}/tests/libconfig_tests ]; then
> +        ${B}/libtool --mode=install install -m 0755 ${B}/tests/libconfig_tests ${D}${PTEST_PATH}/tests/libconfig_tests
> +    fi
> +
> +    if [ -d ${S}/tests/testdata ]; then
> +        cp -r ${S}/tests/testdata ${D}${PTEST_PATH}/tests/
> +    fi
> +}

Same comments are before: don’t use conditions when installing or running the tests unless there’s a very good reason: we _want_ the build or tests to fail if things change.

(this one hasn’t merged, so please send a v4)

Thanks,
Ross



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-02-10 20:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28 14:06 [OE-core][PATCH v1] libconfig: add ptest support Pratik Farkase
2026-01-29  0:26 ` Randy MacLeod
2026-01-29  8:33   ` Pratik Farkase
2026-02-04 11:09     ` Alexander Kanavin
2026-02-04 12:02       ` Mathieu Dubois-Briand
2026-02-04 15:12       ` Pratik Farkase
2026-02-04 15:14         ` Alexander Kanavin
2026-02-04 15:16           ` Pratik Farkase
2026-02-04 15:18           ` Quentin Schulz
2026-01-29  8:30 ` [OE-core][PATCH v2] " Pratik Farkase
2026-02-04 14:58 ` [OE-core][PATCH v3] " Pratik Farkase
2026-02-10 12:13   ` Ross Burton
2026-02-10 18:54     ` Pratik Farkase
2026-02-10 20:41       ` Pratik Farkase
2026-02-10 18:47 ` [OE-core][PATCH v4] " Pratik Farkase
2026-02-10 20:39 ` [OE-core][PATCH v5] " Pratik Farkase

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox