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

Make wpa-controller tests deterministic #308

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Conversation

abeltrano
Copy link
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

  • Eliminate the obnoxious requirement to run the wpa-controller-test-unit unit tests from the CMake binary directory root.
  • Fix the bug where all wpa-controller-test-unit tests would fail if the control socket directory doesn't exist.

Technical Details

  • Remove hostapd.conf.format.hxx.in configure file, relocating its contents to a detail namespace in WpaDaemonManager.cxx. This became possible since the control socket path is no longer directly written to the file at compile time, but at runtime using the previously compile-time initialized ProtocolWpa::ControlSocketPath* members.
  • Add helper function to obtain compile-time set control socket paths for hostapd and wpa_supplicant.
  • Add format string for default wpa_supplicant configuration file.
  • Add control socket path as argument for writing default WPA daemon configuration file.
  • Add HostapdBinaryInfo.hxx.in configure file which is populated with variables describing the hostapd binary directory and daemon executable.
  • Ensure the control socket directory exists before starting the WPA daemon (it's not created if it doesn't exist).

Test Results

  • All unit tests pass.
  • Ran the wpa-controll-test-unit tests from root of source tree (not binary tree) and verified it worked and all tests passed.

Reviewer Focus

  • None

Future Work

  • None

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano requested a review from a team as a code owner July 2, 2024 22:48
@abeltrano abeltrano merged commit 5b8a329 into develop Jul 2, 2024
5 checks passed
@abeltrano abeltrano deleted the fixwpacontrollertests branch July 2, 2024 23:31
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 this pull request may close these issues.

2 participants