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 | 1 | #[test] |
| 2 | 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 | 7 | fn umask() { |
| 5 | 8 | use std::fs::File; |
| 6 | 9 | use std::io::{BufRead, BufReader}; |