Commit Graph

51 Commits

Author SHA1 Message Date
Sarah Brofeldt
2e4d714334 nixos/tests/networking: Alleviate race in scripted test 2020-11-25 20:08:03 +01:00
Charlotte Van Petegem
8eca34dd16 nixos/tests/networking: fix macvlan tests
The range option still needs to be defined in dhcpd4 to be able to give out static IP addresses
2020-07-26 12:44:05 +02:00
Bas van Dijk
e15815e885 nixos/tests/networking.nix: test the services.dhcpd4.machines option
This modifies the `router` to not give out a range of IP addresses but
only give out a fixed address based on the MAC address using the
`services.dhcpd4.machines` option.

To get access to the MAC address the `qemuNicMac` function is defined
and exported from `qemu-flags.nix`.
2020-07-20 13:09:27 +02:00
Florian Klink
d1edd8b2f6 nixosTests.networking: test setting MTU and MAC Address
Both the scripted and networkd backend now support setting MTU and MAC
Address, so do this in a test to ensure it doesn't break.
2020-04-13 22:03:35 +02:00
Florian Klink
5150378c2f nixosTests.networking.virtual: fix with networkd
We only need to wait for network.target to get up, and the
network-addresses-${interfaceName} units are scripted networking only.
2020-04-13 22:03:35 +02:00
Florian Klink
1e1945319c nixosTests.networking: make routing table comparison more reliable
This was whitespace-sensitive, kept fighting with my editor and broke
the tests easily. To fix this, let python convert the output to
individual lines, and strip whitespace from them before comparing.
2020-04-13 22:03:35 +02:00
Florian Klink
355c58e485 nixos/networkd: respect systemd.network.links also with disabled systemd-networkd
This mirrors the behaviour of systemd - It's udev that parses `.link`
files, not `systemd-networkd`.

This was originally applied in 36ef112a477034fc6d1d9170bf1bcda0140a8d1d,
but was reverted due to 1115959a8d4d73ad73341563dc8bbf52230a281e causing
evaluation errors on hydra.
2020-03-19 14:15:32 +01:00
Vladimír Čunát
0729b8c55e
Revert Merge #82310: nixos/systemd: apply .link
...even when networkd is disabled

This reverts commit ce78f3ac701017008aa7f1db387b871b7ae65e01, reversing
changes made to dc34da0755b3c36469965659c0ee4a1337e81c05.

I'm sorry; Hydra has been unable to evaluate, always returning
> error: unexpected EOF reading a line
and I've been unable to reproduce the problem locally.  Bisecting
pointed to this merge, but I still can't see what exactly was wrong.
2020-03-13 22:05:33 +01:00
Florian Klink
36ef112a47 nixos/networkd: respect systemd.network.links also with disabled systemd-networkd
This mirrors the behaviour of systemd - It's udev that parses `.link`
files, not `systemd-networkd`.
2020-03-11 10:21:37 +01:00
Félix Baylac-Jacqué
1115959a8d tests/networking: remove pkgs.lib usages. 2020-03-11 10:21:37 +01:00
rnhmjoj
1d9538d77a
nixos/tests/networking: use new tempAddress option 2020-02-01 11:38:40 +01:00
Christian Kampka
98d562f0b3
nixosTests.networking: Port tests to python 2019-12-17 11:22:28 +01:00
Linus Heckemann
a3a441cd87 nixos/tests/{ferm,networking}: fix eval with networkd
The networking.virtual test does not work with networkd yet, for
multiple reasons:

- network-online.target is not reached, because tun0 and tap0 are
  considered as required for online but _not_ brought up or assigned
  the configured addresses
- the commands later in the test rely on some units from the scripted
  network setup

