| Age | Commit message (Collapse) | Author | 
 | 
 | 
 | 
This was found during smoketesting as thoase started to repeadingly fail in the last weeks
  File "/usr/libexec/vyos/tests/smoke/cli/test_interfaces_wireless.py", line 534, in test_wireless_security_station_address
      self.assertTrue(process_named_running('hostapd'))
  AssertionError: None is not true
Digging into this revealed that this is NOT related to the smoketest coding but
to hostapd/systemd instead. With a configured WIFI interface and calling:
"sudo systemctl reload-or-restart hostapd@wlan1" multiple times in a short
period caused systemd to report:
"Jul 18 16:15:32 systemd[1]: hostapd@wlan1.service: Deactivated successfully."
According to the internal systemd logic used in our version this is explained by:
  /* If there's a stop job queued before we enter the DEAD state, we shouldn't act on Restart=, in order to not
   * undo what has already been enqueued. */
  if (unit_stop_pending(UNIT(s)))
          allow_restart = false;
  if (s->result == SERVICE_SUCCESS)
          s->result = f;
  if (s->result == SERVICE_SUCCESS) {
          unit_log_success(UNIT(s));
          end_state = SERVICE_DEAD;`
Where unit_log_success() generates the log message in question.
Improve the restart login in the wireless interface script and an upgrade to
hostapd solved the issue.
 | 
 | 
Authored-By: Alain Lamar <alain_lamar@yahoo.de>
 | 
 | 
Commit 9e22ab6b2a ("wireless: T6318: move country-code to a system wide
configuration") removed the per wifi interface setting for a country-code. This
commit adjust the smoketests to the new design.
 | 
 | 
 | 
 | 
Wireless devices are subject to regulations issued by authorities. For any
given AP or router, there will most likely be no case where one wireless NIC is
located in one country and another wireless NIC in the same device is located
in another country, resulting in different regulatory domains to apply to the
same box.
Currently, wireless regulatory domains in VyOS need to be configured per-NIC:
  set interfaces wireless wlan0 country-code us
This leads to several side-effects:
* When operating multiple WiFi NICs, they all can have different regulatory
  domains configured which might offend legislation.
* Some NICs need additional entries to /etc/modprobe.d/cfg80211.conf to apply
  regulatory domain settings, such as: "options cfg80211 ieee80211_regdom=US"
  This is true for the Compex WLE600VX. This setting cannot be done
  per-interface.
Migrate the first found wireless module country-code from the wireless
interface CLI to: "system wireless country-code"
 | 
 | 
 | 
 | 
Use vyos.xml_ref.default_value to query XML default values and take them into
account when validating properly applied defaults in individual smoketests
instead of using hardcoded values like 443 for https port.
 | 
 | 
Commit 6896aabb6 ("wireless: T5540: fix VHT capability settings for 802.11ac"
changed how the VHT channel-sidth is configured in hostapd - but smoketests
did not get adjusted.
 | 
 | 
Station MAC address-based authentication means:
* 'allow' accept all clients except the one on the deny list
* 'deny' accept only clients listed on the accept list
New CLI commands:
* set interfaces wireless wlan0 security station-address mode <accept|deny>
* set interfaces wireless wlan0 security station-address accept mac <mac>
* set interfaces wireless wlan0 security station-address deny mac <mac>
 | 
 | 
 | 
 | 
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process
* T5195: use read_file and write_file implementation from vyos.utils.file
Changed code automatically using:
find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} +
find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} +
* T5195: move chmod* helpers to vyos.utils.permission
* T5195: use colon_separated_to_dict from vyos.utils.dict
* T5195: move is_systemd_service_* to vyos.utils.process
* T5195: fix boot issues with missing imports
* T5195: move dict_search_* helpers to vyos.utils.dict
* T5195: move network helpers to vyos.utils.network
* T5195: move commit_* helpers to vyos.utils.commit
* T5195: move user I/O helpers to vyos.utils.io
 | 
 | 
 | 
 | 
Current state of vyos-1x smoketests have hardcoded features to test. The
feature support is inside the base class BasicInterfaceTest
class BasicInterfaceTest:
    class TestCase(VyOSUnitTestSHIM.TestCase):
        _test_dhcp = False
        _test_ip = False
        _test_mtu = False
        _test_vlan = False
        _test_qinq = False
        _test_ipv6 = False
        _test_ipv6_pd = False
        _test_ipv6_dhcpc6 = False
        _test_mirror = False
All derived classes need to enable the tests that are supported on this
interface type. Adding new feature to a given interface (like vif support in
T5237) require manually enabling those tests for the given interface.
It would make much more sense, if we can query the config backend for supported
interface options - or in other words - is there a CLI node available that
corresponds to set interfaces ethernet <name> vif - if that's the case,
_test_vlan = True.
 | 
 | 
 | 
 | 
Currently every smoketest does the setup and destruction of the configsession
on its own durin setUp(). This creates a lot of overhead and one configsession
should be re-used during execution of every smoketest script.
In addiion a test that failed will leaf the system in an unconsistent state.
For this reason before the test is executed we will save the running config
to /tmp and the will re-load the config after the test has passed, always
ensuring a clean environment for the next test.
 | 
 | 
It does not make sense (at all!) to re-initialize the entire class with every
call to setUp(). We neither change the enabled/disabled tastcases dynamically,
not do we adjust the testinterfaces during a run.
Remove the runtime overhead and place one-time init calls into setUpClass()
instead.
 | 
 | 
 | 
 | 
Commit ef629504d4 ("smoketest: mirror: drop testcase") dropped the smoketests
entirely as they have been programmed in a wrong way leading to outages on live
development systems which used dummy interfaces for management traffic.
 | 
 | 
This is for better readability during testruns
 | 
 | 
Commit 29e32d39 ("smoketest: T1466: add eapol tests") renamed interface
methods of class BasicInterfaceTest, those change was not reflected in
every derived class.
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
definition
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
vyos-smoketest-integration (T2832)
* 'master' of github.com:vyos/vyos-smoketest: (153 commits)
  pppoe-server: test some more values
  lcd: adjust to cli changes
  lcd: adapt test to new CLI design
  pppoe-server: initial smoketest with local and radius auth
  pppoe: validate dhcpv6 client will be started
  wireless: validate hostapd/wpa_supplicant is running
  pppoe: sync to new dhcpv6-pd cli
  anyconnect: T2812: add basic testing
  ethernet: check interface disable state
  router-advert: check 'infinity' option in script logic
  ssh: config file is now volatile (moved to /run)
  ipv6: link-local: test address assignment on interfaces
  router-advert: add initial test
  mdns-repeater: add basic test
  pseudo-ethernet: extend smoketests with VIFs
  l2tpv3: add initial interface test
  wireless: use library function for loading kernel modules
  ethernet: test "ip" subtree of interface for e.g. ARP settings
  pppoe: use assertEqual()
  service: bcast-relay: add initial tests
  ...
 |