shell32/tests: Use GetVersion() to skip a test on Vista

Zhenbo Li litimetal at
Thu Dec 5 08:28:20 CST 2013

2013/12/5 Nikolay Sivov <bunglehead at>:
> Ok, I'll try.
> It's discouraged to check system version in wine tests that's what I'm
> saying. One of the reason for that is
> that we don't want to skip anything running tests on wine, no matter what
> windows version is selected for a prefix.
> Proper win_skip() should check for broken or unwanted behaviour directly, by
> calling affected APIs. That's what existing code does.

Thank you, I think I got your meaning, but I don't think the old
solution is a proper way.

The patch were admitted in Jan 2009[1], when Vista was the latest win version.
So such code
+    if (ret != ERROR_FILE_NOT_FOUND)
can differ XP and Vista (XP would return 0x402, unknown error)

But as MSDN [2] says, "This error does not occur on Windows Vista and later."
So such code would skip all the windows versions except WinXP
(I've confirmed it with TestBots)

And now comes the problem.
If I call SHFileOperation, XP returns 0x402, Win 7/8  returns
And in Vista / WIn2008, the testjob would be timeout
(As Paul Vriens had mentioned, a dialog would appear)

I can't see a better way to solve this problem now.
Or could I use    strcmp(winetest_platform, "windows") ?

[1] :commit 30bb78f0f9c3441201f3aa31ebaf93f46b7c28ea
Author: Paul Vriens <Paul.Vriens.Wine at>
Date:   Fri Jan 9 07:46:11 2009 +0100

    shell32/tests: Skip a test on Vista.


Have a nice day!
Zhenbo Li

More information about the wine-devel mailing list