From f278a3bafb4b3c606cb92869dda642e5d30d7c6e Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 22 May 2018 15:01:25 +0200 Subject: [PATCH] nic_router_uplinks.run: test uplink re-connect Automated test for switching the NIC-router uplink between NIC driver and Wifi driver with DHCP and different subnets. Tests also removal and later re- insertion of the uplink domain tag. Issue #2815 --- repos/dde_linux/run/nic_router_uplinks.run | 357 +++++++++++++++++++++ 1 file changed, 357 insertions(+) create mode 100644 repos/dde_linux/run/nic_router_uplinks.run diff --git a/repos/dde_linux/run/nic_router_uplinks.run b/repos/dde_linux/run/nic_router_uplinks.run new file mode 100644 index 0000000000..f657a1a4b3 --- /dev/null +++ b/repos/dde_linux/run/nic_router_uplinks.run @@ -0,0 +1,357 @@ +if {[expr ![have_spec nova] && ![have_spec sel4] && ![have_spec hw] && ![have_spec foc] || ![have_spec x86] || [have_include power_on/qemu] ]} { + puts "\n Run script is not supported on this platform. \n"; exit 0 } + +proc wifi_ssid {} { + return "$::env(GENODE_WIFI_SSID2)" } + +proc wifi_psk {} { + return "$::env(GENODE_WIFI_PSK2)" } + +source ${genode_dir}/repos/base/run/platform_drv.inc + +proc platform_drv_priority {} { return { priority="-1"} } + +append build_components { core } +append build_components { init } +append build_components { drivers/framebuffer } +append build_components { drivers/timer } +append build_components { server/nic_router } +append build_components { server/dynamic_rom } +append build_components { server/report_rom } +append build_components { drivers/wifi } +append build_components { lib/vfs/jitterentropy } +append build_components { drivers/rtc } +append build_components { drivers/nic } +append build_components { app/ping } + +append_platform_drv_build_components + +build $build_components + +create_boot_directory + +append config { + + + + + + + + + + + + + + + + } + +append_platform_drv_config +append config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +install_config $config + +exec cp ${genode_dir}/repos/ports/run/virtualbox_nic_router.vbox bin/. + +append boot_modules { iwlwifi-6000-4.ucode } +append boot_modules { iwlwifi-6000g2a-6.ucode } +append boot_modules { iwlwifi-6000g2b-6.ucode } +append boot_modules { iwlwifi-7260-16.ucode } +append boot_modules { iwlwifi-7265-16.ucode } +append boot_modules { iwlwifi-7265D-16.ucode } +append boot_modules { iwlwifi-8000C-16.ucode } +append boot_modules { report_rom } +append boot_modules { vfs_jitterentropy.lib.so } +append boot_modules { libcrypto.lib.so } +append boot_modules { libssl.lib.so } +append boot_modules { wpa_driver_nl80211.lib.so } +append boot_modules { wpa_supplicant.lib.so } +append boot_modules { wifi.lib.so } +append boot_modules { wifi_drv } +append boot_modules { core } +append boot_modules { nic_router } +append boot_modules { ld.lib.so } +append boot_modules { init } +append boot_modules { timer } +append boot_modules { ping } +append boot_modules { libc.lib.so } +append boot_modules { dynamic_rom } +append boot_modules { rtc_drv } +append boot_modules { vfs.lib.so } +append boot_modules { nic_drv } +append_platform_drv_boot_modules + +build_boot_image $boot_modules + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3001 milliseconds.*" +append done_string ".*64 bytes from 1.1.1.1: icmp_seq=.*" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3002 milliseconds.*" +append done_string ".*64 bytes from 1.1.1.1: icmp_seq=.*" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3003 milliseconds.*" +append done_string "From 10.0.1.79 icmp_seq=.* Destination Unreachable" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3004 milliseconds.*" +append done_string ".*64 bytes from 1.1.1.1: icmp_seq=.*" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3005 milliseconds.*" +append done_string ".*64 bytes from 1.1.1.1: icmp_seq=.*" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3006 milliseconds.*" +append done_string "From 10.0.1.79 icmp_seq=.* Destination Unreachable" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3007 milliseconds.*" +append done_string ".*64 bytes from 1.1.1.1: icmp_seq=.*" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 3008 milliseconds.*" +append done_string ".*64 bytes from 1.1.1.1: icmp_seq=.*" + +append done_string ".*router.config: change.*" +append done_string ".*router.config: sleep 600000 milliseconds.*" +append done_string "From 10.0.1.79 icmp_seq=.* Destination Unreachable" + +run_genode_until $done_string 60