genode/repos/dde_linux/run/lxip_raw.run
Sebastian Sumpf 27b1017fe9 test/lxip_raw: test using Genode socket C-API directly
The lxip_raw.run script will spawn a client/server scenario that tests
Genode C-API calls. The scenario can be used standalone, meaning no
actual network card is required.

issue #5104
2024-02-26 08:59:08 +01:00

85 lines
2.0 KiB
Plaintext

set build_components {
lib/ld core init
timer
test/lxip_raw
server/nic_router
}
build $build_components
create_boot_directory
append config {
<config verbose="yes">
<parent-provides>
<service name="CPU"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="IRQ"/>
<service name="LOG"/>
<service name="PD"/>
<service name="RM"/>
<service name="ROM"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="nic_router" caps="200">
<resource name="RAM" quantum="10M"/>
<provides>
<service name="Nic"/>
<service name="Uplink"/>
</provides>
<config verbose_domain_state="yes" verbose_packets="no" verbose_packet_drop="yes">
<default-policy domain="default"/>
<domain name="default" interface="10.0.2.1/24">
<dhcp-server ip_first="10.0.2.2" ip_last="10.0.2.2"/>
<udp dst="0.0.0.0/0">
<permit-any domain="default"/>
</udp>
<tcp dst="0.0.0.0/0">
<permit-any domain="default"/>
</tcp>
</domain>
</config>
</start>
<start name="test-lxip_server" caps="200">
<resource name="RAM" quantum="10M"/>
<config ld_verbose="yes" ip_addr="10.0.2.3" netmask="255.255.255.0" gateway="10.0.2.1" nameserver="8.8.8.8"/>
<route>
<service name="Nic"> <child name="nic_router"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-lxip_client" caps="200">
<resource name="RAM" quantum="10M"/>
<config ld_verbose="yes" server_ip="10.0.2.3" server_port="80"/>
<route>
<service name="Nic"> <child name="nic_router"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
</config>
}
install_config $config
build_boot_image [build_artifacts]
append qemu_args " -nographic "
run_genode_until "test-lxip_server\] Success" 10