()
| 126 | #[cfg(feature = "system")] |
| 127 | #[test] |
| 128 | fn test_core_scheduling_cookie() { |
| 129 | if !linux_kernel_config_item_is_enabled("CONFIG_SCHED_CORE").unwrap_or(false) { |
| 130 | eprintln!( |
| 131 | "test_core_scheduling_cookie: Test skipped due to missing kernel feature: \ |
| 132 | CONFIG_SCHED_CORE." |
| 133 | ); |
| 134 | return; |
| 135 | } |
| 136 | |
| 137 | match core_scheduling_cookie(rustix::thread::gettid(), CoreSchedulingScope::Thread) { |
| 138 | Ok(cookie) => println!("core_scheduling_cookie = {:?}", cookie), |
| 139 | |
| 140 | Err(r) => { |
| 141 | let errno = r.raw_os_error(); |
| 142 | assert!(errno == libc::ENODEV || errno == libc::EINVAL); |
| 143 | eprintln!("test_core_scheduling_cookie: Test unsupported: {}", r); |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | // |
| 149 | // Helper functions. |
nothing calls this directly
no test coverage detected