tests: Handle musl's ERANGE mapping
authorAlex Kiernan <alex.kiernan@gmail.com>
Mon, 2 Jan 2023 10:37:49 +0000 (10:37 +0000)
committerAlex Kiernan <alex.kiernan@gmail.com>
Mon, 2 Jan 2023 10:40:17 +0000 (10:40 +0000)
musl uses "Result not representable" for ERANGE, support this in
addition to glibc's "Numerical result out of range".

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
tests/test-commit-timestamp.sh

index 0688c63a4bdb49ddb4c0016f0adfa8a1cd5fe852..de105b768a9c8a41f32dc4f4765a487c1a3fb0dd 100755 (executable)
@@ -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"