-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix posix tests #5811
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 posix tests #5811
Conversation
WalkthroughThe changes remove Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant PosixSpawnArgs
participant libc
Caller->>PosixSpawnArgs: spawn()
alt setpgroup provided
PosixSpawnArgs->>libc: posix_spawnattr_setpgroup
end
alt resetids true
PosixSpawnArgs->>libc: set POSIX_SPAWN_RESETIDS flag
end
alt setsid true (Linux)
PosixSpawnArgs->>libc: set POSIX_SPAWN_SETSID flag
else setsid true (Other)
PosixSpawnArgs-->>Caller: NotImplementedError
end
alt setsigmask provided
PosixSpawnArgs->>libc: posix_spawnattr_setsigmask
end
alt scheduler provided
PosixSpawnArgs-->>Caller: NotImplementedError
end
PosixSpawnArgs->>libc: posix_spawnattr_setflags (if any flags set)
PosixSpawnArgs->>libc: posix_spawn / posix_spawnp
libc-->>PosixSpawnArgs: pid
PosixSpawnArgs-->>Caller: pid
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (11)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
vm/src/stdlib/posix.rs (1)
1525-1531
: Track the scheduler parameter implementationThe scheduler parameter is marked as not implemented. This aligns with the test expectations being updated.
Would you like me to create an issue to track the implementation of the scheduler parameter functionality?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Lib/test/test_posix.py
(0 hunks)vm/src/stdlib/posix.rs
(3 hunks)
💤 Files with no reviewable changes (1)
- Lib/test/test_posix.py
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: Run snippets and cpython tests (macos-latest)
- GitHub Check: Run snippets and cpython tests (windows-latest)
- GitHub Check: Run snippets and cpython tests (ubuntu-latest)
- GitHub Check: Run snippets and cpython tests on wasm-wasi
- GitHub Check: Check the WASM package and demo
- GitHub Check: Run tests under miri
- GitHub Check: Check Rust code with rustfmt and clippy
- GitHub Check: Run rust tests (macos-latest)
- GitHub Check: Run rust tests (ubuntu-latest)
- GitHub Check: Run rust tests (windows-latest)
- GitHub Check: Ensure compilation on various targets
🔇 Additional comments (3)
vm/src/stdlib/posix.rs (3)
1311-1337
: Improved validation and error handling inenvp_from_dict
The refactoring enhances robustness by explicitly validating that dictionary items are 2-element tuples before processing. This provides clearer error messages and prevents potential runtime errors.
1485-1523
: Well-structured implementation of new spawn attributesThe implementation properly handles the new posix_spawn attributes with appropriate platform checks and error handling. The signal validation in
setsigmask
is particularly well done.
1501-1501
: [web_search]Does the Rust libc crate provide the POSIX_SPAWN_SETSID constant?
Summary by CodeRabbit
New Features
Bug Fixes
Tests