summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test-network: Remove/replace non-capturing group regexDan Streetman2019-11-011-32/+32
| | | | | | | | | | | | | | | | | | | The systemd-networkd-tests.py has some regex that uses non-capturing groups, but there is no need to use that with assertRegex; the groups aren't referenced so it doesn't matter if it's capturing or non-capturing. However, there are a few places where optional groups should have been used instead, so this changes that. Specifically, groups like this: (?:whatever |) should actually be: (whatever )? Additionally, this is specifically needed for these tests to run on Debian systems, because this assertRegex: 'Link File: (?:/usr)/lib/systemd/network/99-default.link' needs to be: 'Link File: (/usr)?/lib/systemd/network/99-default.link'
* test: check /usr/lib and /lib for systemd binariesDan Streetman2019-11-011-6/+10
| | | | Fedora uses /usr/lib while Debian uses /lib; find the right location
* test/test-network/systemd-networkd-tests.py: suppress stderr for ↵Dan Streetman2019-11-011-6/+6
| | | | functionality checks
* qdisc: netem add support to duplicate packets.Susant Sahani2019-10-311-0/+1
| | | | | using this option the chosen percent of packets is duplicated before queuing them
* networkd: dhcp server Support Vendor specific 43Susant Sahani2019-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementes https://tools.ietf.org/html/rfc2132 ``` [DHCPServer] SendRawOption=26:uint32:1400 SendRawOption=23:uint8:10 ``` Frame 448: 350 bytes on wire (2800 bits), 350 bytes captured (2800 bits) on interface 0 Linux cooked capture Internet Protocol Version 4, Src: 192.168.5.1, Dst: 192.168.5.11 User Datagram Protocol, Src Port: 67, Dst Port: 68 Dynamic Host Configuration Protocol (ACK) Message type: Boot Reply (2) Hardware type: Ethernet (0x01) Hardware address length: 6 Hops: 0 Transaction ID: 0x71f8de9d Seconds elapsed: 0 Bootp flags: 0x0000 (Unicast) Client IP address: 0.0.0.0 Your (client) IP address: 192.168.5.11 Next server IP address: 0.0.0.0 Relay agent IP address: 0.0.0.0 Client MAC address: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4) Client hardware address padding: 00000000000000000000 Server host name not given Boot file name not given Magic cookie: DHCP Option: (53) DHCP Message Type (ACK) Length: 1 DHCP: ACK (5) Option: (51) IP Address Lease Time Length: 4 IP Address Lease Time: (3600s) 1 hour Option: (1) Subnet Mask (255.255.255.0) Length: 4 Subnet Mask: 255.255.255.0 Option: (3) Router Length: 4 Router: 192.168.5.1 Option: (6) Domain Name Server Length: 4 Domain Name Server: 192.168.5.1 Option: (42) Network Time Protocol Servers Length: 4 Network Time Protocol Server: 192.168.5.1 Option: (101) TCode Length: 13 TZ TCode: Europe/Berlin Option: (43) Vendor-Specific Information Length: 9 Value: 1701311a0431343030 Option: (54) DHCP Server Identifier (192.168.5.1) Length: 4 DHCP Server Identifier: 192.168.5.1 Option: (255) End Option End: 255 ```
* network: rename SendOptions= to SendOption=Zbigniew Jędrzejewski-Szmek2019-10-301-1/+1
| | | | | | | | | The name with plural made more sense where multiple options could be specified in one line. After changes in the pull request, this option only accepts one value, so from users' POV it should be singular. (The field in the data structure remains plural, because it actually stores multiple values.)
* test-network: add tests for qdiscYu Watanabe2019-10-302-3/+35
|
* network: introduce TrafficControlSusant Sahani2019-10-301-0/+6
| | | | Add network delay to a interface
* Merge pull request #13423 from pwithnall/12035-session-time-limitsZbigniew Jędrzejewski-Szmek2019-10-282-0/+12
|\ | | | | Add `RuntimeMaxSec=` support to scope units (time-limited login sessions)
| * scope: Support RuntimeMaxSec= directive in scope unitsPhilip Withnall2019-10-282-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Just as `RuntimeMaxSec=` is supported for service units, add support for it to scope units. This will gracefully kill a scope after the timeout expires from the moment the scope enters the running state. This could be used for time-limited login sessions, for example. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #12035
* | network: support matching based on wifi interfece typeYu Watanabe2019-10-251-0/+1
| |
* | Merge pull request #13452 from yuwata/network-reloadZbigniew Jędrzejewski-Szmek2019-10-241-0/+53
|\ \ | | | | | | network: add networkctl reload and reconfigure
| * | network: add tests for "networkctl reconfigure"Yu Watanabe2019-10-241-0/+27
| | |
| * | test-network: add tests for "networkctl reload"Yu Watanabe2019-10-241-0/+26
| | |
* | | test: drop duplicated 's'Yu Watanabe2019-10-241-1/+1
|/ / | | | | | | | | | | | | | | This fixes the following log message ``` Container TEST-07-ISSUE-1981 terminated by signal KILL. E: test timed out after 30s s ```
* | Merge pull request #13142 from yuwata/network-wifi-ssid-support-nl80211Zbigniew Jędrzejewski-Szmek2019-10-231-0/+2
|\ \ | | | | | | network: wifi ssid support with nl80211
| * | network: add support matching based on BSSID=Yu Watanabe2019-10-151-0/+1
| | |
| * | network: support matching based on wifi SSIDYu Watanabe2019-10-151-0/+1
| | |
* | | test: correct TEST-41 StartLimitBurst testDan Streetman2019-10-182-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TEST-41 verifies that the StartLimitBurst property will correctly limit the number of unit restarts, but the test currently doesn't adjust the StartLimitIntervalSec which defaults to 10 seconds. On Ubuntu CI, running under un-accelerated qemu, it can take more than 10 seconds to perform all 3 restarts, which avoids the burst limit, and fails the test. Instead, specify a long StartLimitIntervalSec in the test, so we can be sure to correctly test StartLimitBurst even on slow testbeds. Fixes #13794.
* | | add test for ExecStopPostDavid Tardon2019-10-183-0/+145
| | | | | | | | | | | | This is a follow-up to #4843.
* | | test: blacklist TEST-41 on Ubuntu CIDan Streetman2019-10-181-0/+4
| | | | | | | | | | | | | | | This test has been failing on Ubuntu CI since introduced, let's blacklist it until we can debug what's causing it to fail.
* | | rule-syntax-check: add CONSTJan Synacek2019-10-181-1/+1
| | |
* | | Merge pull request #13743 from anitazha/dropin_all_the_thingsChris Down2019-10-161-0/+13
|\ \ \ | | | | | | | | core: support top level drop-ins through -.service.d for service units
| * | | shared/dropin: support -.service.d/ top level drop-in for service unitsAnita Zhang2019-10-151-0/+13
| | | | | | | | | | | | | | | | Closes #12830
* | | | Merge pull request #13754 from claudiozz/masterAnita Zhang2019-10-163-0/+74
|\ \ \ \ | | | | | | | | | | Allow restart for oneshot units
| * | | | Allow restart for oneshot unitsClaudio Zumbo2019-10-163-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | Picked up from https://github.com/systemd/systemd/pull/7474 , so coauthored by @robermorales.
* | | | | Merge pull request #13663 from ssahani/dhcp-send-option-dataZbigniew Jędrzejewski-Szmek2019-10-163-0/+3
|\ \ \ \ \ | |_|_|/ / |/| | | | network: DHCPv4 client- add support to send arbitary option and data
| * | | | test-network: disable IPv6AcceptRA= to speed up testsYu Watanabe2019-10-152-0/+2
| | | | |
| * | | | network: DHCPv4 client: add support to send arbitary option and dataSusant Sahani2019-10-151-0/+1
| | | | |
* | | | | test-network: add a test case for nexthopYu Watanabe2019-10-143-1/+43
| | | | |
* | | | | network: introduce ip nexthop routingSusant Sahani2019-10-141-0/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used to manipulate entries in the kernel's nexthop tables. Example: ``` [NextHop] Id=3 Gateway=192.168.5.1 ```
* | | | Rename udev's hwdb/ to hwdb.d/Zbigniew Jędrzejewski-Szmek2019-10-103-3/+3
| | | | | | | | | | | | | | | | | | | | As in the parent commit, this makes the name consistent with the rest of the source tree and the actuall installation path.
* | | | test: Pass personality test even when i686 userland runs on x86_64 kernelBalint Reczey2019-10-101-1/+1
|/ / /
* | | Merge pull request #13568 from ddstreet/ubuntu-ci-blacklistsZbigniew Jędrzejewski-Szmek2019-10-096-0/+23
|\ \ \ | | | | | | | | test: add temporarily blacklisted tests
| * | | test/README.testsuite: add section for Ubuntu CI blacklist filesDan Streetman2019-10-031-0/+23
| | | | | | | | | | | | | | | | | | | | Add some docs explaining how blacklist individual test/TEST-* tests in Ubuntu CI using per-test blacklist files.
| * | | test: add temporarily blacklisted testsDan Streetman2019-10-035-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This temporarily blacklists some tests when run under Ubuntu CI. This is the upstream side of the Debian 'upstream' test MR: https://salsa.debian.org/systemd-team/systemd/merge_requests/52 The tests blacklisted here should only be temporarily blacklisted until they can be fixed; the intention is that these blacklist files will be added and removed over time while debugging/fixing flaky and/or regressed tests, without causing test failure noise for other PRs.
* | | | test/TEST-31-DEVICE-ENUMERATION: do not use -x to avoid grep loopZbigniew Jędrzejewski-Szmek2019-10-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/systemd/systemd/pull/13746#issuecomment-539410752: > [grep] now matches the grep command itself, as it's logged into journal as well, thanks to set -x. Also, use journalctl --grep and -t to make things a bit quicker.
* | | | test: add function to reduce copied setup boilerplateZbigniew Jędrzejewski-Szmek2019-10-0834-252/+46
| | | | | | | | | | | | | | | | | | | | | | | | Many tests were also masking systemd-machined.service. But machined should only start when activated, so having it not masked shouldn't be noticable. TEST-25-IMPORT needs it.
* | | | test: drop redirection to tty in integration testsZbigniew Jędrzejewski-Szmek2019-10-0821-51/+0
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I *think* this was originally added to make it easier to see what was happening in tests. Later we added the functionality to print the journal on failure, so this redirection has stopped being useful. In https://github.com/systemd/systemd/pull/13719#issuecomment-539292650 @filbranden shows that grep tries to write to stdout and fails. In general, we should not assume that writing to the console it always possible. We have special code to handle this in pid1 after all: 99 19:22:10.731965 fstat(1, <unfinished ...> 99 19:22:10.731993 <... fstat resumed>{st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0 99 19:22:10.732070 write(1, "ExecStartPost={ path=/bin/echo ; argv[]=/bin/echo ${4_four_ex} ; ignore_errors=no ; start_time=[Mon 2019-10-07 19:22:10 PDT] ; stop_time=[Mon 209-10-07 19:22:10 PDT] ; pid=97 ; code=exited ; status=0 }\n", 203) = -1 EIO (Input/output error) 99 19:22:10.732174 write(2, "grep: ", 6) = -1 EIO (Input/output error) 99 19:22:10.732226 write(2, "write error", 11) = -1 EIO (Input/output error) 99 19:22:10.732263 write(2, ": Input/output error", 20) = -1 EIO (Input/output error) 99 19:22:10.732298 write(2, "\n", 1 <unfinished ...> 99 19:22:10.732325 <... write resumed>) = -1 EIO (Input/output error) 99 19:22:10.732349 exit_group(2) = ? 99 19:22:10.732424 +++ exited with 2 +++ Removing the redirection should make the tests less flakey. Replaces #13719. While at it, also drop NotifyAccess=all. I think it was added purposefully in TEST-20-MAINPIDGAMES, and then cargo culted to newer tests.
* | | test-execute: Filter /dev/.lxc in exec-dynamicuser-statedir.serviceBalint Reczey2019-10-041-1/+1
|/ / | | | | | | | | | | It appears in nested LXC containers and broke the test in Ubuntu CI. BugLink: https://bugs.launchpad.net/bugs/1845337
* | Merge pull request #12818 from yuwata/network-issue-8726Zbigniew Jędrzejewski-Szmek2019-10-031-2/+6
|\ \ | | | | | | network: disable kernel creating prefix route when RouteTable= is set
| * | network: add fallback logic for old kernelsYu Watanabe2019-07-221-2/+5
| | | | | | | | | | | | | | | | | | | | | It seems that old kernels do not support prefix routes with non-default route tables. This adds a fallback logic when adding route fails. In that case, prefix route is created by kernel and the default route table is used.
| * | network: disable kernel creating prefix route when RouteTable= is setYu Watanabe2019-07-221-2/+3
| | | | | | | | | | | | Closes #8726.
* | | Merge pull request #13696 from keszybz/keep-dhcp-on-restartZbigniew Jędrzejewski-Szmek2019-10-032-0/+9
|\ \ \ | | | | | | | | Add a way to differentiate restart from stop and keep dhcp config on restart
| * | | core: add support for RestartKillSignal= to override signal used for restart ↵Zbigniew Jędrzejewski-Szmek2019-10-022-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jobs v2: - if RestartKillSignal= is not specified, fall back to KillSignal=. This is necessary to preserve backwards compatibility (and keep KillSignal= generally useful).
* | | | nspawn: rename UNIFIED_CGROUP_HIERARCHY to SYSTEMD_NSPAWN_UNIFIED_HIERARCHYZbigniew Jędrzejewski-Szmek2019-10-012-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should never have used an unprefixed environment variable name. All other systemd-nspawn variables have the "SYSTEMD_NSPAWN_" prefix, and all other systemd variables have the "SYSTEMD_" prefix. The new variable name takes precedence, but we fall back to checking the old one. If only the old one is found, a warning is emitted. In addition, SYSTEMD_NSPAWN_UNIFIED_HIERARCHY="" is accepted as an override to avoid looking for the old variable name. We have a variable with the same name ($UNIFIED_CGROUP_HIERARCHY) in tests, which governs both systemd-nspawn and qemu behaviour. It is not renamed.
* | | | network: DHCPv6 client add support for prefix delegation hintSusant Sahani2019-10-011-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for prefix hint lenth and prefix hint address ``` Frame 43: 177 bytes on wire (1416 bits), 177 bytes captured (1416 bits) on interface 0 Ethernet II, Src: f6:c1:08:4d:45:f1 (f6:c1:08:4d:45:f1), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02) Internet Protocol Version 6, Src: fe80::d250:c82:7f6e:28d6, Dst: ff02::1:2 User Datagram Protocol, Src Port: 546, Dst Port: 547 DHCPv6 Message type: Solicit (1) Transaction ID: 0x5c7902 Rapid Commit Identity Association for Non-temporary Address Fully Qualified Domain Name Identity Association for Prefix Delegation Option: Identity Association for Prefix Delegation (25) Length: 41 Value: 1b97b1690000000000000000001a0019ffffffffffffffff… IAID: 1b97b169 T1: 0 T2: 0 IA Prefix Option: IA Prefix (26) Length: 25 Value: ffffffffffffffff3c000000000000000000000000000000… Preferred lifetime: infinity Valid lifetime: infinity Prefix length: 60 Prefix address: :: Option Request Client Identifier Elapsed time ```
* | | test: allow use of nested KVMFrantisek Sumsal2019-09-272-5/+19
| | | | | | | | | | | | | | | Introduce TEST_NESTED_KVM variable, which allows use of nested KVM for QEMU VMs (which is disabled by default by KVM autodetection).
* | | dhcp4: make IPServiceType configurableSiddharth Chandrasekara2019-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPServiceType set to CS6 (network control) causes problems on some old network setups that continue to interpret the field as IP TOS. Make DHCP work on such networks by allowing this field to be set to CS4 (Realtime) instead, as this maps to IPTOS_LOWDELAY. Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
* | | link: Add support to configure NIC ring buffer sizeSusant Sahani2019-09-241-0/+2
| | |