cc @fpletz networkd exper
cc @globin we looked at this together
2019-10-08 17:14:26 +02:00
Robin Gloster
c26c6241ea
networking.useDHCP: disallow for networkd
This setting will be removed with the switch to systemd-networkd. The
use of per interface config is encouraged instead.
2019-09-24 10:20:16 +02:00
Frederik Rietdijk
5061fe0c2c Merge staging-next into staging 2019-08-28 08:26:42 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Danylo Hlynskyi
7585496eff
Merge branch 'master' into flip-map-foreach 2019-08-05 14:09:28 +03:00
danbst
0f8596ab3f mass replace "flip map -> forEach"
See `forEach`-introduction commit.
```
rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /forEach /g'
```
2019-08-05 14:03:38 +03:00
danbst
91bb646e98 Revert "mass replace "flip map -> foreach""
This reverts commit 3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.
2019-08-05 14:01:45 +03:00
danbst
3b0534310c mass replace "flip map -> foreach"
See `foreach`-introduction commit.
```
rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /foreach /g'
```
2019-07-14 13:46:10 +03:00
rnhmjoj
1738283e6e nixos/network-interfaces: make preferTempAddr=false work again 2019-07-09 08:08:45 +02:00
Jörg Thalheim
b5c1deca8a
treewide: remove wkennington as maintainer
He prefers to contribute to his own nixpkgs fork triton.
Since he is still marked as maintainer in many packages
this leaves the wrong impression he still maintains those.
2019-01-26 10:05:32 +00:00
aszlig
12d7f9a640
nixos/tests/networking: Fix syntax error
Introduced by 6c68fbd4e1f8beac39cb1f499ff90c78256262d6.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog
2018-11-12 16:18:58 +01:00
Léo Gaspard
6c68fbd4e1
tests: refactor to carry the package set as an argument
This way, the package set will be possible to pass without re-importing
all the time
2018-11-11 23:11:45 +09:00
Robin Gloster
4c8a198f12 tests/docs: remove remnants of old allowPing default (#49198)
This has been defaulting to true since 16.03, we don't need this code
anymore, also the note in the documentation has been obsolete for quite
a while.
2018-10-30 22:26:43 +01:00
xeji
05659962cd
nixos/tests/networking.virtual: prevent non-deterministic failure (#46949)
The test failed non-deterministically on Hydra because interfaces
sometimes weren't yet fully cleaned up when the result was checked.
2018-09-20 13:20:12 +02:00
Uli Baum
13c3986b7a nixos/tests/networking.*.macvlan: disable reverse path check
Generated reverse path filtering rules for the macvlan interface
seem to be incorrect, causing the test to fail - sometimes or always,
depending on the dhcpcd version used.
- Disable reverse path checking temporarily to avoid blocking the channel
- Print more diagnostic information for debugging
2018-09-02 12:26:28 +02:00
Uli Baum
3f8756ce10 nixos/tests/networking: fix "virtual" tests
`ip route` now displays extended tun attributes, so the expected
output of this test changed.

Upstream change: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=118eda77d6602616bc523a17ee45171e879d1818
2018-08-26 14:24:07 +02:00
Uli Baum
f021702d21 nixos/tests/networking: fix routes tests
The output format of `ip route` changed, it now explicitly
shows "proto static" for static routes.
2018-08-26 14:15:15 +02:00
volth
2e979e8ceb [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
Michael Raskin
10b3f7d356
Merge pull request #27688 from rnhmjoj/routes
nixos/networking-interfaces: make static routes configurable
2018-02-19 14:12:58 +00:00
rnhmjoj
edc4a1f3e7
nixos/tests: fix random failures of privacy test 2018-02-17 18:07:04 +01:00
rnhmjoj
e239c1e582
nixos/tests: rename IP addresses/routes options 2018-02-17 14:57:07 +01:00
rnhmjoj
c1bed05e34
nixos/networking-interfaces: rename IP addresses/routes options 2018-02-17 14:01:24 +01:00
rnhmjoj
f41111c4da
nixos/tests: add test for static routes 2018-02-17 14:01:23 +01:00
rnhmjoj
4050c30da2
nixos/tests: add test for temporary IPv6 addresses 2018-02-01 16:29:36 +01:00
rnhmjoj
f1cacaf97c
nixos/tests: add test for virtual interfaces 2018-01-31 05:52:22 +01:00
Franz Pletz
b179908414
nixos/networking: network is online if default gw set
Previously services depending on network-online.target would wait until
dhcpcd times out if it was enabled and a static network address
configuration was used. Setting the default gateway statically is enough
for the networking to be considered online.

This also adjusts the relevant networking tests to wait for
network-online.target instead of just network.target.
2017-09-18 14:51:38 +02:00
Profpatsch
22c265182f networking/bonds: fix examples
After the change of the bonding options, the examples were not quite correct.
The diff is over-the top because the new `let` needs everything indented.

Also add a small docstring to the `networkd` attr in the networking test.
2017-03-08 04:54:17 +01:00
Jörg Thalheim
5b14e91717 Merge pull request #22822 from Mic92/iputils
iputils: 20151218 -> 20161105
2017-02-22 00:37:13 +01:00
Jörg Thalheim
fd78ff23f7
replace ping6 with ping
reason: after the upgrade of iputils from 20151218 to 20161105
functionality of ping6 and tracepath6 was merged into ping and tracepath.

Ping is now mostly a drop-in replacment for ping6, except that selecting a
specific interface is done by encoding it into the address (ex.: fe80::1%eth0)
rather then specifing it with the `-I` flag.
2017-02-17 16:04:49 +01:00
Profpatsch
9debdaf512 networking.bonds: add support for arbitrary driverOptions
Until now the four attributes available very selectively provided a small
subset, while copying upstream documentation.

We make driver options an arbitrary key-value set and point to kernel
documentation, which is always up-to-date. This way every option can be set.
The four already existing options are deprecated with a warning.
2017-02-16 21:24:40 +01:00
Nikolay Amiantov
86755d923b networking test: test IPv6 with RA and DHCPv6 2017-01-15 19:53:17 +03:00
Alexander Ried
60a9edbbeb tests.networking: remove network-interfaces.target 2016-09-13 11:19:23 +02:00
aszlig
2f2536b935
nixos/tests/networking: Expose subtests via attrs
So far the networking test expression only generated a single test
depending on the passed "test" attribute. This makes it difficult to
autodiscover the subtests with our shiny new callSubTests function.

This change essentially doesn't change the behaviour of the subtests but
rather exposes them as an attribute set instead of relying on a
particular input argument.

The useNetworkd argument still exists however.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @wkennington
2016-03-01 01:04:42 +01:00
aszlig
4c61faa009
nixos/tests/networking: Add a test for loopback
It serves as a regression test, because right now if you enable
networking.useNetworkd the default loopback interface doesn't get
assigned any IP addresses.

To be sure, I have bisected this and it has been introduced with the
update to systemd 228 in 1da87d4.

Only the "scripted" networking tests have to succeed in order to trigger
a channel update of nixos-unstable, so I'm leaving this test as broken
and we have to figure out next what's the *exact* reason for the
breakage.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-12-18 07:09:42 +01:00
Joachim Schiele
0731489953 all tests: added meta.maintainers section 2015-07-12 12:29:51 +02:00
William A. Kennington III
793cf28cd5 nixos/tests/networking: Clean up and attempt to make more reliable 2015-04-10 23:23:53 -07:00
William A. Kennington III
9a11132fe5 nixos/network: Remove debug output in tests 2014-11-30 01:21:37 -08:00
William A. Kennington III
7ecb084b77 nixos/networking: More fixes 2014-11-29 22:35:03 -08:00