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 ff34a69 commit 55986aeCopy full SHA for 55986ae
tests/socket.rs
@@ -1827,3 +1827,16 @@ fn set_priority() {
1827
assert!(socket.priority().unwrap() == i);
1828
}
1829
1830
+
1831
+#[cfg(all(feature = "all", target_os = "linux"))]
1832
+#[test]
1833
+fn set_busy_poll() {
1834
+ let socket = Socket::new(Domain::UNIX, Type::DGRAM, None).unwrap();
1835
+ assert!(socket.busy_poll().unwrap() == 0);
1836
1837
+ // test busy poll values 0 .. 6; values above 6 require additional priviledges
1838
+ for i in (0..=6).rev() {
1839
+ socket.set_busy_poll(i).unwrap();
1840
+ assert!(socket.busy_poll().unwrap() == i);
1841
+ }
1842
+}
0 commit comments