Restore Windows native test compilation
The real Wintun check exposed three Windows-only test calls that predated the access argument to ControlSocket::bind. Pass Private for these isolated named pipes, matching the Unix fixtures. Run native subnet checks for edits to the underlying TUN implementation as well. Confirmed the first hosted Windows compilation failed on exactly these calls. The revised Windows checks run on the hosted runner. Production IPC behavior is unchanged.
This commit is contained in:
1 parent
27e29cf8a7
commit
2e83483f00
2 files changed
+6
-3
No files matched your search
@@ -9,6 +9,7 @@ on:
|
|||||||
- 'crates/tsunagi-core/src/overlay/provision/windows.rs'
|
- 'crates/tsunagi-core/src/overlay/provision/windows.rs'
|
||||||
- 'crates/tsunagi-core/src/overlay/provision/mod.rs'
|
- 'crates/tsunagi-core/src/overlay/provision/mod.rs'
|
||||||
- 'crates/tsunagi-core/src/overlay/provision/factory.rs'
|
- 'crates/tsunagi-core/src/overlay/provision/factory.rs'
|
||||||
|
- 'crates/tsunagi-core/src/overlay/tun.rs'
|
||||||
- 'crates/tsunagi-core/src/net.rs'
|
- 'crates/tsunagi-core/src/net.rs'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,9 @@ mod tests {
|
|||||||
});
|
});
|
||||||
|
|
||||||
assert!(!is_serving(&path).await, "nothing serves the pipe yet");
|
assert!(!is_serving(&path).await, "nothing serves the pipe yet");
|
||||||
let control = ControlSocket::bind(&path, source).await.unwrap();
|
let control = ControlSocket::bind(&path, source, ControlSocketAccess::Private)
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
assert!(is_serving(&path).await, "the agent serves it now");
|
assert!(is_serving(&path).await, "the agent serves it now");
|
||||||
|
|
||||||
let answer = exchange(&path, &Request::Status, EXCHANGE_TIMEOUT)
|
let answer = exchange(&path, &Request::Status, EXCHANGE_TIMEOUT)
|
||||||
@@ -439,10 +441,10 @@ mod tests {
|
|||||||
Box::pin(async { StatusReport::default() })
|
Box::pin(async { StatusReport::default() })
|
||||||
});
|
});
|
||||||
|
|
||||||
let first = ControlSocket::bind(&path, Arc::clone(&source))
|
let first = ControlSocket::bind(&path, Arc::clone(&source), ControlSocketAccess::Private)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let second = ControlSocket::bind(&path, source).await;
|
let second = ControlSocket::bind(&path, source, ControlSocketAccess::Private).await;
|
||||||
assert!(
|
assert!(
|
||||||
matches!(second, Err(Error::StateLocked { .. })),
|
matches!(second, Err(Error::StateLocked { .. })),
|
||||||
"{second:?}"
|
"{second:?}"
|
||||||
|
|||||||
Reference in new issue
Block a user