diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-11-26 23:56:24 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-11-27 08:49:32 -0800 |
| commit | c6618c38daee4b108d804c3a9046b12d60a7e96b (patch) | |
| tree | 0c4dae892c4d507bb10ae61a3eb820e22ea3c56f | |
| parent | 3c40f787eb07e2c0b0b92c9f457a10922dea1008 (diff) | |
| download | meta-openembedded-c6618c38daee4b108d804c3a9046b12d60a7e96b.tar.gz | |
sdbus-c++: Ignore CreatesGenericErrorWhenErrnoIsUnknown test on non-glibc systems
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-core/sdbus-c++/sdbus-c++/0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch | 29 | ||||
| -rw-r--r-- | meta-oe/recipes-core/sdbus-c++/sdbus-c++_2.2.1.bb | 1 |
2 files changed, 30 insertions, 0 deletions
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 @@ | |||
| 1 | From da0d6595c48905ec7d99f1a75878fbeb17972d75 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 26 Nov 2025 23:29:53 -0800 | ||
| 4 | Subject: [PATCH] test: Fix error factory test for musl libc compatibility | ||
| 5 | |||
| 6 | It uses errno value 123456 in test handling of unknown errors. This works | ||
| 7 | on glibc which accepts any errno value, but musl libc validates | ||
| 8 | errno ranges more strictly (typically 1-133). | ||
| 9 | |||
| 10 | Ignore test on non-glibc systems | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | |||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | tests/unittests/Types_test.cpp | 4 ++-- | ||
| 17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | --- a/tests/unittests/Types_test.cpp | ||
| 20 | +++ b/tests/unittests/Types_test.cpp | ||
| 21 | @@ -488,7 +488,7 @@ TEST(AnErrorFactory, CanCreateAnErrorFro | ||
| 22 | EXPECT_TRUE(error.isValid()); | ||
| 23 | } | ||
| 24 | |||
| 25 | -#ifndef SDBUS_basu // Creating error from invalid errno is not supported on basu backend | ||
| 26 | +#if !defined(S0DBUS_basu) && defined(__GLIBC__) // Creating error from invalid errno is not supported on basu backend | ||
| 27 | TEST(AnErrorFactory, CreatesGenericErrorWhenErrnoIsUnknown) | ||
| 28 | { | ||
| 29 | 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" | |||
| 18 | 18 | ||
| 19 | SRCREV = "28b78822cfc5fbec4bd9906168493e9985f586ed" | 19 | SRCREV = "28b78822cfc5fbec4bd9906168493e9985f586ed" |
| 20 | SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master;tag=v${PV} \ | 20 | SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master;tag=v${PV} \ |
| 21 | file://0001-test-Fix-error-factory-test-for-musl-libc-compatibil.patch \ | ||
| 21 | file://run-ptest" | 22 | file://run-ptest" |
| 22 | 23 | ||
| 23 | EXTRA_OECMAKE = "-DSDBUSCPP_BUILD_CODEGEN=OFF \ | 24 | EXTRA_OECMAKE = "-DSDBUSCPP_BUILD_CODEGEN=OFF \ |
