quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

CI: FreeBSD run emits errors but does not mark Action as `failed` #1556

Closed Tirka closed 1 year ago

Tirka commented 1 year ago

Here is the possible explanation:

Running build, test, fuzz and checking process exit codes ``` ➜ quinn git:(main) ✗ cargo build Compiling quinn-udp v0.4.0 (/usr/home/maksimv/quinn/quinn-udp) error[E0425]: cannot find value `SYS_sendmmsg` in crate `libc` --> quinn-udp/src/unix.rs:325:35 | 325 | let ret = libc::syscall(libc::SYS_sendmmsg, sockfd, msgvec, vlen, flags) as libc::c_int; | ^^^^^^^^^^^^ help: a function with a similar name exists: `sendmmsg` | ::: /home/maksimv/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.142/src/unix/bsd/freebsdlike/freebsd/mod.rs:5162:5 | 5162 | / pub fn sendmmsg( ➜ quinn git:(main) ✗ cargo build Compiling quinn-udp v0.4.0 (/usr/home/maksimv/quinn/quinn-udp) error[E0425]: cannot find value `SYS_sendmmsg` in crate `libc` --> quinn-udp/src/unix.rs:325:35 | 325 | let ret = libc::syscall(libc::SYS_sendmmsg, sockfd, msgvec, vlen, flags) as libc::c_int; | ^^^^^^^^^^^^ help: a function with a similar name exists: `sendmmsg` | ::: /home/maksimv/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.142/src/unix/bsd/freebsdlike/freebsd/mod.rs:5162:5 | 5162 | / pub fn sendmmsg( 5163 | | sockfd: ::c_int, 5164 | | msgvec: *mut ::mmsghdr, ➜ quinn git:(main) ✗ cargo build --all-targets Compiling quinn-udp v0.4.0 (/usr/home/maksimv/quinn/quinn-udp) error[E0425]: cannot find value `SYS_sendmmsg` in crate `libc` --> quinn-udp/src/unix.rs:325:35 | 325 | let ret = libc::syscall(libc::SYS_sendmmsg, sockfd, msgvec, vlen, flags) as libc::c_int; | ^^^^^^^^^^^^ help: a function with a similar name exists: `sendmmsg` | ::: /home/maksimv/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.142/src/unix/bsd/freebsdlike/freebsd/mod.rs:5162:5 | 5162 | / pub fn sendmmsg( 5163 | | sockfd: ::c_int, 5164 | | msgvec: *mut ::mmsghdr, 5165 | | vlen: ::size_t, 5166 | | flags: ::c_int, 5167 | | ) -> ::ssize_t; | |__________________- similarly named function `sendmmsg` defined here error[E0425]: cannot find value `SYS_recvmmsg` in crate `libc` --> quinn-udp/src/unix.rs:438:29 | 438 | libc::syscall(libc::SYS_recvmmsg, sockfd, msgvec, vlen, flags, timeout) as libc::c_int; | ^^^^^^^^^^^^ help: a function with a similar name exists: `recvmmsg` | ::: /home/maksimv/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.142/src/unix/bsd/freebsdlike/freebsd/mod.rs:5168:5 | 5168 | / pub fn recvmmsg( 5169 | | sockfd: ::c_int, 5170 | | msgvec: *mut ::mmsghdr, 5171 | | vlen: ::size_t, 5172 | | flags: ::c_int, 5173 | | timeout: *const ::timespec, 5174 | | ) -> ::ssize_t; | |__________________- similarly named function `recvmmsg` defined here error[E0308]: mismatched types --> quinn-udp/src/unix.rs:358:29 | 358 | (*msgvec).msg_len = n as libc::c_uint; | ----------------- ^^^^^^^^^^^^^^^^^ expected `isize`, found `u32` | | | expected due to the type of this binding error[E0308]: mismatched types --> quinn-udp/src/unix.rs:471:29 | 471 | (*msgvec).msg_len = n as libc::c_uint; | ----------------- ^^^^^^^^^^^^^^^^^ expected `isize`, found `u32` | | | expected due to the type of this binding Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. error: could not compile `quinn-udp` due to 4 previous errors warning: build failed, waiting for other jobs to finish... error: could not compile `quinn-udp` due to 4 previous errors ➜ quinn git:(main) ✗ echo $? 101 ➜ quinn git:(main) ✗ cargo test Compiling quinn-udp v0.4.0 (/usr/home/maksimv/quinn/quinn-udp) error[E0425]: cannot find value `SYS_sendmmsg` in crate `libc` --> quinn-udp/src/unix.rs:325:35 | 325 | let ret = libc::syscall(libc::SYS_sendmmsg, sockfd, msgvec, vlen, flags) as libc::c_int; | ^^^^^^^^^^^^ help: a function with a similar name exists: `sendmmsg` | ::: /home/maksimv/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.142/src/unix/bsd/freebsdlike/freebsd/mod.rs:5162:5 | 5162 | / pub fn sendmmsg( 5163 | | sockfd: ::c_int, 5164 | | msgvec: *mut ::mmsghdr, 5165 | | vlen: ::size_t, 5166 | | flags: ::c_int, 5167 | | ) -> ::ssize_t; | |__________________- similarly named function `sendmmsg` defined here error[E0425]: cannot find value `SYS_recvmmsg` in crate `libc` --> quinn-udp/src/unix.rs:438:29 | 438 | libc::syscall(libc::SYS_recvmmsg, sockfd, msgvec, vlen, flags, timeout) as libc::c_int; | ^^^^^^^^^^^^ help: a function with a similar name exists: `recvmmsg` | ::: /home/maksimv/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.142/src/unix/bsd/freebsdlike/freebsd/mod.rs:5168:5 | 5168 | / pub fn recvmmsg( 5169 | | sockfd: ::c_int, 5170 | | msgvec: *mut ::mmsghdr, 5171 | | vlen: ::size_t, 5172 | | flags: ::c_int, 5173 | | timeout: *const ::timespec, 5174 | | ) -> ::ssize_t; | |__________________- similarly named function `recvmmsg` defined here error[E0308]: mismatched types --> quinn-udp/src/unix.rs:358:29 | 358 | (*msgvec).msg_len = n as libc::c_uint; | ----------------- ^^^^^^^^^^^^^^^^^ expected `isize`, found `u32` | | | expected due to the type of this binding error[E0308]: mismatched types --> quinn-udp/src/unix.rs:471:29 | 471 | (*msgvec).msg_len = n as libc::c_uint; | ----------------- ^^^^^^^^^^^^^^^^^ expected `isize`, found `u32` | | | expected due to the type of this binding Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. error: could not compile `quinn-udp` due to 4 previous errors warning: build failed, waiting for other jobs to finish... error: could not compile `quinn-udp` due to 4 previous errors ➜ quinn git:(main) ✗ echo $? 101 ➜ quinn git:(main) ✗ cargo test --manifest-path fuzz/Cargo.toml Finished test [unoptimized + debuginfo] target(s) in 0.04s ➜ quinn git:(main) ✗ echo $? 0 ```

Looks like cargo test --manifest-path fuzz/Cargo.toml process always returns exit code 0 and CI just ignores errors at previous steps

Tirka commented 1 year ago

Fixed: #1557

djc commented 1 year ago

Thanks for fixing this!