As shown by the testbot, doubling is not always sufficient.
From: Hans Leidekker hans@codeweavers.com
As shown by the testbot, doubling is not always sufficient. --- dlls/iphlpapi/tests/iphlpapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 090cd2c9ff9..9ba6709e26a 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1765,7 +1765,7 @@ static void test_GetAdaptersAddresses(void) free(ptr);
/* higher size must not be changed to lower size */ - size *= 2; + size *= 4; osize = size; ptr = malloc(osize); ret = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX | GAA_FLAG_SKIP_FRIENDLY_NAME, NULL, ptr, &osize);
From: Hans Leidekker hans@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54588 --- dlls/iphlpapi/tests/iphlpapi.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 9ba6709e26a..f05b2b5e8f1 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1878,6 +1878,7 @@ static void test_GetExtendedTcpTable(void) ret = pGetExtendedTcpTable( NULL, &size, TRUE, AF_INET, TCP_TABLE_BASIC_ALL, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table = malloc( size ); ret = pGetExtendedTcpTable( table, &size, TRUE, AF_INET, TCP_TABLE_BASIC_ALL, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -1887,6 +1888,7 @@ static void test_GetExtendedTcpTable(void) ret = pGetExtendedTcpTable( NULL, &size, TRUE, AF_INET, TCP_TABLE_BASIC_LISTENER, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table = malloc( size ); ret = pGetExtendedTcpTable( table, &size, TRUE, AF_INET, TCP_TABLE_BASIC_LISTENER, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -1896,6 +1898,7 @@ static void test_GetExtendedTcpTable(void) ret = pGetExtendedTcpTable( NULL, &size, TRUE, AF_INET, TCP_TABLE_OWNER_PID_ALL, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table_pid = malloc( size ); ret = pGetExtendedTcpTable( table_pid, &size, TRUE, AF_INET, TCP_TABLE_OWNER_PID_ALL, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -1905,6 +1908,7 @@ static void test_GetExtendedTcpTable(void) ret = pGetExtendedTcpTable( NULL, &size, TRUE, AF_INET, TCP_TABLE_OWNER_PID_LISTENER, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table_pid = malloc( size ); ret = pGetExtendedTcpTable( table_pid, &size, TRUE, AF_INET, TCP_TABLE_OWNER_PID_LISTENER, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -1914,6 +1918,7 @@ static void test_GetExtendedTcpTable(void) ret = pGetExtendedTcpTable( NULL, &size, TRUE, AF_INET, TCP_TABLE_OWNER_MODULE_ALL, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table_module = malloc( size ); ret = pGetExtendedTcpTable( table_module, &size, TRUE, AF_INET, TCP_TABLE_OWNER_MODULE_ALL, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -1923,6 +1928,7 @@ static void test_GetExtendedTcpTable(void) ret = pGetExtendedTcpTable( NULL, &size, TRUE, AF_INET, TCP_TABLE_OWNER_MODULE_LISTENER, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table_module = malloc( size ); ret = pGetExtendedTcpTable( table_module, &size, TRUE, AF_INET, TCP_TABLE_OWNER_MODULE_LISTENER, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -1997,6 +2003,7 @@ static void test_GetExtendedUdpTable(void) ret = pGetExtendedUdpTable( NULL, &size, TRUE, AF_INET, UDP_TABLE_BASIC, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table = malloc( size ); ret = pGetExtendedUdpTable( table, &size, TRUE, AF_INET, UDP_TABLE_BASIC, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -2006,6 +2013,7 @@ static void test_GetExtendedUdpTable(void) ret = pGetExtendedUdpTable( NULL, &size, TRUE, AF_INET, UDP_TABLE_OWNER_PID, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table_pid = malloc( size ); ret = pGetExtendedUdpTable( table_pid, &size, TRUE, AF_INET, UDP_TABLE_OWNER_PID, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret ); @@ -2015,6 +2023,7 @@ static void test_GetExtendedUdpTable(void) ret = pGetExtendedUdpTable( NULL, &size, TRUE, AF_INET, UDP_TABLE_OWNER_MODULE, 0 ); ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", ret );
+ size *= 4; table_module = malloc( size ); ret = pGetExtendedUdpTable( table_module, &size, TRUE, AF_INET, UDP_TABLE_OWNER_MODULE, 0 ); ok( ret == ERROR_SUCCESS, "got %lu\n", ret );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
3 TestBot errors prevented a full analysis of your patch. If the test caused the operating system (e.g. Windows) to crash or reboot you will probably have to modify it to avoid that. Other issues should be reported to the TestBot administrators.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=151949
Your paranoid android.
=== build (build log) ===
WineRunBuild.pl:error: Could not copy the patch to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) WineRunBuild.pl:error: BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died)
=== debian11 (build log) ===
WineRunWineTest.pl:error: Could not send 'patch.diff' to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) WineRunWineTest.pl:error: BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) WineRunWineTest.pl:error: Giving up after 3 run(s)
=== debian11b (build log) ===
WineRunWineTest.pl:error: Could not send 'patch.diff' to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) WineRunWineTest.pl:error: BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) WineRunWineTest.pl:error: Giving up after 3 run(s)
Is there a reason not to use a loop here? That would be more reliable.
This test is supposed to show that the size parameter is not updated on success. The only way to do that is to pass a too large size, which of course we can't be certain about.
Right, but we could still loop on `ERROR_BUFFER_OVERFLOW`.