Remove the test_gets_num_clients test from the C unit tests

This test was causing problems by using dummy pointers to simulate
connections.  When calling the cleanup code, these pointers were
thought to be real, and the code attemtped to clean up threads
referenced by those pointers, causing a segfault.

I've reimplemented the test in the ruby acceptance suite.
This commit is contained in:
Patrick J Cherry
2018-02-16 13:46:31 +00:00
parent 1407407ff4
commit 27a94a807e
2 changed files with 10 additions and 26 deletions

View File

@@ -105,25 +105,6 @@ START_TEST( test_gets_clients_allowed )
}
END_TEST
START_TEST( test_gets_num_clients )
{
struct server * server = mock_server();
struct status * status = status_create( server );
fail_if( status->num_clients != 0, "num_clients was wrong" );
status_destroy( status );
server->nbd_client[0].thread = 1;
server->nbd_client[1].thread = 1;
status = status_create( server );
fail_unless( status->num_clients == 2, "num_clients was wrong" );
status_destroy( status );
destroy_mock_server( server );
}
END_TEST
START_TEST( test_gets_pid )
{
struct server * server = mock_server();