crt: test: In t_stat_slash.c print errno after failed (w)stat call Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/testcases/t_stat_slash.c b/mingw-w64-crt/testcases/t_stat_slash.c index ef73b35..39d6757 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 @@ 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 @@ 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(); } }