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

test and comments for netshutdown #313

Merged
merged 11 commits into from
Jul 24, 2024
Merged

test and comments for netshutdown #313

merged 11 commits into from
Jul 24, 2024

Conversation

qianxichen233
Copy link
Contributor

@qianxichen233 qianxichen233 commented Jul 18, 2024

Description

This PR adds some tests and comments for netshutdown_syscall. Current implementation of shutdown has several big issues, so only some basic tests could be done on shutdown right now.

Fixes # (issue)

  1. add fd range check at the beginning of the shutdown
  2. fixed a minor issue in setting connection state under _cleanup_socket_inner_helper

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A - ut_lind_net_shutdown_bad_input
  • Test B - ut_lind_net_shutdown_unix
  • Test C - ut_lind_net_shutdown_inet

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been added to a pull request and/or merged in other modules (native-client, lind-glibc, lind-project)

src/safeposix/syscalls/net_calls.rs Outdated Show resolved Hide resolved
src/safeposix/syscalls/net_calls.rs Outdated Show resolved Hide resolved
src/safeposix/syscalls/net_calls.rs Show resolved Hide resolved
src/safeposix/syscalls/net_calls.rs Show resolved Hide resolved
src/safeposix/syscalls/net_calls.rs Show resolved Hide resolved
src/tests/networking_tests.rs Show resolved Hide resolved
src/tests/networking_tests.rs Show resolved Hide resolved
src/tests/networking_tests.rs Show resolved Hide resolved
src/tests/networking_tests.rs Show resolved Hide resolved
Copy link
Contributor

@davidge20 davidge20 left a comment

Choose a reason for hiding this comment

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

lgtm !

Copy link
Member

@rupeshkoushik07 rupeshkoushik07 left a comment

Choose a reason for hiding this comment

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

LGTM!

@yashaswi2000 yashaswi2000 self-requested a review July 23, 2024 17:14
Copy link
Contributor

@rennergade rennergade left a comment

Choose a reason for hiding this comment

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

approved!

@rennergade rennergade merged commit 0289048 into develop Jul 24, 2024
2 checks passed
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