test-libc_connect: use black hole as Uplink for lxip

For connection timeout test, create uplink domain via the 'black_hole'
that is only reachable through the nic_router.

issue #5104
This commit is contained in:
Sebastian Sumpf 2023-12-14 18:25:18 +01:00 committed by Christian Helmuth
parent 05283ac247
commit 8c9b23ef56
4 changed files with 28 additions and 2 deletions

View File

@ -1,3 +1,4 @@
_/src/black_hole
_/src/init
_/src/libc
_/src/nic_router

View File

@ -7,6 +7,7 @@
<succeed>child "test-libc_connect" exited with exit value 0</succeed>
<content>
<rom label="black_hole"/>
<rom label="ld.lib.so"/>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
@ -43,11 +44,22 @@
<service name="Uplink"/>
</provides>
<config>
<domain name="default" interface="10.0.1.1/24"/>
<domain name="uplink" interface="10.0.2.1/24"/>
<domain name="default" interface="10.0.1.1/24">
<ip dst="10.0.2.0/24" domain="uplink"/>
</domain>
<policy label_prefix="black_hole" domain="uplink"/>
<default-policy domain="default"/>
</config>
</start>
<start name="black_hole">
<resource name="RAM" quantum="2M"/>
<config>
<uplink_client/>
</config>
</start>
<start name="server">
<binary name="test-netty_tcp"/>
<resource name="RAM" quantum="10M"/>

View File

@ -1,3 +1,4 @@
_/src/black_hole
_/src/init
_/src/libc
_/src/nic_router

View File

@ -7,6 +7,7 @@
<succeed>child "test-libc_connect" exited with exit value 0</succeed>
<content>
<rom label="black_hole"/>
<rom label="ld.lib.so"/>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
@ -44,11 +45,22 @@
<service name="Uplink"/>
</provides>
<config>
<domain name="default" interface="10.0.1.1/24"/>
<domain name="uplink" interface="10.0.2.1/24"/>
<domain name="default" interface="10.0.1.1/24">
<ip dst="10.0.2.0/24" domain="uplink"/>
</domain>
<policy label_prefix="black_hole" domain="uplink"/>
<default-policy domain="default"/>
</config>
</start>
<start name="black_hole">
<resource name="RAM" quantum="2M"/>
<config>
<uplink_client/>
</config>
</start>
<start name="socket_fs_server" caps="200">
<binary name="vfs"/>
<resource name="RAM" quantum="10M"/>