version 1.21, 2005/02/23 06:13:50
|
version 1.22, 2005/02/24 01:15:57
|
|
|
#endif | #endif |
| |
// clients threads to create | // clients threads to create |
#define NUM_CLIENTS 1500 |
#define NUM_CLIENTS 64 |
| |
// amount of data to transfer from each client to server | // amount of data to transfer from each client to server |
#define TEST_DATA_SIZE 145243 | #define TEST_DATA_SIZE 145243 |
|
|
}; | }; |
| |
static void test_Startup(void); | static void test_Startup(void); |
|
static void test_Cleanup(void); |
void BlockingClient(volatile int *serverPort); | void BlockingClient(volatile int *serverPort); |
void BlockingServer(volatile int *port); | void BlockingServer(volatile int *port); |
static void test_ClientServerBlocking_1(void); | static void test_ClientServerBlocking_1(void); |
|
|
yieldCounter++; | yieldCounter++; |
} | } |
| |
trace("client done\n"); |
//trace("client done\n"); |
clientsDone++; | clientsDone++; |
} | } |
| |
|
|
trace("startup ok\n"); | trace("startup ok\n"); |
} | } |
| |
|
|
|
static void test_Cleanup(void) |
|
{ |
|
int cleanupOK; |
|
|
|
cleanupOK = ! WSACleanup(); |
|
|
|
ok( cleanupOK , "error in WSACleanup()"); |
|
trace("cleanup ok\n"); |
|
} |
|
|
START_TEST(wsock32_main) | START_TEST(wsock32_main) |
{ | { |
|
const int numTests = 3; |
testData = malloc(TEST_DATA_SIZE); | testData = malloc(TEST_DATA_SIZE); |
trace("test 1 of 2:\n"); |
|
|
trace("test 1 of %d:\n", numTests); |
test_Startup(); | test_Startup(); |
trace("test 2 of 2:\n"); |
|
|
trace("test 2 of %d:\n", numTests); |
test_ClientServerBlocking_1(); | test_ClientServerBlocking_1(); |
|
|
|
trace("test 3 of %d:\n", numTests); |
|
test_Cleanup(); |
|
|
trace("all tests done\n"); | trace("all tests done\n"); |
| |
// wait for all clients to receive data before cleaning up | // wait for all clients to receive data before cleaning up |