android.openglperf.cts.GlVboPerfTest#testVboVsNonVboPerfGeometry0 seldom fail
The test case runs a GLThread and a UIThread simultaneously. But a race condition will happen on the following conditions.
1. GLThread is context switched out at the moment mSemaphore.release() in reset() (cts/libs/util/src/android/cts/util/WatchDog.java)
2. Then, UIThread is executed and calls stop() which will set mSemaphore as NULL (cts/libs/util/src/android/cts/util/WatchDog.java)
3. Finally, GLThread is context switched in and cause a java.lang.NullPointerException on mSemaphore.
This patch will make sure the exceution order of UIThread and GLThread correctly and safely.
Change-Id: I8b8c28b3af16c6a58cfcb16dc62439fd243d9c29
Signed-off-by:
Junjie Hu <junjie.hu@mediatek.com>
Loading
Please sign in to comment