Alexandre Julliard wrote:
Paul Vriens <[EMAIL PROTECTED]> writes:
So if we only have crashes on win9x we don't care. If we can avoid
crashes/failures on win9x (by skip or other means) we don't run them
on win9x. And if they crash on something higher then win9x we disable
them totally.
Does that make sense?
Sure; the thing we want to avoid is version checks in tests, because
then things don't get tested on Wine when the version is changed. But
as long as win98 is detected by its missing features then skipping
things is fine.
Ok, I've got an example attached. I'm currently cleaning up the registry tests
before I can/will start doing stuff with RegDeleteTree.
It turns out we had a lof of failures with this test on win98. It looks like
win98 doesn't assign a new handle when the same registry key is opened. This
means that the close test close the main handle and we thus have an issue in the
first test after that (which assumes to have a valid handle).
The attached file uses the GetVersion to check for win9x, is that acceptable in
this case? Or is just an extra RegOpenKey (with comments) enough?
The todo_wine is only there btw. to don't have an error when run in win9x
emulated mode. That brings up another question. Should all test succeed in Wine
regardless of the emulated mode?
Cheers,
Paul.
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index f67364a..eb0713b 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -619,6 +619,15 @@ static void test_reg_close_key(void)
* hkHandle remains changed after call to RegCloseKey
*/
ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkHandle);
+
+ /* Windows 98 returns the same handle when the same key is opened.
+ * When this handle is closed effectively all handles are closed to this key.
+ */
+ if (GetVersion() & 0x80000000)
+ todo_wine ok(hkey_main == hkHandle, "Expected handles to be the same\n");
+ else
+ ok(hkey_main != hkHandle, "Expected handles to be different\n");
+
ret = RegCloseKey(hkHandle);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
@@ -763,6 +772,12 @@ static void test_reg_query_value(void)
static const WCHAR expected[] = {'d','a','t','a',0};
+ /* The test_reg_close_key test closes the handle to the main key on Win98.
+ * Open it again in this case.
+ */
+ if (GetVersion() & 0x80000000)
+ RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey_main );
+
ret = RegCreateKeyA(hkey_main, "subkey", &subkey);
ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);