From c411c431e7ae1f0effbe9f9a624c7f9171d50f0a Mon Sep 17 00:00:00 2001
From: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Date: Wed, 8 Nov 2023 11:33:17 +0000
Subject: [PATCH] testsuite: Encoding test witnesses recent iconv bug is
 fragile

A regression in the new iconv() distributed with XCode 15 and MacOS
Sonoma causes the test 'encoding004' to fail in the CP936 roundrip.

We mark this test as fragile until this is fixed upstream (rather than
broken, since previous versions of iconv pass the test)

See #24161
---
 libraries/base/tests/IO/all.T | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libraries/base/tests/IO/all.T b/libraries/base/tests/IO/all.T
index 0a51695bdb8a..946d8ea510bd 100644
--- a/libraries/base/tests/IO/all.T
+++ b/libraries/base/tests/IO/all.T
@@ -136,7 +136,11 @@ test('encoding004', [extra_files(['encoded-data/']), js_broken(22374),
 # and
 # https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/codepages.h
 # for locales supported by wasi-libc's iconv implementation
-when(arch('wasm32'), skip)], compile_and_run, [''])
+when(arch('wasm32'), skip),
+# MacOS Sonoma iconv() has a regression that causes this test to fail on the
+# CP936 roundtrip. See the ticket for related issues in other projects.
+when(opsys('darwin'), fragile(24161))
+], compile_and_run, [''])
 test('encoding005', normal, compile_and_run, [''])
 
 test('environment001', [], makefile_test, ['environment001-test'])
-- 
GitLab