mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 14:46:01 +00:00
unit: speed up test_pbuf_queueing_bigger_than_64k
Speed up test_pbuf_queueing_bigger_than_64k by using memcmp rather than a byte by byte comparision. This allows using word aligned compares within the memcmp implementation This fixes a unit test timeout on my Windows 10 box with WSL which was taking longer than 4 seconds for the unix port unit test to complete See failure details in https://savannah.nongnu.org/patch/index.php?9579
This commit is contained in:
parent
91038e4979
commit
b1258bf8e6
|
@ -161,12 +161,9 @@ START_TEST(test_pbuf_queueing_bigger_than_64k)
|
||||||
pbuf_copy_partial(p1, testbuf_1a, TESTBUFSIZE_1, 0);
|
pbuf_copy_partial(p1, testbuf_1a, TESTBUFSIZE_1, 0);
|
||||||
pbuf_copy_partial(rest2, testbuf_2a, TESTBUFSIZE_2, 0);
|
pbuf_copy_partial(rest2, testbuf_2a, TESTBUFSIZE_2, 0);
|
||||||
pbuf_copy_partial(rest3, testbuf_3a, TESTBUFSIZE_3, 0);
|
pbuf_copy_partial(rest3, testbuf_3a, TESTBUFSIZE_3, 0);
|
||||||
for(i = 0; i < TESTBUFSIZE_1; i++)
|
fail_if(memcmp(testbuf_1, testbuf_1a, TESTBUFSIZE_1));
|
||||||
fail_unless(testbuf_1[i] == testbuf_1a[i]);
|
fail_if(memcmp(testbuf_2, testbuf_2a, TESTBUFSIZE_2));
|
||||||
for(i = 0; i < TESTBUFSIZE_2; i++)
|
fail_if(memcmp(testbuf_3, testbuf_3a, TESTBUFSIZE_3));
|
||||||
fail_unless(testbuf_2[i] == testbuf_2a[i]);
|
|
||||||
for(i = 0; i < TESTBUFSIZE_3; i++)
|
|
||||||
fail_unless(testbuf_3[i] == testbuf_3a[i]);
|
|
||||||
|
|
||||||
pbuf_free(p1);
|
pbuf_free(p1);
|
||||||
pbuf_free(rest2);
|
pbuf_free(rest2);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user