Browse Source

test: update to use new routes configuration method

nix
Emery Hemingway 2 years ago
parent
commit
06c8283dee
  1. 24
      compositions/pc-drivers.dhall
  2. 8
      tests/block_router.dhall
  3. 3
      tests/default.nix
  4. 7
      tests/driver_manager.dhall
  5. 1
      tests/log.dhall
  6. 1
      tests/noux.dhall
  7. 12
      tests/solo5/net.dhall
  8. 12
      tests/solo5/net_2if.dhall
  9. 1
      tests/solo5/solo5.dhall
  10. 38
      tests/solo5/time.dhall
  11. 1
      tests/test.dhall
  12. 5
      tests/vmm_x86.dhall
  13. 19
      tests/x86.dhall

24
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")

8
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

3
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

7
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 =

1
tests/log.dhall

@ -17,7 +17,6 @@ in Test::{
, caps = 500
, ram = Genode.units.MiB 10
}
, routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
}
}
}

1
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"

12
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 "<cmdline>limit</cmdline>" ]
@ -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"

12
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

1
tests/solo5/solo5.dhall

@ -27,7 +27,6 @@ let toSimple =
}
]
}
, routes = [ Init.ServiceRoute.parent "Timer" ]
}
let tests

38
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

1
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"
]
}
}

5
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 } }

19
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"
]

Loading…
Cancel
Save