Skip to content

Conversation

@lifezoned4
Copy link

The library crashes fatal when the start method is called twice.

  • Fix by protecting start without being in STOPPED state.
  • Added STOPPED/STARTED State management for protecting dual start.

void test_no_unusual_reset(){
const soc_reset_reason_t reason = esp_rom_get_reset_reason(0);
TEST_ASSERT_MESSAGE(reason != RESET_REASON_CPU0_SW, "Should not be software reset (lib crash?)");
if(reason == RESET_REASON_CPU0_SW) TEST_ABORT();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sure why the platformio testing framework (unity) is looping over the tests altough I try to abort them here. It still reaches the crash position and continue a rerun (fails on this one) but continue to loop.

This Unit Test construct can probably be cleaned up and been written in a better way.

@lifezoned4 lifezoned4 force-pushed the fix-dual-start-crash branch from 402e2a7 to 2ab70b1 Compare August 24, 2023 14:11
@mehtmehtsen mehtmehtsen force-pushed the fix-dual-start-crash branch from 9d86e0c to d98b9f1 Compare October 4, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants