• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #[cfg(any(target_os = "android", target_os = "linux"))]
2 #[test]
test_cpu_set()3 fn test_cpu_set() {
4     let set = rustix::process::sched_getaffinity(None).unwrap();
5 
6     let mut count = 0;
7     for i in 0..rustix::process::CpuSet::MAX_CPU {
8         if set.is_set(i) {
9             count += 1;
10         }
11     }
12 
13     assert_eq!(count, set.count());
14 }
15