Skip to content

[wpinet] Add mDNS discovery tests and fix mDNS JNI bugs#8682

Open
mcm001 wants to merge 26 commits intowpilibsuite:2027from
mcm001:2027-fix-multicast
Open

[wpinet] Add mDNS discovery tests and fix mDNS JNI bugs#8682
mcm001 wants to merge 26 commits intowpilibsuite:2027from
mcm001:2027-fix-multicast

Conversation

@mcm001
Copy link
Contributor

@mcm001 mcm001 commented Mar 16, 2026

In #8681 we discovered that multicast service types need to be valid (end with _tcp or _udp), or else errors are silently swallowed. Let's make our C++ unit test use a valid name and also check that it works. I think if we should/shouldn't do this is up for debate still.

I also discovered two bugs in the JNI code that lead to incorrect results being returned

  • Return array index was always 0
  • Use of JLocal for the return value seems to mean that the array will always be NULL in java

@github-actions github-actions bot added component: wpinet Networking library 2027 2027 target labels Mar 16, 2026
@mcm001 mcm001 marked this pull request as ready for review March 16, 2026 16:01
@mcm001 mcm001 requested a review from a team as a code owner March 16, 2026 16:01
@mcm001
Copy link
Contributor Author

mcm001 commented Mar 16, 2026

We can also retarget this at main if you'd prefer

Copy link
Member

@Gold856 Gold856 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lot of printfs. Should those be printlns?

@mcm001
Copy link
Contributor Author

mcm001 commented Mar 16, 2026

It looks like none of our runners include avahi-daemon, leading to these test failures? https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md

Would we prefer

  • Deleting these new tests
  • Installing avahi
  • secret option 3?

@mcm001
Copy link
Contributor Author

mcm001 commented Mar 17, 2026

I need some help understanding what to do about the tsan warnings in https://github.com/wpilibsuite/allwpilib/actions/runs/23174224436/job/67332769813?pr=8682 -- are these real/something we need to address?

windows ci failed because of a flake in DifferentialDrivetrainSimTest.Convergence, then another flake in TimedRobotTest.TestMode

@mcm001 mcm001 requested a review from a team as a code owner March 19, 2026 04:08
@github-actions github-actions bot added the component: ntcore NetworkTables library label Mar 19, 2026
@mcm001 mcm001 force-pushed the 2027-fix-multicast branch from 431daa7 to 13ba7d4 Compare March 19, 2026 04:10
@github-actions github-actions bot removed the component: ntcore NetworkTables library label Mar 19, 2026
@Gold856 Gold856 changed the title Add mdns discovery tests to Java and C++ [wpinet] Add mDNS discovery tests Mar 19, 2026
@mcm001
Copy link
Contributor Author

mcm001 commented Mar 20, 2026

Blocked on wpilibsuite/docker-images#71

@Gold856 Gold856 changed the title [wpinet] Add mDNS discovery tests [wpinet] Add mDNS discovery tests and fix mDNS JNI bugs Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2027 2027 target component: wpinet Networking library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants