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 677ba5bCopy full SHA for 677ba5b
test/sys/test_prctl.rs
@@ -164,4 +164,23 @@ 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_eq!(err, Errno::ESRCH);
177
+ err = prctl::get_sched_core().unwrap_err();
178
179
+ err = prctl::share_sched_core_from(p)
180
+ .unwrap_err();
181
182
+ err = prctl::share_sched_core_to(p)
183
184
185
+ }
186
0 commit comments