Skip to content

Commit 3aeae32

Browse files
committed
test: clean up useless code
This code: - did not work, since it does not check /proc but relative "proc" - would only works on linux, but the test is run on windows as well. So just remove this code, it is likely not needed at all.
1 parent d71058e commit 3aeae32

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

boreal/tests/it/process.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use std::io::{BufRead, BufReader};
2-
#[cfg(any(target_os = "linux", windows))]
3-
use std::path::Path;
42

53
#[cfg(any(target_os = "linux", windows))]
64
use crate::utils::Checker;
@@ -32,13 +30,7 @@ rule a {
3230
#[test]
3331
#[cfg(any(target_os = "linux", windows))]
3432
fn test_process_not_found() {
35-
// First, find an unused PID. Lets take a very big number, and have
36-
// some retry code until we find a proper one.
37-
38-
let mut pid = 999_999_999;
39-
while Path::new("proc").join(pid.to_string()).exists() {
40-
pid += 1;
41-
}
33+
let pid = 999_999_999;
4234

4335
let mut checker = Checker::new(r#" rule a { condition: true }"#);
4436
checker.assert_success = false;

0 commit comments

Comments
 (0)