- still a memleak remaining :-(
td.tester = tester;
td.isam = ike_sa_manager_create();
td.tester = tester;
td.isam = ike_sa_manager_create();
+ tester->assert_true(tester, (status == SUCCESS), "ike_sa_manager creation");
status = td.isam->checkin(td.isam, ike_sa);
tester->assert_true(tester, (status == SUCCESS), "checkin IKE_SA");
status = td.isam->checkin(td.isam, ike_sa);
tester->assert_true(tester, (status == SUCCESS), "checkin IKE_SA");
* this should block until the have done their work.*/
status = td.isam->delete(td.isam, ike_sa_id);
tester->assert_true(tester, (status == SUCCESS), "delete IKE_SA by id");
* this should block until the have done their work.*/
status = td.isam->delete(td.isam, ike_sa_id);
tester->assert_true(tester, (status == SUCCESS), "delete IKE_SA by id");
for (i = 0; i < thread_count; i++)
{
pthread_join(threads[i], NULL);
}
for (i = 0; i < thread_count; i++)
{
pthread_join(threads[i], NULL);
}
+ //ike_sa_id->destroy(ike_sa_id);
+
status = td.isam->checkout(td.isam, ike_sa_id, &ike_sa);
tester->assert_true(tester, (status == SUCCESS), "checkout unexisting IKE_SA 2");
status = td.isam->checkout(td.isam, ike_sa_id, &ike_sa);
tester->assert_true(tester, (status == SUCCESS), "checkout unexisting IKE_SA 2");
- //ike_sa_id->destroy(ike_sa_id);
for (i = 0; i < thread_count; i++)
{
if (pthread_create(&threads[i], NULL, (void*(*)(void*))failed_thread, (void*)ike_sa_id))
for (i = 0; i < thread_count; i++)
{
if (pthread_create(&threads[i], NULL, (void*(*)(void*))failed_thread, (void*)ike_sa_id))
pthread_join(threads[i], NULL);
}
pthread_join(threads[i], NULL);
}
+ //ike_sa_id->destroy(ike_sa_id);
+
/* Third Test:
* put in a lot of IKE_SAs, check it out, set a thread waiting
* and destroy the manager...
/* Third Test:
* put in a lot of IKE_SAs, check it out, set a thread waiting
* and destroy the manager...
/* let them go acquiring */
sleep(1);
/* let them go acquiring */
sleep(1);
- td.isam->destroy(td.isam);
+ status = td.isam->destroy(td.isam);
+ tester->assert_true(tester, (status == SUCCESS), "ike_sa_manager destruction");
for (i = 0; i < thread_count; i++)
{
for (i = 0; i < thread_count; i++)
{