aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/libc++/disable-broken-tests.patch
blob: 84798765da940beeced3c071bd1f12288043edc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
musl doesn't support the locale things that the locale requirements test, like
localized money and decimal formatting.

The syscat.errcat tests are broken and rely on the libc to return a specific
string in the form of "Unknown error <n>" for unknown errnos when calling
strerror(), which is not defined anywhere and libcs are free to return any
string they want, up to and including "libcxx tests are silly".

Similarly to glibc, musl uses "NaN" to format NaN long doubles, not "nan".
Finally, musl uses "0" to indicate a NULL pointer as %p argument to *printf().

diff -Nru a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp	2016-06-14 06:37:36.000000000 +0000
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp	2017-05-15 01:08:24.868284337 +0000
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// XFAIL: libcpp-has-musl-libc
+
 // <system_error>
 
 // class error_category
diff -Nru a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp	2016-06-14 06:37:36.000000000 +0000
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp	2017-05-15 01:08:09.171161729 +0000
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// XFAIL: libcpp-has-musl-libc
+
 // <system_error>
 
 // class error_category
diff -Nru a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp	2016-12-24 01:07:54.000000000 +0000
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp	2017-05-15 02:02:23.221864590 +0000
@@ -18,6 +18,7 @@
 
 // TODO GLIBC uses a different string for positive and negative NAN numbers.
 // XFAIL: linux-gnu
+// XFAIL: libcpp-has-musl-libc
 
 #include <locale>
 #include <ios>
diff -Nru a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp	2017-05-15 02:01:56.842668781 +0000
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp	2017-05-15 02:11:41.668288608 +0000
@@ -38,6 +38,6 @@
         char str[50];
         output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
         std::string ex(str, iter.base());
-        assert(ex == "0x0" || ex == "(nil)");
+        assert(ex == "0" || ex == "0x0" || ex == "(nil)");
     }
 }
diff -Nru a/libcxx/test/libcxx/test/target_info.py b/libcxx/test/libcxx/test/target_info.py
--- a/libcxx/test/libcxx/test/target_info.py  2017-05-15 23:31:06.698175150 +0000
+++ b/libcxx/test/libcxx/test/target_info.py  2017-05-15 23:34:59.805751050 +0000
@@ -35,6 +35,7 @@
 
 def test_locale(loc):
     assert loc is not None
+    return False
     default_locale = locale.setlocale(locale.LC_ALL)
     try:
         locale.setlocale(locale.LC_ALL, loc)