aboutsummaryrefslogtreecommitdiffstats
path: root/main/gettext/musl-realpath.patch
blob: 05cb14f75309fc99630868bdb54fa847d5051ec1 (plain) (blame)
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
https://gitlab.alpinelinux.org/alpine/aports/-/issues/12295

----
test-canonicalize.c:339: assertion 'strcmp (result1, "/") == 0' failed
Aborted (core dumped)
FAIL test-canonicalize (exit status: 134)
----

diff --git a/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c b/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c
index ff82981..17842e8 100644
--- a/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c
+++ b/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c
@@ -208,8 +208,8 @@ main (void)
 #ifndef __MVS__
     if (SAME_INODE (st1, st2))
       {
-        ASSERT (strcmp (result1, "/") == 0);
-        ASSERT (strcmp (result2, "/") == 0);
+        ASSERT (strcmp (result1, "/") == 0 || strcmp (result1, "//") == 0);
+        ASSERT (strcmp (result2, "/") == 0 || strcmp (result2, "//") == 0);
       }
     else
 #endif
--- a/gettext-tools/gnulib-tests/test-canonicalize.c
+++ b/gettext-tools/gnulib-tests/test-canonicalize.c
@@ -336,10 +336,10 @@
     ASSERT (stat ("//", &st2) == 0);
     if (SAME_INODE (st1, st2))
       {
-        ASSERT (strcmp (result1, "/") == 0);
-        ASSERT (strcmp (result2, "/") == 0);
-        ASSERT (strcmp (result3, "/") == 0);
-        ASSERT (strcmp (result4, "/") == 0);
+        ASSERT (strcmp (result1, "/") == 0 || strcmp (result1, "//") == 0);
+        ASSERT (strcmp (result2, "/") == 0 || strcmp (result2, "//") == 0);
+        ASSERT (strcmp (result3, "/") == 0 || strcmp (result3, "//") == 0);
+        ASSERT (strcmp (result4, "/") == 0 || strcmp (result4, "//") == 0);
       }
     else
       {