Skip to content
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(testing): Move CloseSession call after factory reset in TC_CGEN_2_8 #37777

Open
wants to merge 2 commits into
base: v1.4-branch
Choose a base branch
from

Conversation

swan-amazon
Copy link
Contributor

Fixes #37774

The current implementation of commissioner.CloseSession only marks the session as defunct rather than fully closing it. This state can be reactivated if messages are exchanged on the session.

By moving the CloseSession call to after the factory reset step, we ensure that the device session is already destroyed before marking it as defunct, preventing any possibility of message exchange that could reactivate the session. This allows the commissioner to successfully create a new session in subsequent steps.

A follow-up change will be needed to properly fix the CloseSession function to use MarkForEviction instead of MarkAsDefunct, and potentially rename the current function to better reflect its behavior.
Testing

Validated at 1.4.1 SVE event

The current implementation of commissioner.CloseSession only marks the session
as defunct rather than fully closing it. This state can be reactivated if
messages are exchanged on the session.

By moving the CloseSession call to after the factory reset step, we ensure
that the device session is already destroyed before marking it as defunct,
preventing any possibility of message exchange that could reactivate the
session. This allows the commissioner to successfully create a new session
in subsequent steps.

A follow-up change will be needed to properly fix the CloseSession function
to use MarkForEviction instead of MarkAsDefunct, and potentially rename the
current function to better reflect its behavior.
Copy link

semanticdiff-com bot commented Feb 25, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/python_testing/TC_CGEN_2_8.py  50% smaller

@swan-amazon swan-amazon marked this pull request as ready for review February 25, 2025 21:37
@github-actions github-actions bot added tests matter-1.4-te2-script-change Script changes before end of Matter 1.4 TE2 labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
matter-1.4-te2-script-change Script changes before end of Matter 1.4 TE2 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants