Scope terminal process lint exemption
This commit is contained in:
parent
e97ab6471c
commit
252cb83e5e
2 changed files with 8 additions and 4 deletions
|
|
@ -425,18 +425,18 @@ fn hex(bytes: &[u8]) -> String {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::disallowed_methods, clippy::disallowed_types)]
|
||||
mod tests {
|
||||
use std::os::unix::process::ExitStatusExt as _;
|
||||
use std::process::Command;
|
||||
|
||||
use nix::sys::signal::{SigSet, SigmaskHow, Signal, kill};
|
||||
use nix::unistd::Pid;
|
||||
|
||||
use super::SignalQueue;
|
||||
|
||||
#[test]
|
||||
#[allow(clippy::disallowed_methods, clippy::disallowed_types)]
|
||||
fn signal_scope_restores_mask_and_default_termination() {
|
||||
use std::os::unix::process::ExitStatusExt as _;
|
||||
use std::process::Command;
|
||||
|
||||
if std::env::var_os("LAZARET_SIGNAL_SCOPE_CHILD").is_some() {
|
||||
let signals = SignalQueue::register().unwrap();
|
||||
drop(signals);
|
||||
|
|
|
|||
|
|
@ -147,6 +147,9 @@ REQUIRED_DISALLOWED_METHODS = {
|
|||
"std::process::Command::status",
|
||||
}
|
||||
PROCESS_LINT_ALLOWANCES = {
|
||||
"crates/lazaret-client/src/terminal.rs": {
|
||||
"signal_scope_restores_mask_and_default_termination"
|
||||
},
|
||||
"crates/lazaret-linux/src/process.rs": {
|
||||
"append_to",
|
||||
"send_signal",
|
||||
|
|
@ -175,6 +178,7 @@ PROCESS_LINT_ALLOWANCES = {
|
|||
"spawn_bootstrap",
|
||||
"captured_process",
|
||||
"match_recovery_process",
|
||||
"suspend_current_process",
|
||||
},
|
||||
"crates/lazaret-host-coordinator/tests/runtime-composition.rs": {"run_benchmark_guest"},
|
||||
"crates/lazaret-client/tests/state_cli.rs": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue