Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Virv12 committed Nov 10, 2024
1 parent df65621 commit 283697e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo apt-get install -y libseccomp-dev
run: sudo apt-get install -y libseccomp-dev
- name: Build
run: cargo build --all-features --all-targets
- name: Run tests
run: cargo test --all-features --all-targets
- name: Run cargo clippy
run: rustup component add clippy && cargo clippy --all-features --all-targets
run: rustup component add clippy && cargo clippy --all-features --all-targets -- -D warnings
- name: Check formatting
run: rustup component add rustfmt && cargo fmt --all -- --check
2 changes: 1 addition & 1 deletion src/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn watcher(config: SandboxConfiguration) -> Result<SandboxExecutionResult> {
// Allocate some memory that the forked process can use to write the error. This memory is
// page-aligned, which is hopefully enough for ErrorMessage.
let shared = unsafe {
std::mem::transmute(libc::mmap(
std::mem::transmute::<*mut libc::c_void, *mut ErrorMessage>(libc::mmap(
std::ptr::null_mut(),
std::mem::size_of::<ErrorMessage>(),
libc::PROT_READ | libc::PROT_WRITE,
Expand Down
4 changes: 2 additions & 2 deletions src/tests/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int main() {

#[test]
// macOS has a much lower stack limit than Linux (~8Mb and a maximum of 64)
#[cfg(os = "linux")]
#[cfg(target_os = "linux")]
fn test_stack_limit_ok() {
let mut config = SandboxConfiguration::default();
config
Expand All @@ -72,7 +72,7 @@ fn test_stack_limit_ok() {

#[test]
// macOS has a much lower stack limit than Linux (~8Mb and a maximum of 64)
#[cfg(os = "linux")]
#[cfg(target_os = "linux")]
fn test_stack_limit_default() {
let mut config = SandboxConfiguration::default();
config.memory_limit(100 * 1_000_000);
Expand Down

0 comments on commit 283697e

Please sign in to comment.