Skip to content

Add select syscall handler and tests#1910

Merged
robgjansen merged 4 commits intoshadow:mainfrom
robgjansen:select-syscall-c
Feb 18, 2022
Merged

Add select syscall handler and tests#1910
robgjansen merged 4 commits intoshadow:mainfrom
robgjansen:select-syscall-c

Conversation

@robgjansen
Copy link
Copy Markdown
Member

This PR provides support for the select() system call:

  • adds new syscall handler in Shadow so native process calls to select no longer fail.
  • re-enables legacy TCP test that can optionally use select as an event monitor.
  • adds a new select-specific test to more completely test the select API against linux.

I decided to implement the handler in C first - it internally uses some code from our poll handler whose functionality is largely similar. I'll loop around to convert both the poll and select handlers to rust.

Closes #1721

@robgjansen robgjansen added Type: Enhancement New functionality or improved design Component: Testing Unit and integration tests and frameworks Component: Main Composing the core Shadow executable Component: Build Build/install tools and dependencies labels Feb 14, 2022
@robgjansen robgjansen added this to the Support socket io syscalls milestone Feb 14, 2022
@robgjansen robgjansen self-assigned this Feb 14, 2022
@robgjansen robgjansen marked this pull request as ready for review February 16, 2022 21:26
Copy link
Copy Markdown
Contributor

@stevenengler stevenengler left a comment

Choose a reason for hiding this comment

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

Looks good to me! Now python's sleep() will work :)

@robgjansen robgjansen enabled auto-merge February 18, 2022 15:42
@robgjansen robgjansen merged commit 3a4e964 into shadow:main Feb 18, 2022
@robgjansen robgjansen deleted the select-syscall-c branch February 18, 2022 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Build Build/install tools and dependencies Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks Type: Enhancement New functionality or improved design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support select syscall

2 participants