-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix shutting down System::Layer in unit tests #8865
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Problem Some unit tests either reference System::Layer after its destruction, or don't call Shutdown before its destruction. #### Change overview - Shut down System::Layer in test finalization - Don't initialize System::Layer repeatedly (although this is currently harmless). - Separate IOContext, which uses a ‘hidden’ global System::Layer via NetworkTestHelpers, from Test::MessagingContext, which is sometimes multiply instantiated. #### Testing Quis custodiet ipsos custodes?
woody-apple
approved these changes
Aug 9, 2021
pullapprove
bot
requested review from
andy31415,
chrisdecenzo,
Damian-Nordic,
hawk248,
jepenven-silabs,
kedars and
msandstedt
August 10, 2021 14:15
Damian-Nordic
approved these changes
Aug 10, 2021
bzbarsky-apple
approved these changes
Aug 10, 2021
This was referenced Aug 13, 2021
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Aug 25, 2021
#### Problem There have been multiple instances of code using a `System::Layer` object after it has been shut down or destroyed (some previously fixed in project-chip#8865). In the ancestral code, `System::Layer` was fully static, so this ‘worked’. #### Change overview - More thoroughly track and check `System::Layer` object state. - Spin out state tracking into `lib/support/ObjectLifeCycle.h` - Fix several sequencing issues. #### Testing CI; no change to visible functionality intended.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Aug 25, 2021
#### Problem There have been multiple instances of code using a `System::Layer` object after it has been shut down or destroyed, some previously fixed in project-chip#8865. (In the ancestral code, `System::Layer` was fully static.) #### Change overview - More thoroughly track and check `System::Layer` object state. - Spin out state tracking into `lib/support/ObjectLifeCycle.h` - Fix several sequencing issues. #### Testing CI; no change to visible functionality intended.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Aug 27, 2021
#### Problem There have been multiple instances of code using a `System::Layer` object after it has been shut down or destroyed, some previously fixed in project-chip#8865. (In the ancestral code, `System::Layer` was fully static.) #### Change overview - More thoroughly track and check `System::Layer` object state. - Spin out state tracking into `lib/support/ObjectLifeCycle.h` - Fix several sequencing issues. #### Testing CI; no change to visible functionality intended.
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Aug 30, 2021
#### Problem There have been multiple instances of code using a `System::Layer` object after it has been shut down or destroyed, some previously fixed in project-chip#8865. (In the ancestral code, `System::Layer` was fully static.) #### Change overview - More thoroughly track and check `System::Layer` object state. - Spin out state tracking into `lib/support/ObjectLifeCycle.h` - Fix several sequencing issues. #### Testing CI; no change to visible functionality intended.
mspang
pushed a commit
that referenced
this pull request
Aug 31, 2021
#### Problem There have been multiple instances of code using a `System::Layer` object after it has been shut down or destroyed, some previously fixed in #8865. (In the ancestral code, `System::Layer` was fully static.) #### Change overview - More thoroughly track and check `System::Layer` object state. - Spin out state tracking into `lib/support/ObjectLifeCycle.h` - Fix several sequencing issues. #### Testing CI; no change to visible functionality intended.
nikita-s-wrk
pushed a commit
to nikita-s-wrk/connectedhomeip
that referenced
this pull request
Sep 23, 2021
* Fix shutting down System::Layer in unit tests #### Problem Some unit tests either reference System::Layer after its destruction, or don't call Shutdown before its destruction. #### Change overview - Shut down System::Layer in test finalization - Don't initialize System::Layer repeatedly (although this is currently harmless). - Separate IOContext, which uses a ‘hidden’ global System::Layer via NetworkTestHelpers, from Test::MessagingContext, which is sometimes multiply instantiated. #### Testing Quis custodiet ipsos custodes? * restyle
mkardous-silabs
pushed a commit
to mkardous-silabs/connectedhomeip
that referenced
this pull request
Sep 24, 2021
#### Problem There have been multiple instances of code using a `System::Layer` object after it has been shut down or destroyed, some previously fixed in project-chip#8865. (In the ancestral code, `System::Layer` was fully static.) #### Change overview - More thoroughly track and check `System::Layer` object state. - Spin out state tracking into `lib/support/ObjectLifeCycle.h` - Fix several sequencing issues. #### Testing CI; no change to visible functionality intended.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Some unit tests either reference System::Layer after its destruction,
or don't call Shutdown before its destruction.
Change overview
harmless).
NetworkTestHelpers, from Test::MessagingContext, which is sometimes
multiply instantiated.
Testing
Quis custodiet ipsos custodes?