Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/tests/Makefile.in | 1 + dlls/adsldp/tests/ldap.c | 81 +++++++++++++++++++++++++++++++++++ dlls/adsldp/tests/sysinfo.c | 2 + 3 files changed, 84 insertions(+) create mode 100644 dlls/adsldp/tests/ldap.c
diff --git a/dlls/adsldp/tests/Makefile.in b/dlls/adsldp/tests/Makefile.in index 777d2aa9de..52141139d5 100644 --- a/dlls/adsldp/tests/Makefile.in +++ b/dlls/adsldp/tests/Makefile.in @@ -2,4 +2,5 @@ TESTDLL = adsldp.dll IMPORTS = ole32 oleaut32 secur32 advapi32 uuid
C_SRCS = \ + ldap.c \ sysinfo.c diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c new file mode 100644 index 0000000000..e2ce9ee1a2 --- /dev/null +++ b/dlls/adsldp/tests/ldap.c @@ -0,0 +1,81 @@ +/* + * LDAPNamespace Tests + * + * Copyright 2019 Dmitry Timoshkov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "iads.h" + +#include "wine/test.h" + +#include "initguid.h" +DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91); + +static void test_LDAP(void) +{ + HRESULT hr; + IUnknown *unk; + IADs *ads; + IADsOpenDSObject *ads_open; + IDispatch *disp; + BSTR path; + + hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IADs, (void **)&ads); + ok(hr == S_OK, "got %#x\n", hr); + IADs_Release(ads); + + hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); + ok(hr == S_OK, "got %#x\n", hr); + + hr = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **)&disp); + ok(hr == S_OK, "got %#x\n", hr); + IDispatch_Release(disp); + + hr = IUnknown_QueryInterface(unk, &IID_IADsOpenDSObject, (void **)&ads_open); + ok(hr == S_OK, "got %#x\n", hr); + IADsOpenDSObject_Release(ads_open); + + path = SysAllocString(L"LDAP:"); + hr = IADsOpenDSObject_OpenDSObject(ads_open, path, NULL, NULL, ADS_SECURE_AUTHENTICATION, &disp); + SysFreeString(path); +todo_wine + ok(hr == S_OK, "got %#x\n", hr); +if (hr == S_OK) + IDispatch_Release(disp); + + IUnknown_Release(unk); +} + +START_TEST(ldap) +{ + HRESULT hr; + + hr = CoInitialize(NULL); + ok(hr == S_OK, "got %#x\n", hr); + + test_LDAP(); + + CoUninitialize(); +} diff --git a/dlls/adsldp/tests/sysinfo.c b/dlls/adsldp/tests/sysinfo.c index f2fc92a1b2..c7495dcb88 100644 --- a/dlls/adsldp/tests/sysinfo.c +++ b/dlls/adsldp/tests/sysinfo.c @@ -210,4 +210,6 @@ START_TEST(sysinfo) test_ComputerName(); test_UserName(); test_sysinfo(); + + CoUninitialize(); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=64898
Your paranoid android.
=== wxppro (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w2008s64 (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w8 (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w8adm (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w864 (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1507 (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1809 (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1809_2scr (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1809_ar (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1809_he (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1809_ja (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1809_zh_CN (32 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w2008s64 (64 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w864 (64 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1507 (64 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== w1064v1809 (64 bit report) ===
Report validation errors: adsldp:ldap has no test summary line (early exit of the main process?)
=== wxppro (32 bit report) ===
=== w2008s64 (32 bit report) ===
=== w8 (32 bit report) ===
=== w8adm (32 bit report) ===
=== w864 (32 bit report) ===
Report validation errors: adsldp:sysinfo has no test summary line (early exit of the main process?)
=== w1064v1507 (32 bit report) ===
=== w1064v1809 (32 bit report) ===
=== w1064v1809_2scr (32 bit report) ===
=== w1064v1809_ar (32 bit report) ===
=== w1064v1809_he (32 bit report) ===
Report validation errors: adsldp:sysinfo has no test summary line (early exit of the main process?)
=== w1064v1809_ja (32 bit report) ===
Report validation errors: adsldp:sysinfo has no test summary line (early exit of the main process?)
=== w1064v1809_zh_CN (32 bit report) ===
=== w2008s64 (64 bit report) ===
=== w864 (64 bit report) ===
=== w1064v1507 (64 bit report) ===
=== w1064v1809 (64 bit report) ===
Report validation errors: adsldp:sysinfo has no test summary line (early exit of the main process?)
=== debian10 (32 bit report) ===
adsldp: ldap.c:46: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004010b0).
Report validation errors: adsldp:ldap crashed (c0000005) adsldp:sysinfo has no test summary line (early exit of the main process?)
=== debian10 (32 bit French report) ===
adsldp: ldap.c:46: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004010b0).
Report validation errors: adsldp:ldap crashed (c0000005) adsldp:sysinfo has no test summary line (early exit of the main process?)
=== debian10 (32 bit Japanese:Japan report) ===
adsldp: ldap.c:46: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004010b0).
Report validation errors: adsldp:ldap crashed (c0000005) adsldp:sysinfo has no test summary line (early exit of the main process?)
=== debian10 (32 bit Chinese:China report) ===
adsldp: ldap.c:46: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004010b0).
Report validation errors: adsldp:ldap crashed (c0000005) adsldp:sysinfo has no test summary line (early exit of the main process?)
=== debian10 (32 bit WoW report) ===
adsldp: ldap.c:46: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004010b0).
Report validation errors: adsldp:ldap crashed (c0000005) adsldp:sysinfo has no test summary line (early exit of the main process?)
=== debian10 (64 bit WoW report) ===
adsldp: ldap.c:46: Test failed: got 0x80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004010b0).
Report validation errors: adsldp:ldap crashed (c0000005) adsldp:sysinfo has no test summary line (early exit of the main process?)