diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-01-16 14:51:58 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-01-16 14:51:58 +0100 |
| commit | 6ef4fdb0ad184ef82f61ff8d0cb5dadfef76145e (patch) | |
| tree | 6f4a56974f82a464149743b377afa4c3b4ef8c69 /tests/util.rs | |
| parent | 4d91395f6fdad1792bf0b1610f2c978bc9d1d987 (diff) | |
| download | mullvadvpn-6ef4fdb0ad184ef82f61ff8d0cb5dadfef76145e.tar.xz mullvadvpn-6ef4fdb0ad184ef82f61ff8d0cb5dadfef76145e.zip | |
Delete tests relying on timing luck
Diffstat (limited to 'tests/util.rs')
| -rw-r--r-- | tests/util.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/util.rs b/tests/util.rs deleted file mode 100644 index 8fe87e5783..0000000000 --- a/tests/util.rs +++ /dev/null @@ -1,16 +0,0 @@ -use std::fs::File; -use std::io::Read; -use std::path::Path; - -pub fn read_file<P: AsRef<Path>>(path: P) -> String { - let mut string = String::new(); - let mut f = File::open(path).unwrap(); - f.read_to_string(&mut string).unwrap(); - string -} - -#[cfg(target_os = "linux")] -pub fn read_args_for_proc(pid: u32) -> Vec<String> { - let cmdline = read_file(format!("/proc/{}/cmdline", pid)); - cmdline.split_terminator('\0').map(String::from).collect() -} |
