aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-12-05 23:13:17 +0100
committerGitHub <noreply@github.com>2018-12-05 23:13:17 +0100
commit253de6063474f24b4d1ae069f6cdd22b1a747ce2 (patch)
tree992fb755fbe17033370847d7cfe6216cee9039bd /test
parentMerge pull request #11053 from poettering/rc-local-tweak (diff)
parenttest-network: add test for ISATAP (diff)
downloadsystemd-253de6063474f24b4d1ae069f6cdd22b1a747ce2.tar.gz
systemd-253de6063474f24b4d1ae069f6cdd22b1a747ce2.tar.bz2
systemd-253de6063474f24b4d1ae069f6cdd22b1a747ce2.zip
Merge pull request #11021 from ssahani/isatap
networkd: Add support to configure ISATAP tunnel
Diffstat (limited to 'test')
-rw-r--r--test/fuzz/fuzz-netdev-parser/directives.netdev1
-rw-r--r--test/test-network/conf/25-isatap-tunnel.netdev8
-rw-r--r--test/test-network/conf/isatap.network5
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py14
4 files changed, 26 insertions, 2 deletions
diff --git a/test/fuzz/fuzz-netdev-parser/directives.netdev b/test/fuzz/fuzz-netdev-parser/directives.netdev
index 19226df80..5a8d41eb6 100644
--- a/test/fuzz/fuzz-netdev-parser/directives.netdev
+++ b/test/fuzz/fuzz-netdev-parser/directives.netdev
@@ -76,6 +76,7 @@ FOUSourcePort=
IPv6RapidDeploymentPrefix=
ERSPANIndex=
SerializeTunneledPackets=
+ISATAP=
[VXLAN]
UDP6ZeroChecksumRx=
ARPProxy=
diff --git a/test/test-network/conf/25-isatap-tunnel.netdev b/test/test-network/conf/25-isatap-tunnel.netdev
new file mode 100644
index 000000000..3aa882a26
--- /dev/null
+++ b/test/test-network/conf/25-isatap-tunnel.netdev
@@ -0,0 +1,8 @@
+[NetDev]
+Name=isataptun99
+Kind=sit
+
+[Tunnel]
+Local=10.65.223.238
+Remote=10.65.223.239
+ISATAP=true
diff --git a/test/test-network/conf/isatap.network b/test/test-network/conf/isatap.network
new file mode 100644
index 000000000..e8d03ed6b
--- /dev/null
+++ b/test/test-network/conf/isatap.network
@@ -0,0 +1,5 @@
+[Match]
+Name=dummy98
+
+[Network]
+Tunnel=isataptun99
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 806f4a496..aeedb6550 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -166,7 +166,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'macvlan99', 'ipvlan99', 'vxlan99', 'veth99', 'vrf99', 'tun99',
'tap99', 'vcan99', 'geneve99', 'dummy98', 'ipiptun99', 'sittun99', '6rdtun99',
'gretap99', 'vtitun99', 'vti6tun99','ip6tnl99', 'gretun99', 'ip6gretap99',
- 'wg99', 'dropin-test', 'erspan-test']
+ 'wg99', 'dropin-test', 'erspan-test', 'isataptun99']
units = ['25-bridge.netdev', '25-bond.netdev', '21-vlan.netdev', '11-dummy.netdev', '21-vlan.network',
'21-macvtap.netdev', 'macvtap.network', '21-macvlan.netdev', 'macvlan.network', 'vxlan.network',
@@ -176,7 +176,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
'25-erspan-tunnel.netdev', '25-gre-tunnel.netdev', '25-gretap-tunnel.netdev', '25-vti-tunnel.netdev',
'25-vti6-tunnel.netdev', '12-dummy.netdev', 'gre.network', 'ipip.network', 'ip6gretap.network',
'gretun.network', 'ip6tnl.network', '25-tap.netdev', 'vti6.network', 'vti.network', 'gretap.network',
- 'sit.network', '25-ipip-tunnel-independent.netdev', '25-wireguard.netdev', '6rd.network', '10-dropin-test.netdev']
+ 'sit.network', '25-ipip-tunnel-independent.netdev', '25-wireguard.netdev', '6rd.network', '10-dropin-test.netdev',
+ '25-isatap-tunnel.netdev', 'isatap.network']
def setUp(self):
self.link_remove(self.links)
@@ -389,6 +390,15 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
self.assertTrue(self.link_exits('dummy98'))
self.assertTrue(self.link_exits('sittun99'))
+ def test_isatap_tunnel(self):
+ self.copy_unit_to_networkd_unit_path('12-dummy.netdev', '25-isatap-tunnel.netdev', 'isatap.network')
+ self.start_networkd()
+
+ self.assertTrue(self.link_exits('dummy98'))
+ self.assertTrue(self.link_exits('isataptun99'))
+ output = subprocess.check_output(['ip', '-d', 'link', 'show', 'isataptun99']).rstrip().decode('utf-8')
+ self.assertRegex(output, "isatap ")
+
def test_6rd_tunnel(self):
self.copy_unit_to_networkd_unit_path('12-dummy.netdev', '25-6rd-tunnel.netdev', '6rd.network')
self.start_networkd()