ostree: Handle musl's ERANGE mapping

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Alex Kiernan
2023-01-02 22:42:34 +00:00
committed by Khem Raj
parent f3b1b4bbd6
commit 9188812103
2 changed files with 30 additions and 0 deletions
@@ -0,0 +1,29 @@
From bd182584a1e2f820493d9db689598a20c5700ba5 Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alex.kiernan@gmail.com>
Date: Mon, 2 Jan 2023 10:37:49 +0000
Subject: [PATCH] tests: Handle musl's ERANGE mapping
musl uses "Result not representable" for ERANGE, support this in
addition to glibc's "Numerical result out of range".
Upstream-Status: Backport [https://github.com/ostreedev/ostree/commit/2d4ee168d7eae0afcce356a3f8135294e6d7fe6f]
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
tests/test-commit-timestamp.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-commit-timestamp.sh b/tests/test-commit-timestamp.sh
index 0688c63a4bdb..de105b768a9c 100755
--- a/tests/test-commit-timestamp.sh
+++ b/tests/test-commit-timestamp.sh
@@ -40,6 +40,6 @@ fi
${CMD_PREFIX} ostree --repo=./testrepo show env > show-env.txt
rm -rf testrepo testrepo-files
assert_file_has_content_literal commit-invalid.txt 'Failed to convert SOURCE_DATE_EPOCH'
-assert_file_has_content_literal commit-overflowing.txt 'Parsing SOURCE_DATE_EPOCH: Numerical result out of range'
+assert_file_has_content commit-overflowing.txt 'Parsing SOURCE_DATE_EPOCH: \(Numerical result out of range\|Result not representable\)'
assert_file_has_content_literal show-env.txt 'Date: 2009-02-13 23:31:30 +0000'
echo "ok commit with env timestamp"
--
2.39.0
@@ -20,6 +20,7 @@ DEPENDS = " \
SRC_URI = " \
https://github.com/ostreedev/ostree/releases/download/v${PV}/libostree-${PV}.tar.xz \
file://0001-lib-repo-checkout-Add-ALLPERMS-for-musl.patch \
file://0001-tests-Handle-musl-s-ERANGE-mapping.patch \
file://run-ptest \
"
SRC_URI[sha256sum] = "8be2a9261c94e8b9ec4113380ffc480f8598245fb321a009bad4fae4b822411f"