Rather than only on non-Android Linux-based systems. Like most Linux-based systems, Android has `/proc`, so the test can get the umask expected value using its `/proc`-based approach that is independent of the approach used in the code under test.
Unified · Split
| @@ -1,6 +1,9 @@ | |||
| 1 | #[test] | 1 | #[test] |
| 2 | #[cfg(unix)] | 2 | #[cfg(unix)] |
| 3 | #[cfg_attr(not(target_os = "linux"), ignore = "The test itself uses /proc")] | 3 | #[cfg_attr( |
| 4 | not(any(target_os = "linux", target_os = "android")), | ||
| 5 | ignore = "The test itself uses /proc" | ||
| 6 | )] | ||
| 4 | fn umask() { | 7 | fn umask() { |
| 5 | use std::fs::File; | 8 | use std::fs::File; |
| 6 | use std::io::{BufRead, BufReader}; | 9 | use std::io::{BufRead, BufReader}; |