Fix/sync listener bug and test improvements - #104
Conversation
…ng_option testcase in functional_test.py
|
@microsoft-github-policy-service agree company="Microsoft" |
|
Simon Xiao (@simonxiaoss) Can you please review this PR? I'm unable to add reviewers to the PR. |
|
Pratik Bedre (@pratikb2805) Can you review this PR? |
|
lubaihua33 Can you please review this PR? |
There was a problem hiding this comment.
Pull request overview
Fixes receiver-side sync socket handling to avoid hanging after tests complete, and updates functional tests for newer pytest compatibility.
Changes:
- Fix incorrect listener fd error check in receiver sync socket setup.
- Change sync thread
epoll_wait()to a periodic timeout to allow exit-condition polling. - Update pytest lifecycle hooks and fix minor test issues (typos, port count, duplicate flags).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/endpointsync.c |
Corrects sync listener error check and adjusts epoll wait behavior for receiver exit handling. |
test/functional_test.py |
Updates pytest setup/teardown hook names and improves a few functional test cases for reliability/compatibility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Yes, I have requested copilot to review. |
|
Lokesh Muthuraj (@lokeshmuthuraj) could you have a check the comments that copilot provided? |
lubaihua33 Thanks. I have fixed the comments provided by Copilot. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Lokesh Muthuraj (@lokeshmuthuraj) Could you please have a check for the new review comments provided by copilot? |
|
Sure, I will check the new review comments and get back. Thanks. |
|
lubaihua33 I have created 2 new issues #107 and #108 for the comments provided by copilot. I will take them in a different PR. Please check and review this PR. I have resolved outstanding comments. Thanks. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This PR fixes a bug in the receiver sync socket code and improves test compatibility with modern pytest versions.
Changes
Bug Fixes
Fixed incorrect variable check in receiver sync socket (endpointsync.c)
sync_listener == -1but the variablesync_listenerwas initialized to0and never updated in the code.ss->listener == -1(the actual listener socket)Changed epoll_wait timeout from infinite to 1 second (endpointsync.c)
-1(infinite wait) to1000millisecondsreceiver_exit_after_doneis enabledTest Improvements
Updated pytest method names for compatibility (test/functional_test.py)
setup()→setup_method(self, method)teardown()→teardown_method(self, method)Fixed typos and improved test reliability
cooldowm→cooldownin test namedefualt_threads→default_threads200to50intest_mapping_optiontestcase since the test was getting hung. I faced the same issue and noticed there was already an issue for it: Ntttcp stalling with-P 200#99-Dflag in receiver commandTesting
Checklist
Before fix - got warnings for functional_test.py.
After fix - tests pass cleanly