mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
Added scenario for testing cell destruction.
This commit is contained in:
76
repos/ealanos/run/cell_destruction_test.run
Normal file
76
repos/ealanos/run/cell_destruction_test.run
Normal file
@@ -0,0 +1,76 @@
|
||||
set build_components {
|
||||
core init hoitaja timer app/empty_cell app/volatile_cell
|
||||
}
|
||||
|
||||
build $build_components
|
||||
create_boot_directory
|
||||
|
||||
install_config {
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="LOG"/>
|
||||
<service name="PD"/>
|
||||
<service name="CPU"/>
|
||||
<service name="ROM"/>
|
||||
<service name="RAM"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="CAP"/>
|
||||
<service name="RM"/>
|
||||
<service name="SIGNAL"/>
|
||||
<service name="TRACE"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service><parent/><any-child/></any-service>
|
||||
</default-route>
|
||||
<default caps="2000"/>
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="3M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
<route>
|
||||
<any-service><parent/><any-child/></any-service>
|
||||
</route>
|
||||
</start>
|
||||
<start name="hoitaja" caps="1046284">
|
||||
<resource name="RAM" quantum="250G"/>
|
||||
<config prio_levels="32" verbose="true">
|
||||
<parent-provides>
|
||||
<service name="LOG"/>
|
||||
<service name="PD"/>
|
||||
<service name="CPU"/>
|
||||
<service name="ROM"/>
|
||||
<service name="RAM"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="CAP"/>
|
||||
<service name="RM"/>
|
||||
<service name="SIGNAL"/>
|
||||
<service name="TRACE"/>
|
||||
<service name="Timer"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service><parent/><any-child/></any-service>
|
||||
</default-route>
|
||||
<default caps="600"/>
|
||||
<affinity-space width="64" height="1"/>
|
||||
<start name="cell1" priority="-1">
|
||||
<binary name="volatile_cell"/>
|
||||
<resource name="RAM" quantum="3M"/>
|
||||
</start>
|
||||
<!--
|
||||
<start name="cell2" priority="-2">
|
||||
<binary name="empty_cell"/>
|
||||
<resource name="RAM" quantum="3M"/>
|
||||
</start>
|
||||
-->
|
||||
</config>
|
||||
</start>
|
||||
</config>
|
||||
}
|
||||
|
||||
build_boot_image [build_artifacts]
|
||||
|
||||
append qemu_args " -nographic "
|
||||
run_genode_until forever
|
||||
27
repos/ealanos/src/app/volatile_cell/main.cc
Normal file
27
repos/ealanos/src/app/volatile_cell/main.cc
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <base/component.h>
|
||||
#include <base/env.h>
|
||||
#include <base/log.h>
|
||||
#include <timer_session/connection.h>
|
||||
|
||||
namespace Hoitaja_test
|
||||
{
|
||||
class Empty_cell;
|
||||
}
|
||||
|
||||
class Hoitaja_test::Empty_cell
|
||||
{
|
||||
private:
|
||||
Genode::Env &_env;
|
||||
Timer::Connection _timer{_env};
|
||||
|
||||
public:
|
||||
Empty_cell(Genode::Env &env) : _env(env)
|
||||
{
|
||||
Genode::log("Volatile dummy cell started.");
|
||||
_timer.msleep(10000);
|
||||
Genode::log("Exiting..");
|
||||
_env.parent().exit(0);
|
||||
}
|
||||
};
|
||||
|
||||
void Component::construct(Genode::Env &env) { static Hoitaja_test::Empty_cell cell(env);}
|
||||
3
repos/ealanos/src/app/volatile_cell/target.mk
Normal file
3
repos/ealanos/src/app/volatile_cell/target.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
TARGET = volatile_cell
|
||||
SRC_CC += main.cc
|
||||
LIBS += base
|
||||
Reference in New Issue
Block a user