nsfarm issueshttps://gitlab.nic.cz/turris/nsfarm/-/issues2022-12-26T15:11:25+01:00https://gitlab.nic.cz/turris/nsfarm/-/issues/3IPv6 support2022-12-26T15:11:25+01:00Karel KociIPv6 supportWe should test all these IPv6 configuration options:
* [ ] static IPv6 with delegated prefix
* [ ] DHCPv6 without delegated prefix
* [ ] DHCPv6 with delegated prefix
* [ ] 6to4
* [ ] 6in4
IPv4 support is base line and is expected to be ...We should test all these IPv6 configuration options:
* [ ] static IPv6 with delegated prefix
* [ ] DHCPv6 without delegated prefix
* [ ] DHCPv6 with delegated prefix
* [ ] 6to4
* [ ] 6in4
IPv4 support is base line and is expected to be done by just creating NAT layer to emulate some ISP network. In IPv4 network this is expected and normal.
On the other hand the question is how should we test IPv6 network. There is of course possibility that we use practically discouraged IPv6 NAT. This has few advantages such as that it is pretty much same solution as for IPv4 and also that there would probably be lover requirements on host computer (single IPv6 address would be enough, no need to have delegated range). The second option is clean but kind of problematic where PC is going to have delegated range and this is going to be used to delegate additional range to router as well as address of the router and WAN container.https://gitlab.nic.cz/turris/nsfarm/-/issues/2Wi-fi testing2022-06-06T14:27:21+02:00Karel KociWi-fi testingWe should as part of NSFarm test also Wi-Fi.
The advantage of Wi-Fi is that one card connected to testing PC can be used to connect to any board. Well it also introduces some problems such as that SSIDs used in tests should be randomize...We should as part of NSFarm test also Wi-Fi.
The advantage of Wi-Fi is that one card connected to testing PC can be used to connect to any board. Well it also introduces some problems such as that SSIDs used in tests should be randomized so that tests do not interfere.
The design around this should mean that we could arbiter Wi-Fi card in PC in tests and that means that cards won't be linked to exact test target. We can also run tests with all cards. This require of course additional code to manage Wi-Fi device sharing between multiple tests to ensure no collisions.https://gitlab.nic.cz/turris/nsfarm/-/issues/17Updater tests2022-06-06T14:26:21+02:00Karel KociUpdater testsWe should test various update paths, compatibility of all packages lists (and lists in general) and more. We have to investigate how to do proper rollbacks and more with updates.We should test various update paths, compatibility of all packages lists (and lists in general) and more. We have to investigate how to do proper rollbacks and more with updates.https://gitlab.nic.cz/turris/nsfarm/-/issues/19Netmetr testing2022-06-06T14:26:13+02:00Karel KociNetmetr testingWe should check that netmetr works as expected.
* [ ] do measurement with prepare uuid
* [ ] generate new uuid (and sync code)
* [ ] download resultsWe should check that netmetr works as expected.
* [ ] do measurement with prepare uuid
* [ ] generate new uuid (and sync code)
* [ ] download resultshttps://gitlab.nic.cz/turris/nsfarm/-/issues/30Threading issue in FDLogging - warning only2022-06-06T14:05:49+02:00Jan Miksikjan.miksik@nic.czThreading issue in FDLogging - warning onlyI have pretty often this warning in my tests (lately with throughput and DHCP tests).
The tests are running ok, but it seems `FDLogging.__del__()` is having some issue.
```python
tests/network/test_throughput.py::TestSwitching::test_TCP...I have pretty often this warning in my tests (lately with throughput and DHCP tests).
The tests are running ok, but it seems `FDLogging.__del__()` is having some issue.
```python
tests/network/test_throughput.py::TestSwitching::test_TCP
/home/jamiks/.virtualenvs/nsfarm/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function FDLogging.__del__ at 0x7fb67f363d30>
Traceback (most recent call last):
File "/home/jamiks/git/nsfarm/nsfarm/cli.py", line 309, in __del__
self.close()
File "/home/jamiks/git/nsfarm/nsfarm/cli.py", line 306, in close
fcntl.fcntl(self._fileno, fcntl.F_SETFL, self._orig_filestatus)
OSError: [Errno 9] Bad file descriptor
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/warnings.html
```https://gitlab.nic.cz/turris/nsfarm/-/issues/41tests/network/pppoe - fix board wan config reverting2022-06-06T14:00:53+02:00Jan Miksikjan.miksik@nic.cztests/network/pppoe - fix board wan config revertingCheck `tests/network/test_wan.py` for pppoe test where wan port is reconfigured using uci.
There are some issues with board_wan.
Maybe changing board_wan scope to class in network test may fix the problem.Check `tests/network/test_wan.py` for pppoe test where wan port is reconfigured using uci.
There are some issues with board_wan.
Maybe changing board_wan scope to class in network test may fix the problem.https://gitlab.nic.cz/turris/nsfarm/-/issues/42Add test case for Turris SFP2022-06-06T13:58:50+02:00Josef SchlehoferAdd test case for Turris SFPWe will start selling Turris SFP soon. We need to prepare and write a few tests for it.
Currently, I tested it with Turris OS 5.3.0 and it works. It does not work 6.0.
5.3.
```
[ 10.815637] sfp sfp: module Turris RTSFP-10G...We will start selling Turris SFP soon. We need to prepare and write a few tests for it.
Currently, I tested it with Turris OS 5.3.0 and it works. It does not work 6.0.
5.3.
```
[ 10.815637] sfp sfp: module Turris RTSFP-10G rev A sn 2106090032 dc 31-05-21
[ 10.825000] sfp sfp: unknown connector, encoding 64b66b, nominal bitrate 10.3Gbps +0% -0%
[ 10.833379] sfp sfp: 1000BaseSX- 1000BaseLX- 1000BaseCX- 1000BaseT- 100BaseTLX- 1000BaseFX- BaseBX10- BasePX-
[ 10.843495] sfp sfp: 10GBaseSR+ 10GBaseLR- 10GBaseLRM- 10GBaseER-
[ 10.849775] sfp sfp: Copper length: unsupported/unspecified
[ 10.855539] sfp sfp: Options: txdisable, txfault, los+
[ 10.860863] sfp sfp: Diagnostics: ddm, intcal, rxpwravg
```
6.0.
```
[ 11.323200] sfp sfp: module Turris RTSFP-10G rev A sn 2106090130 dc 210531
[ 16.850760] ath10k_pci 0000:02:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
[ 16.860034] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[ 16.869662] ath10k_pci 0000:02:00.0: firmware ver 10.2.4-1.0-00047 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
[ 16.920395] ath10k_pci 0000:02:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[ 18.060082] ath10k_pci 0000:02:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
[ 18.184918] usbcore: registered new interface driver option
[ 18.190555] usbserial: USB Serial support registered for GSM modem (1-port)
[ 18.199411] usbcore: registered new interface driver qcserial
[ 18.205222] usbserial: USB Serial support registered for Qualcomm USB modem
[ 18.221074] pci 0000:00:01.0: enabling device (0140 -> 0142)
[ 18.327314] ieee80211 phy1: Atheros AR9287 Rev:2 mem=0xf0b10000, irq=83
[ 18.334541] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 20.914528] mvneta f1034000.ethernet eth2: validation with support 00,00000000,00000000 failed: -22
[ 20.923657] sfp sfp: sfp_add_phy failed: -22
```https://gitlab.nic.cz/turris/nsfarm/-/issues/43Medkit cache on USB storage device2022-06-06T13:57:10+02:00Karel KociMedkit cache on USB storage deviceThe idea behind this is to fix these two issues:
* Uboot implementation of TFTP is slow and download of image takes a long time
* In some cases it is not possible to download image at all as we do not have access to network from uboot (...The idea behind this is to fix these two issues:
* Uboot implementation of TFTP is slow and download of image takes a long time
* In some cases it is not possible to download image at all as we do not have access to network from uboot (such as in case of SFP)
The design is to have one USB storage device connected to the board. It has to be formated to FAT32 (so we can read and write files to it from uboot). We can use files on it instead of medkit pushed from network. The idea is to download sha256sum file and use sum from there to see if we don't have it all prepared on cache storage (check that we have files `HASH.{image,dtb,initrd}`). We can use cache if they are there. When they are not available in cache then we have to either download those images to board over network and save them to cache or boot rescue and download images that way and try again. The second approach targets the second issue (the inability to download image from uboot over the network)https://gitlab.nic.cz/turris/nsfarm/-/issues/47reForis tests randomly fail due to stale element or None2022-06-06T13:56:47+02:00Karel KocireForis tests randomly fail due to stale element or NoneThere are random failures when buttons are not located or are located and lost probably due to page reload.There are random failures when buttons are not located or are located and lost probably due to page reload.https://gitlab.nic.cz/turris/nsfarm/-/issues/35Basic firewall testing2022-03-15T14:38:49+01:00Karel KociBasic firewall testingWe should test firewall.
* [ ] Zone separation and forwarding
* [ ] Port forwarding
* [ ] Block and accept network rule
* [ ] MasquaradeWe should test firewall.
* [ ] Zone separation and forwarding
* [ ] Port forwarding
* [ ] Block and accept network rule
* [ ] Masquaradehttps://gitlab.nic.cz/turris/nsfarm/-/issues/6Setup utilities for all fixtures to use2022-02-15T18:14:07+01:00Karel KociSetup utilities for all fixtures to useMost of the work done in fixtures is some sort of configuration done. Every fixture have to later revert its changes (otherwise it taints environment). To make it clean as much as possible we should simplify common configuration tasks. T...Most of the work done in fixtures is some sort of configuration done. Every fixture have to later revert its changes (otherwise it taints environment). To make it clean as much as possible we should simplify common configuration tasks. The idea is to have objects with ability to track changes and reverting them on context leave. Imagine for example following code:
```python
with nsfarm.setup.Setup() as setup:
setup.preserve("/etc/passwd")
board_serial.run('echo root:"{}" | chpasswd'.format(password))
yield
```
This is going to set root password but preserves content of `/etc/passwd` so when fixture is teared down it restores original content (note that this is not a good idea but rather just an example).
We should have basic general setups handling following areas
* [x] Preserve files content (for arbitrary file)
* [x] Preserve path existence/non-existence (for directories)
* [ ] UCI
More specific setups:
* [x] root password setup
* [ ] local time setup
* [x] various uplink setups
* [x] static IP
* [x] DHCP
* [x] PPPOE
* [x] updater setup (target branch/version/build)https://gitlab.nic.cz/turris/nsfarm/-/issues/50Issue in DHCP tests, that not all IP addresses are assigned2022-01-27T19:56:45+01:00Jan Miksikjan.miksik@nic.czIssue in DHCP tests, that not all IP addresses are assignedIn `tests/network/test_dhcp.py::TestIPv4Addresses::test_dhcp_static_leases` is failing. But when stopped all IP addresses are assigned (or at least last time I checked).
- there may be something like `wait4network` added for each client,...In `tests/network/test_dhcp.py::TestIPv4Addresses::test_dhcp_static_leases` is failing. But when stopped all IP addresses are assigned (or at least last time I checked).
- there may be something like `wait4network` added for each client, after udhcpc restart.
There are also problems with asserts before the final assert (the messages are wrong) and that they sometimes fail.https://gitlab.nic.cz/turris/nsfarm/-/issues/46Black checker complains about invalid usage of None2022-01-18T10:01:02+01:00Karel KociBlack checker complains about invalid usage of None```
nsfarm/lxd/container.py:143: error: Item "None" of "Optional[NetworkInterface]" has no attribute "addresses"
nsfarm/lxd/container.py:144: error: Item "None" of "Optional[NetworkInterface]" has no attribute "interfaces"
nsfarm/web/con...```
nsfarm/lxd/container.py:143: error: Item "None" of "Optional[NetworkInterface]" has no attribute "addresses"
nsfarm/lxd/container.py:144: error: Item "None" of "Optional[NetworkInterface]" has no attribute "interfaces"
nsfarm/web/container.py:62: error: Item "None" of "Optional[NetworkInterface]" has no attribute "proxy"
```https://gitlab.nic.cz/turris/nsfarm/-/issues/33Test OpenVPN server2022-01-12T11:42:42+01:00Karel KociTest OpenVPN serverTurris provides an OpenVPN server setup. There are few parts to it. We have:
* certificate generation using `turris-cagen`
* server configuration in `/etc/config/openvpn`
The server configuration should match what is possible to be set ...Turris provides an OpenVPN server setup. There are few parts to it. We have:
* certificate generation using `turris-cagen`
* server configuration in `/etc/config/openvpn`
The server configuration should match what is possible to be set from reForis.
We should connect with openvpn client from WAN side to test it.https://gitlab.nic.cz/turris/nsfarm/-/issues/49Test OpenVPN client2022-01-12T11:42:42+01:00Karel KociTest OpenVPN clientThe Turris can be a client on OpenVPN client. We should check that we can connect to OpenVPNs:
* [ ] Turris generated ones (ties to #33)
* [ ] Random from the Internet (so users can use public VPN providers)
The tests should emulate de...The Turris can be a client on OpenVPN client. We should check that we can connect to OpenVPNs:
* [ ] Turris generated ones (ties to #33)
* [ ] Random from the Internet (so users can use public VPN providers)
The tests should emulate deployments:
* [ ] As a site to site VPN connection where we use VPN only to access resources on it
* [ ] As a tunnel for the Internet access (here we should ensure that the tunnel is used not the standard connection for the Internet access)https://gitlab.nic.cz/turris/nsfarm/-/issues/44Multiple (V)LAN networks DHCP test2022-01-04T15:17:02+01:00Jan Miksikjan.miksik@nic.czMultiple (V)LAN networks DHCP testThere is issue when there are multiple VLANs on router (3 and more) and DHCP server does not assign addresses (JH has the issue).
Generate test with:
- multiple VLANs
- multiple LAN networks
- client or clients to obtain addresses from ...There is issue when there are multiple VLANs on router (3 and more) and DHCP server does not assign addresses (JH has the issue).
Generate test with:
- multiple VLANs
- multiple LAN networks
- client or clients to obtain addresses from different subnets
Possible failure:
- VLAN setting
- DHCP is not somehow working on multiple networks
- DHCP is overwhelmed by amount of clients/traffichttps://gitlab.nic.cz/turris/nsfarm/-/issues/14DNS uplink tests2021-12-16T17:17:54+01:00Karel KociDNS uplink testsVarious tests of DNS settings
* [ ] using ISP DNS
* [ ] using CZ.NIC
* [ ] using Cloudflare
* [ ] not forwarding
With various broken ISPs:
* [ ] broken DNSSECVarious tests of DNS settings
* [ ] using ISP DNS
* [ ] using CZ.NIC
* [ ] using Cloudflare
* [ ] not forwarding
With various broken ISPs:
* [ ] broken DNSSEChttps://gitlab.nic.cz/turris/nsfarm/-/issues/40Fixture client_board should rather return function that opens connections ove...2021-10-21T15:16:46+02:00Karel KociFixture client_board should rather return function that opens connections over single connectionThe current test inherits shell instance from `client_board` that can be tainted by any previous one. There is no reason why we could not open a unique connection (shell instance) for every test.
The implementation has to take into cons...The current test inherits shell instance from `client_board` that can be tainted by any previous one. There is no reason why we could not open a unique connection (shell instance) for every test.
The implementation has to take into consideration that we always have to enter password. The option is either to use ssh agent or master ssh instance.https://gitlab.nic.cz/turris/nsfarm/-/issues/38update readme and docs2021-10-13T19:15:12+02:00Jan Miksikjan.miksik@nic.czupdate readme and docsUpdate:
Readme
Test guide (containing things I would like to know when I started to write tests in nsfarm)Update:
Readme
Test guide (containing things I would like to know when I started to write tests in nsfarm)https://gitlab.nic.cz/turris/nsfarm/-/issues/39Test ASM10622021-10-05T09:51:15+02:00Karel KociTest ASM1062We should test access to drives connected through ASM1062. This is the card we send out as part of NAS perk for Turris Omnia and thus is pretty widely used by users and broken few times in the past.
* [ ] Test device discovery
* [ ] Hig...We should test access to drives connected through ASM1062. This is the card we send out as part of NAS perk for Turris Omnia and thus is pretty widely used by users and broken few times in the past.
* [ ] Test device discovery
* [ ] Hight load test (in the past the card had issues with stability under hight load so we should simulate some higher load to check if it works as expected)
* [ ] Check if module is required (probably separate boot of kernel and thin initramfs with just busybox and its dependencies) for turris/os/packages#798