We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0a32ce commit dbc3859Copy full SHA for dbc3859
test/sys/test_prctl.rs
@@ -164,4 +164,21 @@ mod test_prctl {
164
.unwrap_or_default();
165
prctl::set_vma_anon_name(ptr, sz, None).unwrap_or_default();
166
}
167
+
168
+ #[test]
169
+ fn test_sched_core() {
170
+ use nix::errno::Errno;
171
+ use nix::unistd::Pid;
172
173
+ let c: u32 = 1234;
174
+ let p = Pid::from_raw(0);
175
+ let mut err = prctl::set_sched_core(c).unwrap_err();
176
+ assert!(err == Errno::EINVAL || err == Errno::ESRCH);
177
+ err = prctl::get_sched_core().unwrap_err();
178
179
+ err = prctl::share_sched_core_from(p).unwrap_err();
180
181
+ err = prctl::share_sched_core_to(p).unwrap_err();
182
183
+ }
184
0 commit comments