Skip to content
Snippets Groups Projects
Commit 8c8efa4f authored by Olivier Dion's avatar Olivier Dion
Browse files

testVideo_input: Call DRing::fini

If not called, other threads might read memories freed by the exit handlers of
the main thread, resulting in a race condition that can cause a segmentation
fault.

Gitlab: #545
Change-Id: I29ec4c1ffee96b6a083e36f31cd738daf622315d
parent ad8a1f85
Branches
No related tags found
No related merge requests found
......@@ -38,25 +38,24 @@ class VideoInputTest : public CppUnit::TestFixture {
public:
static std::string name() { return "video_input"; }
VideoInputTest()
{
DRing::init(DRing::InitFlag(DRing::DRING_FLAG_DEBUG | DRing::DRING_FLAG_CONSOLE_LOG));
DRing::start("dring-sample.yml");
}
~VideoInputTest() { DRing::fini(); }
private:
void testInput();
void init_daemon();
CPPUNIT_TEST_SUITE(VideoInputTest);
CPPUNIT_TEST(init_daemon);
CPPUNIT_TEST(testInput);
CPPUNIT_TEST_SUITE_END();
};
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(VideoInputTest, VideoInputTest::name());
void
VideoInputTest::init_daemon()
{
DRing::init(DRing::InitFlag(DRing::DRING_FLAG_DEBUG | DRing::DRING_FLAG_CONSOLE_LOG));
DRing::start("dring-sample.yml");
}
void
VideoInputTest::testInput()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment