connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

fix ReadHandler to do the right check if chip_enable_schema_check is false.

Open yunhanw-google opened this issue 2 years ago • 0 comments

I couldn't figure out how this was passing, then realized that the only reason it does is that there #if CHIP_CONFIG_IM_ENABLE_SCHEMA_CHECK code in ReadHandler::ProcessReadRequest that causes the return value to be different depending on whether that define is enabled or not. That's really really bad: it means what we are testing in CI is likely not what we are shipping on devices.

I sort of wonder whether we should run unit tests with chip_enable_schema_check and see what that does...

As a followup, we need to fix ReadHandler to do the right thing here even if chip_enable_schema_check is false.

Originally posted by @bzbarsky-apple in https://github.com/project-chip/connectedhomeip/pull/21374#discussion_r939468892

yunhanw-google avatar Aug 06 '22 03:08 yunhanw-google