[PATCH v3 23/26] tests: add remote dir and run-tests.py

Janusz Dziedzic janusz.dziedzic at tieto.com
Sun Feb 21 04:58:52 PST 2016


On 20 February 2016 at 16:37, Jouni Malinen <j at w1.fi> wrote:
> On Wed, Feb 17, 2016 at 01:14:26PM +0100, Janusz Dziedzic wrote:
>> Adde remote dir and move development to this
>> directory.
>>
>> ./run-test.py print help with available DUTs and TESTs
>> ./run-test.py <DUT> all - will run all tests
>> ./run-test.py <DUT> tests_list - will run only specyfic test cases
>
> What is the purpose of adding a separate directory for these instead of
> using tests/hwsim? I've always assumed that it would be possible to
> eventually share many of the test cases in tests/hwsim/test_*.py for
> both local hwsim and remote cases.
>
That was my first idea to use same test cases for both hwsim and
remote implementation.
This could be possible in case test cases will use only devs, apdevs
params, but most of
them don't work such way:
- they are using a lot of global functionality that will work only
  with hwsim driver (hwsim_utils, subprocess, ).
- TP tests, WMM tests seems useless for hwsim driver
-  I also move wpa_suplicant/hostapd startup/termination to the test
cases, while
   we don't know what kind of hw requirement will be needed
- current devs params mean wpasupplicant is already run and ready to
handle ctrl event
- Also added some kind of reference device table (that we will know
works quite good)
  and DUTs - with hwsim params we don't split this
- WpaSupplicant/Hostapd constructors are called from test cases with
fixed params
   eg. global_iface='/tmp/wpas-wlan5'

I will check this once again to see if we can reuse hwsim test cases
in remote configuration.
Thanks for review.

BR
Janusz

>> diff --git a/tests/remote/run-tests.py b/tests/remote/run-tests.py
>> @@ -0,0 +1,160 @@
>> +#!/usr/bin/python
>> +#
>> +# This software may be distributed under the terms of the BSD license.
>> +# See README for more details.
>
> Please add a copyright statement in addition to the license terms into
> new files.
>
>> +devices = [{"hostname": "192.168.254.58", "ifname" : "wlan0", "port": "9877", "name" : "t2-ath9k", "flags" : "AP_HT40 STA_HT40"},
>> +           {"hostname": "192.168.254.58", "ifname" : "wlan1", "port": "9877", "name" : "t2-ath10k", "flags" : "AP_VHT80"},
>> +           {"hostname": "192.168.254.58", "ifname" : "wlan3", "port": "9877", "name" : "t2-intel7260", "flags" : "STA_VHT80"}]
>> +
>> +duts = [{"hostname": "192.168.254.50", "ifname" : "wlan0", "port": "9877", "name" : "t1-ath9k-dut"},
>> +        {"hostname": "192.168.254.50", "ifname" : "wlan1", "port": "9877", "name" : "t1-ath10k-dut"},
>> +        {"hostname": "192.168.254.58", "ifname" : "wlan1", "port": "8878", "name" : "t2-ath10k-dut"}]
>
> This type of configuration should be read from a configuration file so
> that there is no need to modify files that are checked into git to match
> the local network setup.
>
> --
> Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list