Rollup merge of #77918 - wcampbell0x2a:cleanup-network-tests, r=m-ou-se
Cleanup network tests Some cleanup for network related tests
This commit is contained in:
commit
b968738348
@ -73,10 +73,9 @@ pub fn got_symlink_permission(tmpdir: &TempDir) -> bool {
|
||||
let link = tmpdir.join("some_hopefully_unique_link_name");
|
||||
|
||||
match symlink_file(r"nonexisting_target", link) {
|
||||
Ok(_) => true,
|
||||
// ERROR_PRIVILEGE_NOT_HELD = 1314
|
||||
Err(ref err) if err.raw_os_error() == Some(1314) => false,
|
||||
Err(_) => true,
|
||||
Ok(_) | Err(_) => true,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,19 +152,13 @@ fn udp_clone_two_write() {
|
||||
let (done, rx) = channel();
|
||||
let tx2 = tx.clone();
|
||||
let _t = thread::spawn(move || {
|
||||
match sock3.send_to(&[1], &addr2) {
|
||||
Ok(..) => {
|
||||
let _ = tx2.send(());
|
||||
}
|
||||
Err(..) => {}
|
||||
if sock3.send_to(&[1], &addr2).is_ok() {
|
||||
let _ = tx2.send(());
|
||||
}
|
||||
done.send(()).unwrap();
|
||||
});
|
||||
match sock1.send_to(&[2], &addr2) {
|
||||
Ok(..) => {
|
||||
let _ = tx.send(());
|
||||
}
|
||||
Err(..) => {}
|
||||
if sock1.send_to(&[2], &addr2).is_ok() {
|
||||
let _ = tx.send(());
|
||||
}
|
||||
drop(tx);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user