-
Notifications
You must be signed in to change notification settings - Fork 932
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
app_stack: Fix macro regression. #257
base: 20
Are you sure you want to change the base?
Conversation
Fixes a regression introduced in commit 617dad4, where executing GoSub subroutines inside macros will cause issues. This undoes the check added in that commit for macros to ensure the same behavior as before. Resolves: asterisk#253
cherry-pick-to: 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests need to be written to exercise the current behavior before this can be merged.
Good idea, but how would this work exactly? I don't think the Asterisk test suite has any way to check CLI output or channel internals... does it? Maybe a better question, what aspect specifically should be tested? |
It caused an actual failure in dialplan execution for @creslin287 which is testable through the testsuite, so if that situation can be identified then a test can be written for it. |
Yes, but tests cannot be written for master and 21, since macro support has been removed entirely from there. So the tests would only apply to 20 and 18 - or am I missing something here? |
An effort should be put forth to include test coverage for 21 and master. If not possible then an explanation of why not and what would be required to actually do testing would be needed. The functionality that should be tested is what change to behavior it has caused. |
This is something that we've all become lax on, to the detriment of the project. We should not brush off writing tests if they're hard. We should put forth any and all effort we can to include test coverage. |
Adding regression tests for this will be easy. Testing the functionality itself is hard because there's no good way I can think of to do so. I see 3 possible options for that:
Again, I'm referring to the functionality test here, not the regression tests which can be done in the test suite easily. Option 3 seems the best to me, even though it's going to be messy. Or can you think of a way this could be done in test suite? |
Channels are channels, executing dialplan is executing dialplan. Doing it as a unit test is likely possible. I don't know the full requirements or constraints so I can't say otherwise. |
Fixes a regression introduced in commit
617dad4,
where executing GoSub subroutines inside
macros will cause issues. This undoes the
check added in that commit for macros to
ensure the same behavior as before.
Resolves: #253