Commit f893387d authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

inetmib1/tests: Trace the SNMP error code and index rather than GetLastError on failure.

parent 00160719
......@@ -88,7 +88,7 @@ static void testQuery(void)
error = 0xdeadbeef;
index = 0xdeadbeef;
ret = pQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error);
ok(index == 0, "expected index 0, got %d\n", index);
......@@ -105,7 +105,7 @@ static void testQuery(void)
error = 0xdeadbeef;
index = 0xdeadbeef;
ret = pQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR ||
error == ERROR_FILE_NOT_FOUND /* Win9x */,
"expected SNMP_ERRORSTATUS_NOERROR or ERROR_FILE_NOT_FOUND, got %d\n",
......@@ -125,7 +125,7 @@ static void testQuery(void)
error = 0xdeadbeef;
index = 0xdeadbeef;
ret = pQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOSUCHNAME,
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n", error);
/* The index is 1-based rather than 0-based */
......@@ -147,7 +147,7 @@ static void testQuery(void)
error = 0xdeadbeef;
index = 0xdeadbeef;
ret = pQuery(SNMP_PDU_GET, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOSUCHNAME,
"expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n", error);
ok(index == 1, "expected index 1, got %d\n", index);
......@@ -169,7 +169,7 @@ static void testQuery(void)
error = 0xdeadbeef;
index = 0xdeadbeef;
ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error);
ok(index == 0, "expected index 0, got %d\n", index);
......@@ -252,7 +252,7 @@ static void testQuery(void)
moreData = TRUE;
noChange = FALSE;
ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error);
ok(index == 0, "expected index 0, got %d\n", index);
......@@ -274,7 +274,7 @@ static void testQuery(void)
moreData = TRUE;
do {
ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error);
ok(index == 0, "expected index 0, got %d\n", index);
......@@ -340,7 +340,7 @@ static void testQuery(void)
noChange = FALSE;
do {
ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error);
ok(index == 0, "expected index 0, got %d\n", index);
......@@ -406,7 +406,7 @@ static void testQuery(void)
noChange = FALSE;
do {
ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index);
ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError());
ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index);
/* FIXME: error and index aren't checked here because the UDP table is
* the last OID currently supported by Wine, so the last GetNext fails.
* todo_wine is also not effective because it will succeed for all but
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment