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

l2cap test is a false pass #283

Closed
hicklin opened this issue Feb 13, 2025 · 1 comment · Fixed by #284
Closed

l2cap test is a false pass #283

hicklin opened this issue Feb 13, 2025 · 1 comment · Fixed by #284

Comments

@hicklin
Copy link
Contributor

hicklin commented Feb 13, 2025

Running the cargo test --test l2cap -- --nocapture test passes successfully. However, as can be noted from the following log, this pass is fake.

running 1 test
[peripheral] advertising
[central] connecting
Test completed successfully
test l2cap_connection_oriented_channels ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.02s

Only the initial prints from the peripheral and central threads are shown. On some investigation, it seems that the timeout match statement is returning Ok() before either of the central or peripheral threads had a chance to complete. This does not return an error and hence falls in the final arm of the match indicating the test has passed without it being run.

@lulf
Copy link
Member

lulf commented Feb 13, 2025

Nice catch! Luckily the test seems to be running with success in CI 😅 Not the prettiest fix.

@lulf lulf closed this as completed in #284 Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants