Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
abeltrano committed Nov 22, 2023
1 parent 0b3d418 commit 182428e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/unit/linux/wpa-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

Some of the tests that exercise wpa daemon (hostapd, wpa_supplicant) functionality require a wlan device driver and a running instance of the daemon. To satisfy these requirements, the mac80211_hwsim driver is used to create a virtualized wlan device that the wpa daemon can then control. Helpers are provided for managing the virtualized wlan device(s) with [WifiVirtualDeviceManager](./detail/WifiVirtualDeviceManager.hxx) and for managing the wpa daemons with [WpaDaemonManager](./detail/WpaDaemonManager.hxx) and [WpaDaemonInstance](./detail/WpaDaemonInstance.hxx).

Presently, the tests use [event listeners](https://github.com/catchorg/Catch2/blob/devel/docs/event-listeners.md) from the [Catch2](https://github.com/catchorg/Catch2) unit test framework instead of traditional, class-based setup/teardown fixtures. The event listeners have access to test case information such as the test case name and their tags. The [WpaDaemonCatch2EventListener](./detail/WpaDaemonCatch2EventListener.hxx) was developed to detect when a test case requires either of the daemons, and automatically creates a wlan driver and starts the required daemon . Similarly, it handles removing the driver instances and stopping the daemons on test case completion.
Presently, the tests use [event listeners](https://github.com/catchorg/Catch2/blob/devel/docs/event-listeners.md) from the [Catch2](https://github.com/catchorg/Catch2) unit test framework instead of traditional, class-based setup/teardown fixtures. The event listeners have access to test case information such as the test case name and their tags. The [WpaDaemonCatch2EventListener](./detail/WpaDaemonCatch2EventListener.hxx) was developed to detect when a test case requires either of the daemons, and automatically creates a wlan driver and starts the required daemon. Similarly, it handles removing the driver instances and stopping the daemons on test case completion.

To trigger this behavior, the test case must include a tag that corresponds to the name of a [WpaType](../../../../linux/wpa-controller/include/Wpa/WpaCore.hxx) enumeration value (a case insensitive comparison is done). For example, if the hostapd daemon is needed for the test, then a tag corresponding to WpaType::Hosapd is needed in the test case definition, for example '**hostapd**' as shown below:
To trigger this behavior, the test case must include a tag that corresponds to the name of a [WpaType](../../../../linux/wpa-controller/include/Wpa/WpaCore.hxx) enumeration value (a case insensitive comparison is done). For example, if the hostapd daemon is needed for the test, then a tag corresponding to `WpaType::Hostapd` is needed in the test case definition, for example '**hostapd**' as shown below:

```C++
TEST_CASE("Send command: GetStatus()", "[wpa][hostapd][client][remote]")
Expand All @@ -17,9 +17,8 @@ Only the first `WpaType` will be used. Failure to add the appropriate tag will c
### Future Work
This method will be improved in the future, with some possible improvements including:
This method will be updated in the future, with some possible improvements including:
1. Allow multiple wpa daemon types.
2. Allow a more generic daemon specification (eg. `[wpaDaemon=hostapd]`)
3. Replacement of event-based fixtures to class-based fixtures.

0 comments on commit 182428e

Please sign in to comment.