Add more Solo5 tests
parent
cb7e956a73
commit
434f364021
@ -0,0 +1,54 @@
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
in λ(_ : {})
|
||||
→ { nic =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "nic_loopback", provides = [ "Nic" ] }
|
||||
, bridge =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "nic_bridge"
|
||||
, resources = { caps = 200, ram = Genode.units.MiB 8 }
|
||||
, provides = [ "Nic" ]
|
||||
, routes = [ Genode.ServiceRoute.child "Nic" "nic" ]
|
||||
, config =
|
||||
Genode.Prelude.XML.text
|
||||
''
|
||||
<config mac="02:02:02:02:03:00" verbose="yes">
|
||||
<policy label_prefix="solo5" ip_addr="10.0.0.2"/>
|
||||
<default-policy/>
|
||||
</config>
|
||||
''
|
||||
}
|
||||
, ping_serve =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "solo5-test_net"
|
||||
, resources = { caps = 256, ram = Genode.units.MiB 4 }
|
||||
, routes =
|
||||
[ Genode.ServiceRoute.parent "Timer"
|
||||
, Genode.ServiceRoute.child "Nic" "bridge"
|
||||
]
|
||||
, config =
|
||||
Genode.Prelude.XML.text
|
||||
''
|
||||
<config><cmdline>limit</cmdline></config>
|
||||
''
|
||||
}
|
||||
, ping =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "ping"
|
||||
, resources = { caps = 128, ram = Genode.units.MiB 8 }
|
||||
, routes =
|
||||
[ Genode.ServiceRoute.parent "Timer"
|
||||
, Genode.ServiceRoute.child "Nic" "bridge"
|
||||
]
|
||||
, config =
|
||||
Genode.Prelude.XML.text
|
||||
''
|
||||
<config interface="10.0.0.72/24"
|
||||
dst_ip="10.0.0.2"
|
||||
period_sec="1"
|
||||
verbose="no"
|
||||
count="8"/>
|
||||
''
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
{ pkgs, lib }:
|
||||
with pkgs;
|
||||
|
||||
rec {
|
||||
name = "solo5";
|
||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ehmry ];
|
||||
|
||||
testConfig = lib.renderDhallInit ./solo5-ping.dhall "{=}";
|
||||
|
||||
testScript = ''
|
||||
collect_modules ${solo5.tests}/bin/solo5-test_net
|
||||
collect_modules ${solo5}/lib/solo5-bindings-genode/solo5.lib.so
|
||||
collect_modules ${genode.os}/bin/nic_loopback
|
||||
collect_modules ${genode.os}/bin/nic_bridge
|
||||
collect_modules ${genode.os}/bin/ping
|
||||
|
||||
run_genode_until {child "ping" exited with exit value 0} 30
|
||||
'';
|
||||
}
|
@ -1,18 +1,45 @@
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
in λ(_ : {})
|
||||
→ { hello =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "solo5-test_hello"
|
||||
, resources = { caps = 256, ram = Genode.units.MiB 16 }
|
||||
, routes = [ Genode.ServiceRoute.parent "Timer" ]
|
||||
, config =
|
||||
Genode.Prelude.XML.text
|
||||
''
|
||||
<config>
|
||||
<cmdline>"Hello_Solo5"</cmdline>
|
||||
</config>
|
||||
''
|
||||
}
|
||||
: Genode.Init.Start.Type
|
||||
→ { nic =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "nic_loopback", provides = [ "Nic" ] }
|
||||
, block =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "ram_block"
|
||||
, provides = [ "Block" ]
|
||||
, resources = { caps = 96, ram = Genode.units.MiB 9 }
|
||||
, config =
|
||||
Genode.Prelude.XML.text
|
||||
''
|
||||
<config size="8M" block_size="4096"/>
|
||||
''
|
||||
}
|
||||
, test =
|
||||
Genode.Init.Start.defaults
|
||||
⫽ { binary = "sequence"
|
||||
, resources = { caps = 256, ram = Genode.units.MiB 16 }
|
||||
, routes =
|
||||
[ Genode.ServiceRoute.parent "Timer"
|
||||
, Genode.ServiceRoute.child "Block" "block"
|
||||
, Genode.ServiceRoute.child "Nic" "nic"
|
||||
]
|
||||
, config =
|
||||
Genode.Prelude.XML.text
|
||||
''
|
||||
<config>
|
||||
<start name="solo5-test_hello">
|
||||
<config>
|
||||
<cmdline>Hello_Solo5</cmdline>
|
||||
<nic/> <blk/>
|
||||
</config>
|
||||
</start>
|
||||
<start name="solo5-test_fpu"/>
|
||||
<start name="solo5-test_globals"/>
|
||||
<start name="solo5-test_quiet"/>
|
||||
<start name="solo5-test_blk"/>
|
||||
<start name="solo5-test_ssp"/>
|
||||
</config>
|
||||
''
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue