Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android API level <= 25 fails sendmsg ECN with InvalidInput #1975

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/rust-android-run-tests-on-emulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ while [[ -z "$(adb shell getprop sys.boot_completed | tr -d '\r')" ]]; do sleep
any_failures=0
for test in $(find target/$TARGET/debug/deps/ -type f -executable ! -name "*.so" -name "*-*"); do
adb push "$test" /data/local/tmp/
adb shell chmod +x /data/local/tmp/$(basename "$test")
adb shell /data/local/tmp/$(basename "$test") || any_failures=1
adb shell RUST_LOG=debug /data/local/tmp/$(basename "$test") --nocapture || any_failures=1
done

exit $any_failures
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ jobs:
emulator-arch: x86_64
# Note that x86_64 image is only available for API 21+. See
# https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#configurations.
api-level: 26
api-level: 25
- target: i686-linux-android
emulator-arch: x86
api-level: 26
api-level: 25

steps:
- name: Checkout code
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
run: cargo install cargo-ndk

- name: Build unit tests for Android
run: cargo ndk -t ${{ matrix.target }} test --no-run
run: cargo ndk -t ${{ matrix.target }} test -p quinn-udp --no-run

- name: Enable KVM group perms
run: |
Expand Down
1 change: 1 addition & 0 deletions quinn-udp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ windows-sys = { workspace = true }

[dev-dependencies]
criterion = "0.5"
tracing-subscriber = { workspace = true }

[target.'cfg(any(target_os = "linux", target_os = "windows"))'.bench]
name = "throughput"
Expand Down
3 changes: 3 additions & 0 deletions quinn-udp/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fn basic() {

#[test]
fn ecn_v6() {
let _ = tracing_subscriber::fmt::try_init();
let send = Socket::from(UdpSocket::bind("[::1]:0").unwrap());
let recv = Socket::from(UdpSocket::bind("[::1]:0").unwrap());
for codepoint in [EcnCodepoint::Ect0, EcnCodepoint::Ect1] {
Expand All @@ -53,6 +54,7 @@ fn ecn_v6() {
#[test]
#[cfg(not(any(target_os = "openbsd", target_os = "netbsd", target_os = "solaris")))]
fn ecn_v4() {
let _ = tracing_subscriber::fmt::try_init();
let send = Socket::from(UdpSocket::bind("127.0.0.1:0").unwrap());
let recv = Socket::from(UdpSocket::bind("127.0.0.1:0").unwrap());
for codepoint in [EcnCodepoint::Ect0, EcnCodepoint::Ect1] {
Expand All @@ -73,6 +75,7 @@ fn ecn_v4() {
#[test]
#[cfg(not(any(target_os = "openbsd", target_os = "netbsd", target_os = "solaris")))]
fn ecn_v6_dualstack() {
let _ = tracing_subscriber::fmt::try_init();
let recv = socket2::Socket::new(
socket2::Domain::IPV6,
socket2::Type::DGRAM,
Expand Down
Loading