aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ipcwinsec.c5
-rw-r--r--tests/resolv.c26
2 files changed, 3 insertions, 28 deletions
diff --git a/tests/ipcwinsec.c b/tests/ipcwinsec.c
index e6d2a205..1c226c7c 100644
--- a/tests/ipcwinsec.c
+++ b/tests/ipcwinsec.c
@@ -25,7 +25,6 @@
#ifndef _WIN32
TestMain("IPC Security Descriptor", {
-
atexit(nng_fini);
Convey("Given a socket and an IPC listener", {
nng_socket s;
@@ -94,7 +93,6 @@ TestMain("IPC Security Descriptor", {
So(nng_listener_create(&l, s, "ipc://" ADDR) == 0);
Convey("We can set security descriptor on Windows", {
-
SECURITY_DESCRIPTOR *sdesc;
SID users;
DWORD size;
@@ -136,7 +134,7 @@ TestMain("IPC Security Descriptor", {
Reset({ LocalFree(sd); });
So(dacl->AceCount == 1);
- So(GetAce(dacl, 0, &ace) == TRUE);
+ So(GetAce(dacl, 0, (void **) &ace) == TRUE);
allowed = (PACCESS_ALLOWED_ACE) ace;
asid = (PSID) &allowed->SidStart;
So(IsValidSid(asid));
@@ -145,7 +143,6 @@ TestMain("IPC Security Descriptor", {
});
Convey("We cannot set security descriptor after started", {
-
SECURITY_DESCRIPTOR *sdesc;
SID users;
DWORD size;
diff --git a/tests/resolv.c b/tests/resolv.c
index dfc599c0..1d502eec 100644
--- a/tests/resolv.c
+++ b/tests/resolv.c
@@ -147,37 +147,15 @@ TestMain("Resolver", {
nng_aio_free(aio);
});
- Convey("TCP Name service resolves", {
+ Convey("Name service names not supported", {
nng_aio * aio;
- const char * str;
nng_sockaddr sa;
So(nng_aio_alloc(&aio, NULL, NULL) == 0);
nng_aio_set_input(aio, 0, &sa);
nni_plat_tcp_resolv("8.8.4.4", "http", NNG_AF_INET, 1, aio);
nng_aio_wait(aio);
- So(nng_aio_result(aio) == 0);
- So(sa.s_in.sa_family == NNG_AF_INET);
- So(sa.s_in.sa_port == ntohs(80));
- str = ip4tostr(&sa.s_in.sa_addr);
- So(strcmp(str, "8.8.4.4") == 0);
- nng_aio_free(aio);
- });
-
- Convey("UDP Name service resolves", {
- nng_aio * aio;
- const char * str;
- nng_sockaddr sa;
-
- So(nng_aio_alloc(&aio, NULL, NULL) == 0);
- nng_aio_set_input(aio, 0, &sa);
- nni_plat_udp_resolv("8.8.4.4", "tftp", NNG_AF_INET, 1, aio);
- nng_aio_wait(aio);
- So(nng_aio_result(aio) == 0);
- So(sa.s_in.sa_family == NNG_AF_INET);
- So(sa.s_in.sa_port == ntohs(69));
- str = ip4tostr(&sa.s_in.sa_addr);
- So(strcmp(str, "8.8.4.4") == 0);
+ So(nng_aio_result(aio) == NNG_EADDRINVAL);
nng_aio_free(aio);
});