Avoid thread state races in EGL multithread tests
authorMichael Chock <mchock@nvidia.com>
Mon, 14 Aug 2017 15:36:11 +0000 (08:36 -0700)
committerMichael Chock <mchock@nvidia.com>
Wed, 16 Aug 2017 17:57:20 +0000 (10:57 -0700)
commitf4e3e574a29303a8b4b07cbf7d1168dd9d1084af
tree2adc71d02ce18ad6ef291a04389b7bae61e4ff21
parentb7ae0d8484012e3c2b8bf83be78d2b8d4c88ceaa
Avoid thread state races in EGL multithread tests

Previously, threads objects inside dEQP-EGL.functional.multithread.*
tests would conflate thread execution status with test results. The
former would only be set inside the thread, but the latter could be set
by other threads (e.g., a test thread might set its status to RUNNING
while another test might attempt to set the status of NOT_SUPPORTED).
These race conditions could lead to incorrect results.

Fix this by moving error and not-supported states out of the thread
execution state, and instead storing them as single-purpose flags inside
the test case object, avoiding the possibility of conflicting writes.

Change-Id: I2b117aa98c1c2b69b0d134610d6fd37656083e54
modules/egl/teglMultiThreadTests.cpp