Skip to contentSkip to conversation

libgpiod: enable all features for ptest

PATCH In review Bartosz Golaszewski 3 participants 12 messages Apr 11, 2023 – Apr 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 libgpiod: enable all features for ptest

From: Bartosz Golaszewski <[email protected]>

We will fail to install or run all the tests if we don't enable all the features exposed by the libgpiod project.

---
 meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb +2 -2
index becc9adb2..5b882149a 100644
@@ -11,8 +11,8 @@ SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cc
 
 S = "${WORKDIR}/libgpiod-2.0"
 
-# We must enable gpioset-interactive for all gpio-tools tests to pass
-PACKAGECONFIG[tests] = "--enable-tests --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
+# Enable all project features for ptest
+PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
 PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit"
 
 FILES:${PN}-tools += "${bindir}/gpionotify"
Signature · 1 line
2.37.2
#1 lore raw

PATCH 2/4 libgpiod: drop unneeded S assignment

From: Bartosz Golaszewski <[email protected]>

Assigning a value to S is not necessary and it will in fact break the recipe when updating the version so drop it.

---
 meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb | 2 --
 1 file changed, 2 deletions(-)
meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb +0 -2
index 5b882149a..4397641c7 100644
@@ -9,8 +9,6 @@ LIC_FILES_CHKSUM = " \
 
 SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07"
 
-S = "${WORKDIR}/libgpiod-2.0"
-
 # Enable all project features for ptest
 PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
 PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit"
Signature · 1 line
2.37.2
#2 lore raw

PATCH 3/4 libgpiod: generalize the local files directories

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

In order to avoid having to rename the directories containing ptest scripts on every update, use a more generic, per-major-release name and extend the FILESEXTRAPATHS.

---
 .../libgpiod/{libgpiod-1.6.4 => libgpiod-1.x}/run-ptest         | 0
 .../libgpiod/{libgpiod-2.0 => libgpiod-2.x}/run-ptest           | 0
 meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb              | 2 ++
 meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb                | 2 ++
 4 files changed, 4 insertions(+)
 rename meta-oe/recipes-support/libgpiod/{libgpiod-1.6.4 => libgpiod-1.x}/run-ptest (100%)
 rename meta-oe/recipes-support/libgpiod/{libgpiod-2.0 => libgpiod-2.x}/run-ptest (100%)
meta-oe/recipes-support/libgpiod/libgpiod-1.x/run-ptest renamed from meta-oe/recipes-support/libgpiod/libgpiod-1.6.4/run-ptest +0 -0
similarity index 100%
rename from meta-oe/recipes-support/libgpiod/libgpiod-1.6.4/run-ptest
rename to meta-oe/recipes-support/libgpiod/libgpiod-1.x/run-ptest
meta-oe/recipes-support/libgpiod/libgpiod-2.x/run-ptest renamed from meta-oe/recipes-support/libgpiod/libgpiod-2.0/run-ptest +0 -0
similarity index 100%
rename from meta-oe/recipes-support/libgpiod/libgpiod-2.0/run-ptest
rename to meta-oe/recipes-support/libgpiod/libgpiod-2.x/run-ptest
meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb +2 -0
index df0e3f104..b28aa8e69 100644
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
 
 SRC_URI[sha256sum] = "7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5"
 
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-1.x:"
+
 inherit python3native
 
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2"
meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb +2 -0
index 4397641c7..bdfd72f2e 100644
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = " \
     file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \
 "
 
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
+
 SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07"
 
 # Enable all project features for ptest
Signature · 1 line
2.37.2
#3 lore raw

PATCH 4/4 libgpiod: update to v2.0.1

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

This is a bug-fix release addressing bugs discovered since the release of v2.0.

---
 .../libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb}             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-support/libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb} (90%)
meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb renamed from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb +1 -1
similarity index 90%
rename from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb
rename to meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb
index bdfd72f2e..50b9203a7 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = " \
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
 
-SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07"
+SRC_URI[sha256sum] = "b5367d28d045b36007a4ffd42cceda4c358737ef4f2ce22b0c1d05ec57a38392"
 
 # Enable all project features for ptest
 PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
Signature · 1 line
2.37.2
#4 lore raw

Re: [oe] [meta-oe][PATCH 4/4] libgpiod: update to v2.0.1

Quoted 4 lines · Bartosz Golaszewski via lists.openembedded.org

From: Bartosz Golaszewski<[email protected]>

This is a bug-fix release addressing bugs discovered since the release of v2.0.

Should we drop the old recipe?

❯ fd libgpiod meta-oe/recipes-support/libgpiod meta-oe/recipes-support/libgpiod/libgpiod-1.x meta-oe/recipes-support/libgpiod/libgpiod-2.x meta-oe/recipes-support/libgpiod/libgpiod-src.inc meta-oe/recipes-support/libgpiod/libgpiod.inc meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb

I think that v2 was added when it was a release candidate:

https://git.openembedded.org/meta-openembedded/log/?qt=grep&q=libgpiod

../Randy

Quoted 32 lines
---
  .../libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb}             | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

rename meta-oe/recipes-support/libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb} (90%)

meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb renamed from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb +1 -2
similarity index 90%
rename from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb
rename to meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb
index bdfd72f2e..50b9203a7 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = " \
 
  FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
 
-SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07"
+SRC_URI[sha256sum] = "b5367d28d045b36007a4ffd42cceda4c358737ef4f2ce22b0c1d05ec57a38392"
 
  # Enable all project features for ptest
  PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#102057):https://lists.openembedded.org/g/openembedded-devel/message/102057 Mute This Topic:https://lists.openembedded.org/mt/98196930/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#5 lore raw

Re: [oe] [meta-oe][PATCH 4/4] libgpiod: update to v2.0.1

