]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
logrotate: avoid testing localized strings
authorGyorgy Sarvari <skandigraun@gmail.com>
Tue, 12 Aug 2025 13:09:03 +0000 (15:09 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Aug 2025 07:18:49 +0000 (08:18 +0100)
During running ptests, the test suite checks for a localized error string
which is different between libc and musl, making this test to fail.

Backport an upstream patch that fixes this by not checking for this particular
error message.

This fixes partially https://bugzilla.yoctoproject.org/show_bug.cgi?id=15811
[YOCTO #15811]

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/logrotate/logrotate/0001-test-avoid-locale-dependent-errno-string.patch [new file with mode: 0644]
meta/recipes-extended/logrotate/logrotate_3.22.0.bb

diff --git a/meta/recipes-extended/logrotate/logrotate/0001-test-avoid-locale-dependent-errno-string.patch b/meta/recipes-extended/logrotate/logrotate/0001-test-avoid-locale-dependent-errno-string.patch
new file mode 100644 (file)
index 0000000..efee912
--- /dev/null
@@ -0,0 +1,27 @@
+From 04b21743980c4e236ca5e8de18173fbd3848573b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Sat, 8 Jun 2024 17:59:40 +0200
+Subject: [PATCH] test: avoid locale dependent errno string
+
+String representations of errno values are locale dependent, thus avoid
+using them.
+
+Upstream-Status: Backport [https://github.com/logrotate/logrotate/commit/04b21743980c4e236ca5e8de18173fbd3848573b]
+Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
+---
+ test/test-0112.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test-0112.sh b/test/test-0112.sh
+index 812632b..fa9eed6 100755
+--- a/test/test-0112.sh
++++ b/test/test-0112.sh
+@@ -23,7 +23,7 @@ test_reg.log.1.gz 1 zero
+ test_reg.log.2.gz 1 first
+ EOF
+-grep "test_fifo.log.1 (read-only) for compression: Operation not supported" error.log >/dev/null
++grep "^error: unable to open .*/test_fifo\.log\.1 (read-only) for compression: " error.log >/dev/null
+ if [ $? != 0 ]; then
+       echo "No error printed, but there should be one."
+       exit 3
index 5c4a0a9807d6586b9d6ebacdc565c588a51bccd7..7995438408291ef3d1a8b10b5d014a8a98edf619 100644 (file)
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz \
            file://run-ptest \
+           file://0001-test-avoid-locale-dependent-errno-string.patch \
            "
 
 SRC_URI[sha256sum] = "42b4080ee99c9fb6a7d12d8e787637d057a635194e25971997eebbe8d5e57618"