summaryrefslogtreecommitdiffstats
path: root/tests/camera2/CameraModuleTests.cpp
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2012-12-18 13:38:40 -0800
committerIgor Murashkin <iam@google.com>2012-12-20 16:35:47 -0800
commit7acb21a65c6eefe6ab1cbc55c7c15cece6bafbe5 (patch)
tree085cc6fc4d17b736bcfd9696b86a7ec4ee8cab22 /tests/camera2/CameraModuleTests.cpp
parent1da4d3e377b6bc1ba10ec980176b0ff9dc3f591d (diff)
downloadhardware_libhardware-7acb21a65c6eefe6ab1cbc55c7c15cece6bafbe5.zip
hardware_libhardware-7acb21a65c6eefe6ab1cbc55c7c15cece6bafbe5.tar.gz
hardware_libhardware-7acb21a65c6eefe6ab1cbc55c7c15cece6bafbe5.tar.bz2
Camera2: Tests: Release streams after HAL is unloaded
This fixes a segfault in the HAL where it was trying to write to a locked buffer that disappeared from underneath it. Any users of CameraModuleFixture should now call SetUp/TearDown explicitly. Other classes remain unchanged until we need a custom TearDown order for them. Change-Id: I9aa8c2d86492a76f2c01c1ad4cbe0cf91e5c7916
Diffstat (limited to 'tests/camera2/CameraModuleTests.cpp')
-rw-r--r--tests/camera2/CameraModuleTests.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/camera2/CameraModuleTests.cpp b/tests/camera2/CameraModuleTests.cpp
index 5e85698..b5b88fc 100644
--- a/tests/camera2/CameraModuleTests.cpp
+++ b/tests/camera2/CameraModuleTests.cpp
@@ -33,6 +33,15 @@ namespace tests {
class CameraModuleTest : public ::testing::Test,
public CameraModuleFixture<> {
+
+public:
+ CameraModuleTest() {
+ CameraModuleFixture::SetUp();
+ }
+
+ ~CameraModuleTest() {
+ CameraModuleFixture::TearDown();
+ }
};
TEST_F(CameraModuleTest, LoadModule) {