Skip to content

Commit

Permalink
Fix race condition in security FSM unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Boasson <eb@ilities.com>
  • Loading branch information
eboasson committed Mar 27, 2024
1 parent ff00abe commit 0118042
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/security/core/tests/fsm.c
Expand Up @@ -424,12 +424,12 @@ CU_Test(ddssec_fsm, create, .init = fsm_control_init, .fini = fsm_control_fini)
CU_ASSERT (visited_auth == 0xff);
ddsrt_mutex_unlock (&g_lock);

/* Check correct callback parameter passing (from fsm to user defined methods) */
CU_ASSERT(correct_arg && correct_fsm);
dds_security_fsm_free (fsm_auth);

/* Check whether timeout callback has NOT been invoked */
/* Check correct callback parameter passing (from fsm to user defined methods) */
ddsrt_mutex_lock (&g_lock);
CU_ASSERT (correct_arg && correct_fsm);
CU_ASSERT (visited_timeout == 0);
ddsrt_mutex_unlock (&g_lock);
}
Expand Down

0 comments on commit 0118042

Please sign in to comment.