You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase againsts 9ae8b8c00f2cca205fdf4ce76e221778b7dfbea7
This commit is contained in:
@@ -1,28 +1,147 @@
|
||||
From 8ad1946fb6af9ee34ea4a85adde57c9b6f9cc523 Mon Sep 17 00:00:00 2001
|
||||
From be07aec481bc78b79e1ab0f31385312cda34b4d8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 1 Dec 2014 11:28:26 +0100
|
||||
Subject: kernel32/tests: Add additional tests for condition mask of
|
||||
Subject: [PATCH] kernel32/tests: Add additional tests for condition mask of
|
||||
VerifyVersionInfoA.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/version.c | 338 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 338 insertions(+)
|
||||
dlls/kernel32/tests/version.c | 450 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 450 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c
|
||||
index a47e52c..248f01c 100644
|
||||
index 49a9357..1a6a0d4 100644
|
||||
--- a/dlls/kernel32/tests/version.c
|
||||
+++ b/dlls/kernel32/tests/version.c
|
||||
@@ -353,6 +353,344 @@ static void test_VerifyVersionInfo(void)
|
||||
pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
@@ -596,6 +596,7 @@ static void test_VerifyVersionInfo(void)
|
||||
DWORD servicepack;
|
||||
unsigned int i;
|
||||
BOOL ret;
|
||||
+ DWORD error;
|
||||
|
||||
/* Before we start doing some tests we should check what the version of
|
||||
* the ServicePack is. Tests on a box with no ServicePack will fail otherwise.
|
||||
@@ -702,6 +703,455 @@ static void test_VerifyVersionInfo(void)
|
||||
VER_MAJORVERSION, VER_GREATER_EQUAL));
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some wink2 */,
|
||||
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
|
||||
+
|
||||
+ if (servicepack == 0)
|
||||
+ {
|
||||
+ skip("There is no ServicePack on this system\n");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER));
|
||||
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+ }
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_LESS));
|
||||
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_LESS_EQUAL));
|
||||
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
|
||||
+
|
||||
+ /* test the failure hierarchy for the four version fields */
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMinorVersion++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMajorVersion++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
|
||||
+
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwBuildNumber++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
+ "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error);
|
||||
+
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL));
|
||||
+ ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ /* systematically test behaviour of condition mask (tests sorted by condition mask value) */
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMinorVersion++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ todo_wine
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
@@ -30,8 +149,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMinorVersion++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -39,29 +158,29 @@ index a47e52c..248f01c 100644
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_AND));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_AND));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMinorVersion++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMinorVersion++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_AND), VER_MINORVERSION, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_AND), VER_MINORVERSION, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -71,8 +190,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMinorVersion++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_OR), VER_MINORVERSION, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_OR), VER_MINORVERSION, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -82,8 +201,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -93,8 +212,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -104,8 +223,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -117,16 +236,16 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMajorVersion++;
|
||||
+ info.wServicePackMajor--;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_LESS), VER_SERVICEPACKMAJOR, VER_EQUAL));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_LESS), VER_SERVICEPACKMAJOR, VER_EQUAL));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+ }
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ todo_wine
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
@@ -134,8 +253,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -144,8 +263,8 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
|
||||
+ VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ todo_wine
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
@@ -154,8 +273,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
|
||||
+ VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
@@ -165,8 +284,8 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ todo_wine
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
@@ -175,8 +294,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMinor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
@@ -189,8 +308,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -199,24 +318,24 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_LESS_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_AND), VER_SERVICEPACKMAJOR, VER_GREATER));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+ }
|
||||
@@ -224,8 +343,8 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_LESS_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ if (servicepack)
|
||||
@@ -234,8 +353,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor--;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_GREATER), VER_SERVICEPACKMINOR, VER_EQUAL));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_GREATER), VER_SERVICEPACKMINOR, VER_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -245,8 +364,8 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ todo_wine
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
@@ -254,8 +373,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -264,8 +383,8 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ todo_wine
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
@@ -273,8 +392,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -283,8 +402,8 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ todo_wine
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
@@ -293,8 +412,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -303,22 +422,22 @@ index a47e52c..248f01c 100644
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.dwMajorVersion--;
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
+ ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */,
|
||||
@@ -328,8 +447,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
@@ -340,8 +459,8 @@ index a47e52c..248f01c 100644
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ info.wServicePackMajor++;
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL),
|
||||
+ VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS_EQUAL));
|
||||
+ error = GetLastError();
|
||||
+ ok(!ret, "VerifyVersionInfoA succeeded\n");
|
||||
@@ -350,13 +469,13 @@ index a47e52c..248f01c 100644
|
||||
+
|
||||
+ info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
+ GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
+ ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_AND));
|
||||
+ ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
+ VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_AND));
|
||||
+ ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
+
|
||||
/* test bad dwOSVersionInfoSize */
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
GetVersionExA((OSVERSIONINFOA *)&info);
|
||||
--
|
||||
2.1.3
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,78 +1,46 @@
|
||||
From ca7be85de4f395713f3b388d6eb1ce7399b5e2d8 Mon Sep 17 00:00:00 2001
|
||||
From ac09483f10409c0f5de9bee8f160c8be45ee351f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 1 Dec 2014 11:30:58 +0100
|
||||
Subject: ntdll: Fix condition mask handling in RtlVerifyVersionInfo.
|
||||
Subject: [PATCH] ntdll: Fix condition mask handling in RtlVerifyVersionInfo.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/version.c | 7 ------
|
||||
dlls/kernel32/tests/version.c | 3 ---
|
||||
dlls/ntdll/version.c | 50 ++++++++++++++++++++++++++++++++-----------
|
||||
2 files changed, 37 insertions(+), 20 deletions(-)
|
||||
2 files changed, 37 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c
|
||||
index 248f01c..4d07176 100644
|
||||
index 1a6a0d4..db182a3 100644
|
||||
--- a/dlls/kernel32/tests/version.c
|
||||
+++ b/dlls/kernel32/tests/version.c
|
||||
@@ -360,7 +360,6 @@ static void test_VerifyVersionInfo(void)
|
||||
info.dwMinorVersion++;
|
||||
ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_MINORVERSION, VER_LESS));
|
||||
- todo_wine
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
@@ -464,7 +463,6 @@ static void test_VerifyVersionInfo(void)
|
||||
info.wServicePackMinor++;
|
||||
ret = pVerifyVersionInfoA(&info, VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
pVerSetConditionMask(pVerSetConditionMask(0, VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
- todo_wine
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
@@ -484,7 +482,6 @@ static void test_VerifyVersionInfo(void)
|
||||
ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
|
||||
@@ -945,7 +945,6 @@ static void test_VerifyVersionInfo(void)
|
||||
ret = VerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL),
|
||||
VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
- todo_wine
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
@@ -505,7 +502,6 @@ static void test_VerifyVersionInfo(void)
|
||||
ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
@@ -966,7 +965,6 @@ static void test_VerifyVersionInfo(void)
|
||||
ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_EQUAL), VER_SERVICEPACKMINOR, VER_LESS));
|
||||
- todo_wine
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
@@ -584,7 +580,6 @@ static void test_VerifyVersionInfo(void)
|
||||
info.wServicePackMajor++;
|
||||
ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
- todo_wine
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
@@ -603,7 +598,6 @@ static void test_VerifyVersionInfo(void)
|
||||
info.wServicePackMajor++;
|
||||
ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
- todo_wine
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
@@ -623,7 +617,6 @@ static void test_VerifyVersionInfo(void)
|
||||
ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
pVerSetConditionMask(pVerSetConditionMask(pVerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
@@ -1084,7 +1082,6 @@ static void test_VerifyVersionInfo(void)
|
||||
ret = VerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL),
|
||||
VER_MINORVERSION, VER_EQUAL), VER_SERVICEPACKMAJOR, VER_LESS));
|
||||
- todo_wine
|
||||
ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError());
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA);
|
||||
diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c
|
||||
index a6340eb..5d1b445 100644
|
||||
index 58ccb95..8beef6d 100644
|
||||
--- a/dlls/ntdll/version.c
|
||||
+++ b/dlls/ntdll/version.c
|
||||
@@ -657,6 +657,35 @@ BOOLEAN WINAPI RtlGetNtProductType( LPDWORD type )
|
||||
@@ -658,6 +658,35 @@ BOOLEAN WINAPI RtlGetNtProductType( LPDWORD type )
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +76,7 @@ index a6340eb..5d1b445 100644
|
||||
static inline NTSTATUS version_compare_values(ULONG left, ULONG right, UCHAR condition)
|
||||
{
|
||||
switch (condition) {
|
||||
@@ -732,38 +761,33 @@ NTSTATUS WINAPI RtlVerifyVersionInfo( const RTL_OSVERSIONINFOEXW *info,
|
||||
@@ -733,38 +762,33 @@ NTSTATUS WINAPI RtlVerifyVersionInfo( const RTL_OSVERSIONINFOEXW *info,
|
||||
|
||||
if(dwTypeMask & (VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR|VER_SERVICEPACKMINOR))
|
||||
{
|
||||
@@ -156,5 +124,5 @@ index a6340eb..5d1b445 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.1.3
|
||||
1.9.1
|
||||
|
||||
|
Reference in New Issue
Block a user