if {![have_include power_on/qemu] || [have_spec foc] || [have_spec rpi3] || [expr [have_spec imx53] && [have_spec trustzone]]} { puts "Run script is not supported on this platform." exit 0 } proc test_timeout { } { if {[have_spec sel4] && [have_spec x86]} { return 240 } if {[have_spec okl4] || [have_spec pistachio]} { return 240 } return 120 } proc good_dst_ip { } { return "10.0.2.2" } proc bad_dst_ip { } { return "10.0.0.123" } create_boot_directory import_from_depot [depot_user]/src/[base_src] \ [depot_user]/pkg/[drivers_nic_pkg] \ [depot_user]/src/init build { app/ping test/net_flood server/nic_router server/dynamic_rom } install_config { } build_boot_image { test-net_flood ping nic_router dynamic_rom } proc qemu_nic_model {} { if [have_spec x86] { return e1000 } if [have_spec lan9118] { return lan9118 } if [have_spec zynq] { return cadence_gem } return nic_model_missing } append qemu_args " -nographic " append qemu_args " -netdev user,id=net0 " append qemu_args " -net nic,model=[qemu_nic_model],netdev=net0 " run_genode_until {.*ping\] 64 bytes from 10\.0\.2\.2: icmp_seq=30 .*\n} [test_timeout]