[ncp] disable assert and watchdog property when fuzz testing (#3547)

This commit is contained in:
Jonathan Hui
2019-02-04 10:51:31 -08:00
committed by GitHub
parent 392cfecff8
commit b2bbad7674
+4
View File
@@ -2083,7 +2083,9 @@ exit:
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_DEBUG_TEST_ASSERT>(void)
{
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
assert(false);
#endif
// We only get to this point if `assert(false)`
// does not cause an NCP reset on the platform.
@@ -2095,8 +2097,10 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_DEBUG_TEST_ASSERT>(vo
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_DEBUG_TEST_WATCHDOG>(void)
{
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
while (true)
;
#endif
OT_UNREACHABLE_CODE(return OT_ERROR_NONE;)
}