Quoted 20 lines · Randy MacLeod

On 2023-04-11 09:15, Bartosz Golaszewski via lists.openembedded.org wrote:

From: Bartosz Golaszewski <[email protected]>

This is a bug-fix release addressing bugs discovered since the release of v2.0.

Should we drop the old recipe?

❯ fd libgpiod meta-oe/recipes-support/libgpiod meta-oe/recipes-support/libgpiod/libgpiod-1.x meta-oe/recipes-support/libgpiod/libgpiod-2.x meta-oe/recipes-support/libgpiod/libgpiod-src.inc meta-oe/recipes-support/libgpiod/libgpiod.inc meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb

Quoted 7 lines

I think that v2 was added when it was a release candidate:

https://git.openembedded.org/meta-openembedded/log/?qt=grep&q=libgpiod

../Randy

No! v1.6.x is the old major release that's still widely used and I still maintain it.

Bart

Quoted 37 lines
---
 .../libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb}             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-support/libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb} (90%)
meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb renamed from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb +1 -2
similarity index 90%
rename from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb
rename to meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb
index bdfd72f2e..50b9203a7 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = " \
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
 
-SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07"
+SRC_URI[sha256sum] = "b5367d28d045b36007a4ffd42cceda4c358737ef4f2ce22b0c1d05ec57a38392"
 
 # Enable all project features for ptest
 PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#102057): https://lists.openembedded.org/g/openembedded-devel/message/102057
Mute This Topic: https://lists.openembedded.org/mt/98196930/3616765
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
# Randy MacLeod
# Wind River Linux

#6 lore raw

Re: [meta-oe][PATCH 4/4] libgpiod: update to v2.0.1

In reply to Bartosz Golaszewski

still seeing these errors

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2659/steps/14/logs/stdio

Quoted 31 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

This is a bug-fix release addressing bugs discovered since the release of v2.0.

---
 .../libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb}             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-support/libgpiod/{libgpiod_2.0.bb => libgpiod_2.0.1.bb} (90%)
meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb renamed from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb +1 -2
similarity index 90%
rename from meta-oe/recipes-support/libgpiod/libgpiod_2.0.bb
rename to meta-oe/recipes-support/libgpiod/libgpiod_2.0.1.bb
index bdfd72f2e..50b9203a7 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = " \
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
 
-SRC_URI[sha256sum] = "f74cbf82038b3cb98ebeb25bce55ee2553be28194002d2a9889b9268cce2dd07"
+SRC_URI[sha256sum] = "b5367d28d045b36007a4ffd42cceda4c358737ef4f2ce22b0c1d05ec57a38392"
 
 # Enable all project features for ptest
 PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
--

2.37.2

#9 lore raw

Re: [meta-oe][PATCH 4/4] libgpiod: update to v2.0.1

Quoted 3 lines · Khem Raj

https://errors.yoctoproject.org/Errors/Details/699672/

Ah, I need to remember to always test with clang...

This looks like a different bug than the one spotted in libgpiod v2.0-rc1, it appeared now after switching to python3-build based build.

I'll take a look.

Bart

Quoted 12 lines · Bartosz Golaszewski
Quoted 11 lines · Khem Raj
Quoted 5 lines

still seeing these errors

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2659/steps/14/logs/stdio

Seems like this is from python3-gpiod. Can I see the recipe logs somewhere?

Bart

#10 lore raw

Re: [meta-oe][PATCH 4/4] libgpiod: update to v2.0.1

Quoted 8 lines · Bartosz Golaszewski
Quoted 3 lines · Khem Raj

https://errors.yoctoproject.org/Errors/Details/699672/

Ah, I need to remember to always test with clang...

Not clang particularly, but with ptest enabled distro feature the recipe has deleted

PTEST_CFLAGS = "${@bb.utils.contains("PTEST_ENABLED", "1", "-I../../tests/gpiosim", "", d)}"

but its still referenced.

Quoted 20 lines

This looks like a different bug than the one spotted in libgpiod v2.0-rc1, it appeared now after switching to python3-build based build.

I'll take a look.

Bart

Quoted 12 lines · Bartosz Golaszewski
Quoted 11 lines · Khem Raj
Quoted 5 lines

still seeing these errors

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2659/steps/14/logs/stdio

Seems like this is from python3-gpiod. Can I see the recipe logs somewhere?

Bart

#11 lore raw

Re: [meta-oe][PATCH 4/4] libgpiod: update to v2.0.1

Quoted 11 lines · Khem Raj
Quoted 8 lines · Bartosz Golaszewski
Quoted 3 lines · Khem Raj

https://errors.yoctoproject.org/Errors/Details/699672/

Ah, I need to remember to always test with clang...

Quoted 8 lines

Not clang particularly, but with ptest enabled distro feature the recipe has deleted

PTEST_CFLAGS = "${@bb.utils.contains("PTEST_ENABLED", "1", "-I../../tests/gpiosim", "", d)}"

but its still referenced.

Hmm, why did it build for me then? Maybe I need a clean rebuild. The gpiosim.h header is not installed in /usr/include by libgpiod, which may be the problem. The shared library on the other hand should be provided by libgpiod at build-time.

I'm on it, will send a fixed series as soon as I have something.

Bart

Quoted 21 lines
Quoted 21 lines

This looks like a different bug than the one spotted in libgpiod v2.0-rc1, it appeared now after switching to python3-build based build.

I'll take a look.

Bart

Quoted 12 lines · Bartosz Golaszewski
Quoted 11 lines · Khem Raj
Quoted 5 lines

still seeing these errors

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2659/steps/14/logs/stdio

Seems like this is from python3-gpiod. Can I see the recipe logs somewhere?

Bart