aports/main/m4/musl-realpath.patch
Kevin Daudt 9d9cf279f6 main/m4: fix realpath test
realpath is not required to normalize `//` into `/`, but the test
assumes so.

See #12295
See #12348
2021-01-23 18:03:27 +00:00

23 lines
751 B
Diff

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/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c
index ff82981..17842e8 100644
--- a/tests/test-canonicalize-lgpl.c
+++ b/tests/test-canonicalize-lgpl.c
@@ -196,8 +196,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