From 06c8283deedc6dad7112ea0e374236b22335a78e Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 28 Apr 2020 18:47:33 +0530 Subject: [PATCH] test: update to use new routes configuration method --- compositions/pc-drivers.dhall | 24 ++++------------------ tests/block_router.dhall | 8 ++++---- tests/default.nix | 3 +-- tests/driver_manager.dhall | 7 ++++--- tests/log.dhall | 1 - tests/noux.dhall | 1 - tests/solo5/net.dhall | 12 ++++------- tests/solo5/net_2if.dhall | 12 ++++------- tests/solo5/solo5.dhall | 1 - tests/solo5/time.dhall | 38 ++++++++--------------------------- tests/test.dhall | 1 - tests/vmm_x86.dhall | 5 +---- tests/x86.dhall | 19 ++++++------------ 13 files changed, 36 insertions(+), 96 deletions(-) diff --git a/compositions/pc-drivers.dhall b/compositions/pc-drivers.dhall index 4b9ef3b..d4e0636 100644 --- a/compositions/pc-drivers.dhall +++ b/compositions/pc-drivers.dhall @@ -25,26 +25,16 @@ let relabel = let drivers = Init::{ + , routes = [ ServiceRoute.parent "Timer" ] , services = [ ServiceRoute.child "Framebuffer" "dynamic" , ServiceRoute.child "Block" "dynamic" , ServiceRoute.child "Usb" "usb_drv" , ServiceRoute.child "Platform" "platform_drv" , ServiceRoute.child "Input" "input_filter" - , ServiceRoute.child "Rtc" "rtc" ] , children = toMap - { rtc = - Child.flat - Child.Attributes::{ - , binary = "rtc_drv" - , provides = [ "Rtc" ] - , routes = - [ ServiceRoute.parent "IO_PORT" - , ServiceRoute.parent "IO_MEM" - ] - } - , rom_reporter = + { rom_reporter = Child.flat Child.Attributes::{ , binary = "rom_reporter" @@ -107,7 +97,6 @@ let drivers = [ ServiceRoute.parent "IRQ" , ServiceRoute.parent "IO_MEM" , ServiceRoute.parent "IO_PORT" - , ServiceRoute.parent "Timer" , ServiceRoute.parentLabel "ROM" (Some "system") @@ -172,7 +161,6 @@ let drivers = "Report" (Some "config") (Some "usb_active_config") - , ServiceRoute.parent "Timer" ] } , ps2_drv = @@ -180,10 +168,7 @@ let drivers = Child.Attributes::{ , binary = "ps2_drv" , provides = [ "Input" ] - , routes = - [ ServiceRoute.child "Platform" "platform_drv" - , ServiceRoute.parent "Timer" - ] + , routes = [ ServiceRoute.child "Platform" "platform_drv" ] } , input_filter = Child.flat @@ -193,8 +178,7 @@ let drivers = , resources = Resources::{ ram = Genode.units.MiB 2 } , provides = [ "Input" ] , routes = - [ ServiceRoute.parent "Timer" - , ServiceRoute.parentLabel + [ ServiceRoute.parentLabel "ROM" (Some "config") (Some "input_filter.config") diff --git a/tests/block_router.dhall b/tests/block_router.dhall index 9b2e4db..9efd55e 100644 --- a/tests/block_router.dhall +++ b/tests/block_router.dhall @@ -19,16 +19,16 @@ let ServiceRoute = Init.ServiceRoute let init = Init::{ , verbose = True + , routes = + [ ServiceRoute.parent "Timer" + , ServiceRoute.child "Block" "block_router" + ] , children = let blockTest = Child.flat Child.Attributes::{ , binary = "test-block-client" , resources = Resources::{ ram = Genode.units.MiB 5 } - , routes = - [ ServiceRoute.parent "Timer" - , ServiceRoute.child "Block" "block_router" - ] } in toMap diff --git a/tests/default.nix b/tests/default.nix index 7d6c8cd..9176c62 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -69,8 +69,7 @@ listToAttrs ((concatLists (map (testsToList) [ linux hw nova ]))) // { }) novaTests); in buildPackages.stdenv.mkDerivation { - pname = "sotest"; - version = toString self.revCount; + name = "sotest"; buildCommand = '' mkdir zip; cd zip cp "${testPkgs.bender}" bender diff --git a/tests/driver_manager.dhall b/tests/driver_manager.dhall index 1381b7a..7c337b4 100644 --- a/tests/driver_manager.dhall +++ b/tests/driver_manager.dhall @@ -29,6 +29,7 @@ let label = λ(_ : Text) → { local = _, route = _ } let init = Init::{ , verbose = True + , routes = [ ServiceRoute.parent "Timer" ] , children = toMap { drivers = Init.toChild @@ -44,10 +45,10 @@ let init = , childRomRoute "dynamic_rom" "numlock" , childRomRoute "dynamic_rom" "system" , ServiceRoute.child "Report" "_report_rom" + , ServiceRoute.parent "IRQ" + , ServiceRoute.parent "IO_MEM" + , ServiceRoute.parent "IO_PORT" , ServiceRoute.parent "Timer" - , Genode.Init.ServiceRoute.parent "IRQ" - , Genode.Init.ServiceRoute.parent "IO_MEM" - , Genode.Init.ServiceRoute.parent "IO_PORT" ] } , dynamic_rom = diff --git a/tests/log.dhall b/tests/log.dhall index 22d437c..39afd56 100644 --- a/tests/log.dhall +++ b/tests/log.dhall @@ -17,7 +17,6 @@ in Test::{ , caps = 500 , ram = Genode.units.MiB 10 } - , routes = [ Genode.Init.ServiceRoute.parent "Timer" ] } } } diff --git a/tests/noux.dhall b/tests/noux.dhall index 669c835..dec6729 100644 --- a/tests/noux.dhall +++ b/tests/noux.dhall @@ -17,7 +17,6 @@ in Test::{ , caps = 500 , ram = Genode.units.MiB 10 } - , routes = [ Genode.Init.ServiceRoute.parent "Timer" ] , config = Genode.Init.Config::{ , attributes = toMap { stdin = "/script" diff --git a/tests/solo5/net.dhall b/tests/solo5/net.dhall index be89290..66db1d9 100644 --- a/tests/solo5/net.dhall +++ b/tests/solo5/net.dhall @@ -12,6 +12,10 @@ let ServiceRoute = Init.ServiceRoute let init = Init::{ + , routes = + [ Genode.Init.ServiceRoute.parent "Timer" + , Genode.Init.ServiceRoute.child "Nic" "bridge" + ] , children = toMap { nic = Child.flat @@ -42,10 +46,6 @@ let init = Child.Attributes::{ , binary = "solo5-test_net" , resources = Res::{ caps = 256, ram = Genode.units.MiB 3 } - , routes = - [ ServiceRoute.parent "Timer" - , ServiceRoute.child "Nic" "bridge" - ] , config = Init.Config::{ , content = [ Genode.Prelude.XML.text "limit" ] @@ -57,10 +57,6 @@ let init = , binary = "ping" , exitPropagate = True , resources = Res::{ caps = 128, ram = Genode.units.MiB 6 } - , routes = - [ ServiceRoute.parent "Timer" - , ServiceRoute.child "Nic" "bridge" - ] , config = Init.Config::{ , attributes = toMap { interface = "10.0.0.72/24" diff --git a/tests/solo5/net_2if.dhall b/tests/solo5/net_2if.dhall index eea827b..5d15724 100644 --- a/tests/solo5/net_2if.dhall +++ b/tests/solo5/net_2if.dhall @@ -10,6 +10,10 @@ let Res = Init.Resources let init = Init::{ + , routes = + [ Genode.Init.ServiceRoute.parent "Timer" + , Genode.Init.ServiceRoute.child "Nic" "bridge" + ] , children = toMap { nic = Child.flat @@ -40,10 +44,6 @@ let init = Child.Attributes::{ , binary = "solo5-test_net_2if" , resources = Res::{ caps = 256, ram = Genode.units.MiB 5 } - , routes = - [ Genode.Init.ServiceRoute.parent "Timer" - , Genode.Init.ServiceRoute.child "Nic" "bridge" - ] , config = Init.Config::{ , content = [ Genode.Prelude.XML.text @@ -59,10 +59,6 @@ let init = , binary = "sequence" , exitPropagate = True , resources = Res::{ caps = 256, ram = Genode.units.MiB 8 } - , routes = - [ Genode.Init.ServiceRoute.parent "Timer" - , Genode.Init.ServiceRoute.child "Nic" "bridge" - ] , config = Init.Config::{ , content = [ Genode.Prelude.XML.text diff --git a/tests/solo5/solo5.dhall b/tests/solo5/solo5.dhall index 9ee1adf..32a87a4 100644 --- a/tests/solo5/solo5.dhall +++ b/tests/solo5/solo5.dhall @@ -27,7 +27,6 @@ let toSimple = } ] } - , routes = [ Init.ServiceRoute.parent "Timer" ] } let tests diff --git a/tests/solo5/time.dhall b/tests/solo5/time.dhall index 4ca43f3..57a6688 100644 --- a/tests/solo5/time.dhall +++ b/tests/solo5/time.dhall @@ -6,34 +6,12 @@ let Init = Genode.Init let Child = Init.Child -let init = - Init::{ - , children = toMap - { solo5 = - Child.flat - Child.Attributes::{ - , binary = "solo5-test_time" - , exitPropagate = True - , resources = Init.Resources::{ - , caps = 256 - , ram = Genode.units.MiB 3 - } - , routes = - [ Init.ServiceRoute.parent "Timer" - , Init.ServiceRoute.child "Rtc" "rtc_drv" - ] - } - , rtc_drv = - Child.flat - Child.Attributes::{ - , binary = "rtc_drv" - , exitPropagate = True - , provides = [ "Rtc" ] - , routes = [ Init.ServiceRoute.parent "IO_PORT" ] - } - } - } +let solo5 = + Child.flat + Child.Attributes::{ + , binary = "solo5-test_time" + , exitPropagate = True + , resources = Init.Resources::{ caps = 256, ram = Genode.units.MiB 3 } + } -in Init.toChild - init - Init.Attributes::{ routes = [ Init.ServiceRoute.parent "IO_PORT" ] } +in solo5 diff --git a/tests/test.dhall b/tests/test.dhall index f53cdf8..7114da4 100644 --- a/tests/test.dhall +++ b/tests/test.dhall @@ -26,7 +26,6 @@ in { Genode = Genode , Init.ServiceRoute.parent "IO_PORT" , Init.ServiceRoute.parent "IRQ" , Init.ServiceRoute.parent "VM" - , Init.ServiceRoute.child "Timer" "timer" ] } } diff --git a/tests/vmm_x86.dhall b/tests/vmm_x86.dhall index 8175a30..1dab801 100644 --- a/tests/vmm_x86.dhall +++ b/tests/vmm_x86.dhall @@ -16,10 +16,7 @@ let vmm = , caps = 2048 , ram = Genode.units.MiB 256 } - , routes = - [ Genode.Init.ServiceRoute.parent "Timer" - , Genode.Init.ServiceRoute.parent "VM" - ] + , routes = [ Genode.Init.ServiceRoute.parent "VM" ] } in Test::{ children = toMap { vmm = vmm } } diff --git a/tests/x86.dhall b/tests/x86.dhall index adb88d9..7b1b7ae 100644 --- a/tests/x86.dhall +++ b/tests/x86.dhall @@ -23,22 +23,17 @@ let signal = , exitPropagate = True , priority = 5 , resources = Init.Resources::{ caps = 500, ram = Genode.units.MiB 10 } - , routes = [ Init.ServiceRoute.parent "Timer" ] } -let rtc = - Child.flat - Child.Attributes::{ - , binary = "test-rtc" - , routes = - [ Genode.Init.ServiceRoute.parent "Timer" - , Genode.Init.ServiceRoute.parent "Rtc" - ] - } +let rtc = Child.flat Child.Attributes::{ binary = "test-rtc" } let pciInit = Init::{ , verbose = True + , routes = + [ ServiceRoute.parent "Timer" + , ServiceRoute.child "Platform" "platform_drv" + ] , children = toMap { test-pci = Child.flat @@ -46,7 +41,6 @@ let pciInit = , binary = "test-pci" , exitPropagate = True , resources = Resources::{ ram = Genode.units.MiB 3 } - , routes = [ ServiceRoute.child "Platform" "platform_drv" ] } , acpi_drv = Child.flat @@ -77,8 +71,7 @@ let pciInit = , reportRoms = [ label "acpi" ] , provides = [ "Platform", "Acpi" ] , routes = - [ ServiceRoute.parent "Timer" - , ServiceRoute.parent "IRQ" + [ ServiceRoute.parent "IRQ" , ServiceRoute.parent "IO_MEM" , ServiceRoute.parent "IO_PORT" ]