And in the attachment I'm sending another 3 changes for t_stat_slash.c
test which allowed me to debug and find this issue. If I remember
correctly, Kirill in the past already run all these changes on CI.
>From a935bdd1e4584147fd20414761e15d6bbef8392b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
Date: Sat, 17 Jan 2026 15:40:00 +0100
Subject: [PATCH 1/3] crt: test: In t_stat_slash.c turn off buffering for
stdout
---
mingw-w64-crt/testcases/t_stat_slash.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-crt/testcases/t_stat_slash.c
b/mingw-w64-crt/testcases/t_stat_slash.c
index ec08c317fe30..9e335e3bdcda 100644
--- a/mingw-w64-crt/testcases/t_stat_slash.c
+++ b/mingw-w64-crt/testcases/t_stat_slash.c
@@ -31,7 +31,9 @@ main (int argc, char **argv)
{
wchar_t windir_wbuf[MAX_PATH + 1];
char windir_abuf[MAX_PATH + 1];
-
+
+ setvbuf (stdout, NULL, _IONBF, 0);
+
if (GetWindowsDirectoryA(&windir_abuf[0], MAX_PATH))
{
strcat (&windir_abuf[0], "\\");
--
2.20.1
>From b0fa51329ad4e8e6a67a40abbaa8d0cd12d08c32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
Date: Sat, 17 Jan 2026 15:40:50 +0100
Subject: [PATCH 2/3] crt: test: In t_stat_slash.c print wchar_t* string via
%ls format
---
mingw-w64-crt/testcases/t_stat_slash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-crt/testcases/t_stat_slash.c
b/mingw-w64-crt/testcases/t_stat_slash.c
index 9e335e3bdcda..ef73b351b4a5 100644
--- a/mingw-w64-crt/testcases/t_stat_slash.c
+++ b/mingw-w64-crt/testcases/t_stat_slash.c
@@ -19,9 +19,9 @@ wtest (wchar_t *path)
{
struct stat buf;
if (wstat(path, &buf) == 0)
- wprintf (L"OK [%s]\n", path);
+ wprintf (L"OK [%ls]\n", path);
else {
- wprintf (L"ERROR [%s]\n", path);
+ wprintf (L"ERROR [%ls]\n", path);
abort();
}
}
--
2.20.1
>From 7b7bd581967117c559a89bf6079259dd0837d47c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
Date: Sat, 17 Jan 2026 15:41:16 +0100
Subject: [PATCH 3/3] crt: test: In t_stat_slash.c print errno after failed
(w)stat call
---
mingw-w64-crt/testcases/t_stat_slash.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-crt/testcases/t_stat_slash.c
b/mingw-w64-crt/testcases/t_stat_slash.c
index ef73b351b4a5..39d6757fec5b 100644
--- a/mingw-w64-crt/testcases/t_stat_slash.c
+++ b/mingw-w64-crt/testcases/t_stat_slash.c
@@ -1,5 +1,6 @@
#include <windows.h>
#include <stdio.h>
+#include <errno.h>
#include <sys/stat.h>
void
@@ -9,7 +10,7 @@ test (char *path)
if (stat(path, &buf) == 0)
printf ("OK [%s]\n", path);
else {
- printf ("ERROR [%s]\n", path);
+ printf ("ERROR [%s]: %d\n", path, errno);
abort();
}
}
@@ -21,7 +22,7 @@ wtest (wchar_t *path)
if (wstat(path, &buf) == 0)
wprintf (L"OK [%ls]\n", path);
else {
- wprintf (L"ERROR [%ls]\n", path);
+ wprintf (L"ERROR [%ls]: %d\n", path, errno);
abort();
}
}
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public