summaryrefslogtreecommitdiffstats
path: root/camera/tests
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-02-28 10:41:51 -0800
committerIgor Murashkin <iam@google.com>2013-02-28 11:48:46 -0800
commit3fa4891f54bbfdbe8ee652930d22c96639964eff (patch)
treefefeb57ca7316faa84ac848d3b597daae7a29417 /camera/tests
parentb99c5b8eebb35133a08c46b015624bd4c4a6c477 (diff)
downloadframeworks_av-3fa4891f54bbfdbe8ee652930d22c96639964eff.zip
frameworks_av-3fa4891f54bbfdbe8ee652930d22c96639964eff.tar.gz
frameworks_av-3fa4891f54bbfdbe8ee652930d22c96639964eff.tar.bz2
ProCameraTest: Drop frames test move processing delay between lock/unlock
* This makes it more likely to find races with the buffer being unlocked by itself Change-Id: I1fa7dbfb73f60664a02a35678b58bcc9b06893a2
Diffstat (limited to 'camera/tests')
-rw-r--r--camera/tests/ProCameraTests.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/camera/tests/ProCameraTests.cpp b/camera/tests/ProCameraTests.cpp
index f93e5cd..39456af 100644
--- a/camera/tests/ProCameraTests.cpp
+++ b/camera/tests/ProCameraTests.cpp
@@ -1001,11 +1001,6 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFrames) {
// Consume a couple of results
for (int i = 0; i < NUM_REQUESTS; ++i) {
- // Process at 10fps, stream is at 15fps.
- // This means we will definitely fill up the buffer queue with
- // extra buffers and need to drop them.
- usleep(TEST_FRAME_PROCESSING_DELAY_US);
-
int numFrames;
EXPECT_TRUE((numFrames = mCamera->waitForFrameBuffer(streamId)) > 0);
@@ -1025,6 +1020,11 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFrames) {
", dataPtr = " << (void*)buf.data <<
", timestamp = " << buf.timestamp << std::endl;
+ // Process at 10fps, stream is at 15fps.
+ // This means we will definitely fill up the buffer queue with
+ // extra buffers and need to drop them.
+ usleep(TEST_FRAME_PROCESSING_DELAY_US);
+
EXPECT_OK(consumer->unlockBuffer(buf));
}