[Git][ghc/ghc][ghc-9.6] 2 commits: testsuite: Update to LC_ALL=C no longer being ignored in darwin

Zubin (@wz1000) gitlab at gitlab.haskell.org
Mon Jan 8 12:06:33 UTC 2024



Zubin pushed to branch ghc-9.6 at Glasgow Haskell Compiler / GHC


Commits:
34f8c00d by Rodrigo Mesquita at 2024-01-08T17:34:54+05:30
testsuite: Update to LC_ALL=C no longer being ignored in darwin

MacOS seems to have fixed an issue where it used to ignore the variable
`LC_ALL` in program invocations and default to using Unicode.

Since the behaviour seems to be fixed to account for the locale
variable, we mark tests that were previously broken in spite of it as
fragile (since they now pass in recent macOS distributions)

See #24161

(cherry picked from commit ce7fe5a916d50f471812f4714615e13f557fe57a)

- - - - -
3187fc76 by Rodrigo Mesquita at 2024-01-08T17:36:12+05:30
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

(cherry picked from commit c411c431e7ae1f0effbe9f9a624c7f9171d50f0a)

- - - - -


3 changed files:

- libraries/base/tests/IO/all.T
- testsuite/tests/driver/Makefile
- testsuite/tests/driver/all.T


Changes:

=====================================
libraries/base/tests/IO/all.T
=====================================
@@ -119,7 +119,17 @@ test('encoding001', [], compile_and_run, [''])
 
 test('encoding002', normal, compile_and_run, [''])
 test('encoding003', normal, compile_and_run, [''])
-test('encoding004', [extra_files(['encoded-data/']), js_broken(22374)], compile_and_run, [''])
+test('encoding004', [extra_files(['encoded-data/']), js_broken(22374),
+# wasi-libc doesn't have cp936, see
+# https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/iconv.c#L38
+# 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),
+# 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'])


=====================================
testsuite/tests/driver/Makefile
=====================================
@@ -552,8 +552,8 @@ T7563:
 	-"$(TEST_HC)" $(TEST_HC_OPTS) -C T7563.hs
 
 # Below we set LC_ALL=C to request standard ASCII output in the resulting error
-# messages. Unfortunately, Mac OS X and Windows still use a Unicode encoding
-# even with LC_ALL=C, so we expect these tests to fail there.
+# messages. Unfortunately, versions of MacOS prior to Sonoma and Windows still
+# use a Unicode encoding even with LC_ALL=C, so we expect these tests to fail there.
 
 .PHONY: T6037
 T6037:


=====================================
testsuite/tests/driver/all.T
=====================================
@@ -178,16 +178,25 @@ test('T7060', [], makefile_test, [])
 test('T7130', normal, compile_fail, ['-fflul-laziness'])
 test('T7563', when(unregisterised(), skip), makefile_test, [])
 test('T6037',
-     # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
-     [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
+     # The testsuite doesn't know how to set a non-Unicode locale on Windows or MacOS < Sonoma.
+     # Because in previous version of MacOS the test is still broken, we mark it as fragile.
+     [when(opsys('mingw32'), expect_fail),
+      when(opsys('darwin'), fragile(24161))
+     ],
      makefile_test, [])
 test('T2507',
-     # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
-     [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
+     # The testsuite doesn't know how to set a non-Unicode locale on Windows or MacOS < Sonoma
+     # Because in previous version of MacOS the test is still broken, we mark it as fragile.
+     [when(opsys('mingw32'), expect_fail),
+      when(opsys('darwin'), fragile(24161))
+     ],
      makefile_test, [])
 test('T8959a',
-     # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
-     [when(opsys('mingw32'), expect_fail), when(opsys('darwin'), expect_fail)],
+     # The testsuite doesn't know how to set a non-Unicode locale on Windows or MacOS < Sonoma
+     # Because in previous version of MacOS the test is still broken, we mark it as fragile.
+     [when(opsys('mingw32'), expect_fail),
+      when(opsys('darwin'), fragile(24161))
+     ],
      makefile_test, [])
 
 # Requires readelf



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b3abeb84d8b7e41954ad122b3411f3fcffc4e8da...3187fc7644a41c182ec35292389b61bc0575e80b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b3abeb84d8b7e41954ad122b3411f3fcffc4e8da...3187fc7644a41c182ec35292389b61bc0575e80b
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240108/d27efa3d/attachment-0001.html>


More information about the ghc-commits mailing list