Added more logging

This commit is contained in:
Mattias Gustavsson
2021-09-15 09:12:13 +02:00
parent 02a5279fbd
commit c1dc90042e

View File

@@ -75,22 +75,28 @@ void ipc_tests() {
}
{
printf( "\nTest start\n\n" );
TESTFW_TEST_BEGIN( "Can connect multiple IPC clients multiple times" );
ipc_server_t* server = ipc_server_start( "test_pipe",
[]( char const*, void*, char*, size_t ) { }, NULL );
TESTFW_EXPECTED( server != NULL );
for( int j = 0; j < 10; ++j ) {
printf( "\nj: %d\n\n", j );
ipc_client_t* clients[ 32 ];
for( int i = 0; i < sizeof( clients ) / sizeof( *clients ); ++i ) {
printf( "\ni1: %d\n\n", i );
clients[ i ] = ipc_client_connect( "test_pipe" );
TESTFW_EXPECTED( clients[ i ] );
}
for( int i = 0; i < sizeof( clients ) / sizeof( *clients ); ++i ) {
printf( "\ni2: %d\n\n", i );
ipc_client_disconnect( clients[ i ] );
}
}
printf( "\nStop\n\n" );
ipc_server_stop( server );
TESTFW_TEST_END();
printf( "\nTest end\n\n" );
}
{