Support for libremesh wifi simulation#212
Conversation
Add QEMU x86-64 target configuration for LibreMesh testing with virtualized WiFi (vwifi/mac80211_hwsim). This enables testing LibreMesh features in a simulated mesh network environment. Features: - hwsim and libremesh feature flags for test filtering - Dual network interface (WAN + LAN) setup - Uses QEMUNetworkStrategy for network management
Add new Makefile target 'x86-64-libremesh' for running LibreMesh tests in QEMU x86-64 with vwifi support for mesh simulation. Usage: make tests/x86-64-libremesh FIRMWARE=/path/to/libremesh.img.gz
Add upload_vwifi fixture and helper functions for testing LibreMesh in a virtualized WiFi mesh network using vwifi and mac80211_hwsim. New features: - _host_ipv4_from_hostname_I(): Robust IPv4 detection for vwifi-client - upload_vwifi fixture: Uploads vwifi-client to VM, configures mac80211_hwsim, connects to host's vwifi-server, and waits for mesh interface establishment Prerequisites: - vwifi-server running on the host - vwifi-client binary in vwifi/ directory
Add test_bat_links_info test for verifying LibreMesh shared-state-async
bat_links_info functionality in a virtualized mesh network.
The test verifies that:
- shared-state-async can publish and sync bat_links_info
- All expected mesh nodes are visible in the shared state
- Links between the test node and other nodes are recorded
Requires @pytest.mark.lg_feature('libremesh') for filtering.
Signed-off-by: Franco <franco.riba@mi.unc.edu.ar>
|
@aparcar which folder and which naming should we use for the tests that are LibreMesh-specific? Is it ok if we merge them here? In this pull request, the tests are being pushed to @VGDSpehar is going to take care of updating this code with another pull request, I think |
|
|
||
|
|
||
| @pytest.fixture | ||
| def upload_vwifi(shell_command, target): |
There was a problem hiding this comment.
Do you think we could make this more generic? We may want to upload more things for more tests in the future, not specifically vwifi related
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| def _join_stdout(stdout): |
There was a problem hiding this comment.
This looks like a generic function which could move to conftest?
| --lg-env $(TESTSDIR)/targets/qemu_x86-64.yaml \ | ||
| --firmware $(FIRMWARE:.gz=) | ||
|
|
||
| # LibreMesh x86-64 target with vwifi support for mesh simulation |
There was a problem hiding this comment.
Do you think we could drop this extra target and instead point it to a libremesh image with the extra "libremesh" tag?
Sending to upstream last VGDSpehar's contributions for libremesh done in https://github.com/VGDSpehar/openwrt-tests-libremesh/tree/libremesh-wifi-simulation