OSDN Git Service

Fix AlarmTestHarness so alarm tests pass again
authorZach Johnson <zachoverflow@google.com>
Mon, 18 May 2015 21:48:50 +0000 (14:48 -0700)
committerZach Johnson <zachoverflow@google.com>
Mon, 18 May 2015 21:58:38 +0000 (14:58 -0700)
commit5da8446fd7c649350aef16d8a9e0d731a9526241
treeb8e871a74842033bdd8a6ab05a0f5274b46a2b25
parent3e3d2a1d3bb9ada4fa612bf9d58c05b629385af2
Fix AlarmTestHarness so alarm tests pass again

Ensures all alarm resources are torn down before the
test ends, so the allocation tracker is happy and
doesn't assert-fail the tests.

Also guard alarm_shutdown to make sure it only runs
if lazy_initialize was run (to avoid undefined behavior)

Change-Id: Iaf78fe85edd2fc65b9c5ee11c74665a11a3bc9ba
osi/src/alarm.c
osi/test/AlarmTestHarness.cpp