[PATCH] netapi32/tests: Fix workstation test failures on XP
Saulius Krasuckas
saulius2 at ar.fi.lt
Wed Nov 14 03:45:12 CST 2012
* On Tue, 13 Nov 2012, Detlef Riekenberg wrote:
> The workstation service might not running
>
> http://test.winehq.org/data/b5d96da32f955357b7d9341ee9fca68108078dce/xp_s2-sp2-nosnd/netapi32:wksta.html
Indeed it isn't. I've disabled serveral services on this box.
> --- a/dlls/netapi32/tests/wksta.c
> +++ b/dlls/netapi32/tests/wksta.c
> @@ -79,12 +79,17 @@ static void run_wkstausergetinfo_tests(void)
> LPWKSTA_USER_INFO_1 ui1 = NULL;
> LPWKSTA_USER_INFO_1101 ui1101 = NULL;
> DWORD dwSize;
> + NET_API_STATUS rc;
>
> /* Level 0 */
> - ok(pNetWkstaUserGetInfo(NULL, 0, (LPBYTE *)&ui0) == NERR_Success,
> - "NetWkstaUserGetInfo is unsuccessful\n");
> + rc = pNetWkstaUserGetInfo(NULL, 0, (LPBYTE *)&ui0);
> + if (rc == NERR_WkstaNotStarted)
> + {
> + skip("Workstation service not running\n");
> + return;
> + }
> + ok(!rc && ui0, "got %d and %p (expected NERR_Success and != NULL\n", rc, ui0);
No to blame you, this is just generic inquiry for developers.
Won't it be better to check service status directly in such case?
S.
More information about the wine-devel
mailing list