Skip to content

Commit b3a1b52

Browse files
committed
fixed FreeBSD CI and tests
1 parent 8cb823f commit b3a1b52

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ task:
1717
- cargo build
1818
- cargo build --no-default-features
1919
enable_tcp_fastopen:
20-
- sysctl net.inet.tcp.fastopen.client_enabled=1
21-
- sysctl net.inet.tcp.fastopen.server_enabled=1
20+
- sudo sysctl net.inet.tcp.fastopen.client_enable=1
21+
- sudo sysctl net.inet.tcp.fastopen.server_enable=1
2222
amd64_test_script:
2323
- . $HOME/.cargo/env
2424
- cargo test --all-features

tests/socket.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,8 +1302,12 @@ fn tcp_fastopen() {
13021302
socket.set_tcp_fastopen(5).unwrap();
13031303

13041304
#[cfg(any(target_os = "linux", target_os = "android"))]
1305-
let expected = 5;
1305+
{
1306+
assert_eq!(socket.tcp_fastopen().unwrap(), 5);
1307+
}
1308+
13061309
#[cfg(not(any(target_os = "linux", target_os = "android")))]
1307-
let expected = 1;
1308-
assert_eq!(socket.tcp_fastopen().unwrap(), expected);
1310+
{
1311+
assert_ne!(socket.tcp_fastopen().unwrap(), 0);
1312+
}
13091313
}

0 commit comments

Comments
 (0)