Dear colleagues,
There is a data race between ze_context_handle_t::context checking and its initialization in level_zero_tests::get_default_context(). The context may be unsuccessfully checked in the condition by several threads and then assigned simultaneously as well. Multithread initialization is expected in for example, zeImmediateCommandListMultiTthreadTest::GivenMultipleThreadsWhenCreateCloseAndDestroyImmediateCommandListsThenReturnSuccess.
Same issue affects the code below.