diff --git a/rostests/apitests/crt/_vscprintf.c b/rostests/apitests/crt/_vscprintf.c index c3717abaa6a..1a72bd689e1 100644 --- a/rostests/apitests/crt/_vscprintf.c +++ b/rostests/apitests/crt/_vscprintf.c @@ -7,6 +7,7 @@ #include #include #include +#include static void call_varargs(int expected_ret, LPCSTR formatString, ...) { @@ -26,4 +27,5 @@ START_TEST(_vscprintf) call_varargs(11, "%u cookies", 100); /* Test NULL argument */ call_varargs(-1, NULL); + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); } diff --git a/rostests/apitests/crt/_vscwprintf.c b/rostests/apitests/crt/_vscwprintf.c index 0c35e2a5b77..d2390b7876c 100644 --- a/rostests/apitests/crt/_vscwprintf.c +++ b/rostests/apitests/crt/_vscwprintf.c @@ -7,6 +7,7 @@ #include #include #include +#include static void call_varargs(int expected_ret, LPCWSTR formatString, ...) { @@ -27,4 +28,7 @@ START_TEST(_vscwprintf) /* Test NULL argument */ call_varargs(-1, NULL); +#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */ + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); +#endif } diff --git a/rostests/apitests/crt/_vsnprintf.c b/rostests/apitests/crt/_vsnprintf.c index 739b2c9d48f..e7657c3c98b 100644 --- a/rostests/apitests/crt/_vsnprintf.c +++ b/rostests/apitests/crt/_vsnprintf.c @@ -40,6 +40,9 @@ START_TEST(_vsnprintf) EndSeh(STATUS_ACCESS_VIOLATION); #else EndSeh(STATUS_SUCCESS); +#endif +#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */ + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); #endif /* This one is no better */ StartSeh() @@ -48,6 +51,9 @@ START_TEST(_vsnprintf) EndSeh(STATUS_ACCESS_VIOLATION); #else EndSeh(STATUS_SUCCESS); +#endif +#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */ + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); #endif /* One more NULL checks */ StartSeh() @@ -57,4 +63,7 @@ START_TEST(_vsnprintf) #else EndSeh(STATUS_SUCCESS); #endif +#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */ + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); +#endif } diff --git a/rostests/apitests/crt/_vsnwprintf.c b/rostests/apitests/crt/_vsnwprintf.c index 042e0f00ce8..e37616cc9fb 100644 --- a/rostests/apitests/crt/_vsnwprintf.c +++ b/rostests/apitests/crt/_vsnwprintf.c @@ -40,6 +40,9 @@ START_TEST(_vsnwprintf) EndSeh(STATUS_ACCESS_VIOLATION); #else EndSeh(STATUS_SUCCESS); +#endif +#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */ + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); #endif /* This one is no better */ StartSeh() @@ -48,6 +51,9 @@ START_TEST(_vsnwprintf) EndSeh(STATUS_ACCESS_VIOLATION); #else EndSeh(STATUS_SUCCESS); +#endif +#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */ + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); #endif /* One more NULL checks */ StartSeh() @@ -57,4 +63,7 @@ START_TEST(_vsnwprintf) #else EndSeh(STATUS_SUCCESS); #endif +#if defined(TEST_MSVCRT) /* NTDLL doesn't use/set errno */ + ok(errno == EINVAL, "Expected EINVAL, got %u\n", errno); +#endif }