Skip to content
  • Tomasz Miąsko's avatar
    gtestutils: Make test_rand_* thread-safe within a single test case · aed3c008
    Tomasz Miąsko authored
    Synchronize access to random number generator `test_run_rand` with
    a lock to ensure that `g_test_rand_*` family of functions is
    thread-safe.
    
    The reseeding taking place between test case runs is intentionally left
    unsynchronized. It is an error to continue using random number generator
    after test case has already finished running. Lack of synchronization
    here will make such erroneous use readily apparent with thread
    sanitizer.
    aed3c008