mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
8a279855ff
Fixes #4983
126 lines
3.6 KiB
Plaintext
126 lines
3.6 KiB
Plaintext
source ${genode_dir}/repos/os/run/assert_nic.inc
|
|
|
|
proc test_timeout { } {
|
|
if {[have_spec sel4] && [have_board pc]} { return 60 }
|
|
return 30
|
|
}
|
|
|
|
proc dst_ip { } {
|
|
if {[expr ![have_include power_on/qemu]]} {
|
|
return "10.0.0.2"
|
|
} else {
|
|
return "10.0.2.2"
|
|
}
|
|
}
|
|
|
|
build { server/nic_uplink app/ping }
|
|
|
|
create_boot_directory
|
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
|
[depot_user]/pkg/[drivers_nic_pkg] \
|
|
[depot_user]/src/init
|
|
|
|
append config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="IRQ"/>
|
|
<service name="IO_PORT"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="PD"/>
|
|
<service name="RM"/>
|
|
<service name="CPU"/>
|
|
<service name="LOG"/>
|
|
</parent-provides>
|
|
|
|
<start name="timer" caps="100">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides><service name="Timer"/></provides>
|
|
<route>
|
|
<service name="PD"> <parent/> </service>
|
|
<service name="ROM"> <parent/> </service>
|
|
<service name="LOG"> <parent/> </service>
|
|
<service name="CPU"> <parent/> </service>
|
|
<service name="IO_PORT"> <parent/> </service>
|
|
<service name="IO_MEM"> <parent/> </service>
|
|
<service name="IRQ"> <parent/> </service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="drivers" caps="1200" managing_system="yes">
|
|
<resource name="RAM" quantum="32M"/>
|
|
<binary name="init"/>
|
|
<route>
|
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
|
<service name="Uplink"> <child name="nic_uplink"/> </service>
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
<service name="RM"> <parent/> </service>
|
|
<service name="PD"> <parent/> </service>
|
|
<service name="ROM"> <parent/> </service>
|
|
<service name="LOG"> <parent/> </service>
|
|
<service name="CPU"> <parent/> </service>
|
|
<service name="IO_PORT"> <parent/> </service>
|
|
<service name="IO_MEM"> <parent/> </service>
|
|
<service name="IRQ"> <parent/> </service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="nic_uplink" caps="100">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides>
|
|
<service name="Uplink"/>
|
|
<service name="Nic"/>
|
|
</provides>
|
|
<config verbose="yes"/>
|
|
<route>
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
<service name="PD"> <parent/> </service>
|
|
<service name="ROM"> <parent/> </service>
|
|
<service name="LOG"> <parent/> </service>
|
|
<service name="CPU"> <parent/> </service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="ping_1" caps="100">
|
|
<binary name="ping"/>
|
|
<resource name="RAM" quantum="8M"/>
|
|
<config dst_ip="} [dst_ip] {" period_sec="1" count="3"/>
|
|
<route>
|
|
<service name="Nic"> <child name="nic_uplink"/> </service>
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
<service name="PD"> <parent/> </service>
|
|
<service name="ROM"> <parent/> </service>
|
|
<service name="LOG"> <parent/> </service>
|
|
<service name="CPU"> <parent/> </service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="ping_2" caps="100">
|
|
<binary name="ping"/>
|
|
<resource name="RAM" quantum="8M"/>
|
|
<config dst_ip="} [dst_ip] {" period_sec="1" count="3"/>
|
|
<route>
|
|
<service name="Nic"> <child name="nic_uplink"/> </service>
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
<service name="PD"> <parent/> </service>
|
|
<service name="ROM"> <parent/> </service>
|
|
<service name="LOG"> <parent/> </service>
|
|
<service name="CPU"> <parent/> </service>
|
|
</route>
|
|
</start>
|
|
|
|
</config>
|
|
}
|
|
|
|
install_config $config
|
|
|
|
build_boot_image [build_artifacts]
|
|
|
|
append qemu_args " -nographic "
|
|
append_qemu_nic_args
|
|
|
|
run_genode_until "child \"ping_.\" exited with exit value 0.*child \"ping_.\" exited with exit value 0.*\n" [test_timeout]
|