Skip to content

Commit

Permalink
Remove sigsegv tests from code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
stouset committed Jul 23, 2020
1 parent b22748f commit 9b48313
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/boxed.rs
Expand Up @@ -700,12 +700,14 @@ mod tests {
#[cfg(test)]
mod tests_sigsegv {
use super::*;
use std::process;

#[cfg(not(tarpaulin))]
fn assert_sigsegv<F>(f: F)
where
F: FnOnce(),
{
use std::process;

unsafe {
let pid : libc::pid_t = libc::fork();
let mut stat : libc::c_int = 0;
Expand Down Expand Up @@ -733,6 +735,10 @@ mod tests_sigsegv {
}
}

#[cfg(tarpaulin)]
fn assert_sigsegv<F>(_f: F) where F: FnOnce() {
}

#[test]
fn it_kills_attempts_to_read_while_locked() {
assert_sigsegv(|| {
Expand Down

0 comments on commit 9b48313

Please sign in to comment.