Rollup merge of #58551 - ssomers:master, r=oli-obk
Explain a panic in test case net::tcp::tests::double_bind Those who try to build libstd on the Windows Subsystem for Linux experience a single failing test, where the point of failure is an explicit but anonymous panic, as reported in https://github.com/rust-lang/rust/issues/49367 This commit somewhat explains why and allows diagnosing a little.
This commit is contained in:
commit
ef0aaddf69
1 changed files with 6 additions and 2 deletions
|
@ -1187,9 +1187,13 @@ mod tests {
|
|||
#[test]
|
||||
fn double_bind() {
|
||||
each_ip(&mut |addr| {
|
||||
let _listener = t!(TcpListener::bind(&addr));
|
||||
let listener1 = t!(TcpListener::bind(&addr));
|
||||
match TcpListener::bind(&addr) {
|
||||
Ok(..) => panic!(),
|
||||
Ok(listener2) => panic!(
|
||||
"This system (perhaps due to options set by TcpListener::bind) \
|
||||
permits double binding: {:?} and {:?}",
|
||||
listener1, listener2
|
||||
),
|
||||
Err(e) => {
|
||||
assert!(e.kind() == ErrorKind::ConnectionRefused ||
|
||||
e.kind() == ErrorKind::Other ||
|
||||
|
|
Loading…
Reference in a new issue