From 54b47535f8547d0b881dd11f0cf6450a17e32b5c Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Sat, 28 May 2016 23:39:35 +0200 Subject: [PATCH] run: adapt trace.run Issue #1983 --- repos/os/src/test/trace/main.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/repos/os/src/test/trace/main.cc b/repos/os/src/test/trace/main.cc index 6e13048dd..daee21c30 100644 --- a/repos/os/src/test/trace/main.cc +++ b/repos/os/src/test/trace/main.cc @@ -134,9 +134,18 @@ static void test_out_of_metadata() enum { MAX_SUBJECT_IDS = 16 }; Genode::Trace::Subject_id subject_ids[MAX_SUBJECT_IDS]; - Genode::Trace::Connection trace(sizeof(subject_ids) + 4096, sizeof(subject_ids), 0); + try { + Genode::Trace::Connection trace(sizeof(subject_ids) + 4096, sizeof(subject_ids), 0); + + /* we should never arrive here */ + struct Unexpectedly_got_no_exception{}; + throw Unexpectedly_got_no_exception(); + } catch (Genode::Parent::Service_denied) { + printf("got Genode::Parent::Service_denied exception as expected\n"); + } try { + Genode::Trace::Connection trace(sizeof(subject_ids) + 5*4096, sizeof(subject_ids), 0); trace.subjects(subject_ids, MAX_SUBJECT_IDS); /* we should never arrive here */