From: Khem Raj <[email protected]>

Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit c6618c38daee4b108d804c3a9046b12d60a7e96b)
Signed-off-by: Ankur Tyagi <[email protected]>
---
 ...actory-test-for-musl-libc-compatibil.patch | 29 +++++++++++++++++++
 .../recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 
meta-oe/recipes-core/sdbus-c++/sdbus-c++/0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch

diff --git 
a/meta-oe/recipes-core/sdbus-c++/sdbus-c++/0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch
 
b/meta-oe/recipes-core/sdbus-c++/sdbus-c++/0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch
new file mode 100644
index 0000000000..118d84e290
--- /dev/null
+++ 
b/meta-oe/recipes-core/sdbus-c++/sdbus-c++/0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch
@@ -0,0 +1,29 @@
+From da0d6595c48905ec7d99f1a75878fbeb17972d75 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 26 Nov 2025 23:29:53 -0800
+Subject: [PATCH] test: Fix error factory test for musl libc compatibility
+
+It uses errno value 123456 in test handling of unknown errors. This works
+on glibc which accepts any errno value, but musl libc validates
+errno ranges more strictly (typically 1-133).
+
+Ignore test on non-glibc systems
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/unittests/Types_test.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tests/unittests/Types_test.cpp
++++ b/tests/unittests/Types_test.cpp
+@@ -488,7 +488,7 @@ TEST(AnErrorFactory, CanCreateAnErrorFro
+     EXPECT_TRUE(error.isValid());
+ }
+ 
+-#ifndef SDBUS_basu // Creating error from invalid errno is not supported on 
basu backend
++#if !defined(S0DBUS_basu) && defined(__GLIBC__)  // Creating error from 
invalid errno is not supported on basu backend
+ TEST(AnErrorFactory, CreatesGenericErrorWhenErrnoIsUnknown)
+ {
+     auto error = sdbus::createError(123456, "custom message");
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb 
b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb
index 6cacb5dfe8..43646953f2 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb
@@ -18,6 +18,7 @@ DEPENDS += "expat"
 
 SRCREV = "28b78822cfc5fbec4bd9906168493e9985f586ed"
 SRC_URI = 
"git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master;tag=v${PV}
 \
+           
file://0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch \
            file://run-ptest"
 
 EXTRA_OECMAKE = "-DSDBUSCPP_BUILD_CODEGEN=OFF \
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#122525): 
https://lists.openembedded.org/g/openembedded-devel/message/122525
Mute This Topic: https://lists.openembedded.org/mt/116711299/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to