Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/hnetcfg/tests/policy.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
diff --git a/dlls/hnetcfg/tests/policy.c b/dlls/hnetcfg/tests/policy.c index 208f583..61175f9 100644 --- a/dlls/hnetcfg/tests/policy.c +++ b/dlls/hnetcfg/tests/policy.c @@ -27,6 +27,7 @@ #include "wine/test.h"
#include "netfw.h" +#include "natupnp.h"
static void test_policy2_rules(INetFwPolicy2 *policy2) { @@ -160,6 +161,35 @@ static void test_NetFwAuthorizedApplication(void) INetFwAuthorizedApplication_Release(app); }
+static void test_IUPnPNAT(void) +{ + IUPnPNAT *nat; + IStaticPortMappingCollection *static_ports; + IDynamicPortMappingCollection *dync_ports; + INATEventManager *manager; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_UPnPNAT, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUPnPNAT, (void**)&nat); + ok(hr == S_OK, "got: %08x\n", hr); + + hr = IUPnPNAT_get_StaticPortMappingCollection(nat, &static_ports); + todo_wine ok(hr == S_OK, "got: %08x\n", hr); + if(hr == S_OK && static_ports) + IStaticPortMappingCollection_Release(static_ports); + + hr = IUPnPNAT_get_DynamicPortMappingCollection(nat, &dync_ports); + ok(hr == S_OK || hr == E_NOTIMPL /* Windows 8.1 */, "got: %08x\n", hr); + if(hr == S_OK && dync_ports) + IDynamicPortMappingCollection_Release(dync_ports); + + hr = IUPnPNAT_get_NATEventManager(nat, &manager); + todo_wine ok(hr == S_OK, "got: %08x\n", hr); + if(hr == S_OK && manager) + INATEventManager_Release(manager); + + IUPnPNAT_Release(nat); +} + START_TEST(policy) { INetFwMgr *manager; @@ -180,6 +210,7 @@ START_TEST(policy)
test_interfaces(); test_NetFwAuthorizedApplication(); + test_IUPnPNAT();
CoUninitialize(); }
Hi,
While running your changed tests on Windows, 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=43133
Your paranoid android.
=== debian9 (32 bit Wine report) ===
hnetcfg: policy.c:173: Test failed: got: 80040154 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7edb45b6).
Report errors: hnetcfg:policy crashed (c0000005)
=== debian9 (build log) ===