mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
parent
a41dd48986
commit
1c361bf545
@ -13,11 +13,13 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/thread.h>
|
||||
#include <base/attached_rom_dataspace.h>
|
||||
#include <base/component.h>
|
||||
#include <base/heap.h>
|
||||
#include <base/attached_rom_dataspace.h>
|
||||
#include <base/log.h>
|
||||
#include <base/rpc_server.h>
|
||||
#include <base/rpc_client.h>
|
||||
#include <base/thread.h>
|
||||
#include <util/reconstructible.h>
|
||||
#include <cpu_session/connection.h>
|
||||
#include <cpu_thread/client.h>
|
||||
@ -681,6 +683,37 @@ static void test_successive_create_destroy_threads(Env &env)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test destruction of entrypoint with yet not dissolved components
|
||||
*/
|
||||
namespace Test {
|
||||
struct Session;
|
||||
struct Server;
|
||||
struct Component;
|
||||
}
|
||||
|
||||
struct Test::Session : Genode::Session
|
||||
{
|
||||
static const char *service_name() { return "EP_TEST"; }
|
||||
|
||||
GENODE_RPC(Rpc_test_untyped, void, test_untyped, unsigned);
|
||||
GENODE_RPC_INTERFACE(Rpc_test_untyped);
|
||||
};
|
||||
|
||||
struct Test::Component : Genode::Rpc_object<Test::Session, Test::Component>
|
||||
{
|
||||
void test_untyped(unsigned) { }
|
||||
};
|
||||
|
||||
static void test_entrypoint_destruction(Genode::Env &env)
|
||||
{
|
||||
Test::Component c;
|
||||
|
||||
{
|
||||
Entrypoint ep(env, 8192 /* STACK*/, "test_ep", Affinity::Location());
|
||||
ep.manage(c);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
** Test destruction of inter-dependent CPU sessions **
|
||||
@ -722,6 +755,7 @@ void Component::construct(Env &env)
|
||||
|
||||
test_create_as_many_threads(env);
|
||||
test_successive_create_destroy_threads(env);
|
||||
test_entrypoint_destruction(env);
|
||||
} catch (int error) {
|
||||
Genode::error("error ", error);
|
||||
throw;
|
||||
|
Loading…
Reference in New Issue
Block a user