From 2c15aaf67d44a509b20cc6b8d996c927f023547a Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 15 Apr 2014 09:31:50 +0200 Subject: [PATCH] linux: fix lx_rmap test to not stuck The test did not fail actually. It just behaved strangely and got stuck in the good case, which is fixed now. Fixes #1121. --- repos/base-linux/run/lx_rmap.inc | 3 ++- repos/base-linux/src/test/lx_rmap/main.cc | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/repos/base-linux/run/lx_rmap.inc b/repos/base-linux/run/lx_rmap.inc index ded0506e81..5db836c4cb 100644 --- a/repos/base-linux/run/lx_rmap.inc +++ b/repos/base-linux/run/lx_rmap.inc @@ -67,6 +67,7 @@ build_boot_image $boot_modules # Execute test # -run_genode_until forever +run_genode_until "child exited with exit value 0.*\n" 10 +puts "Test succeeded" # vi: set ft=tcl : diff --git a/repos/base-linux/src/test/lx_rmap/main.cc b/repos/base-linux/src/test/lx_rmap/main.cc index e1f41ef055..a9f8b51bf7 100644 --- a/repos/base-linux/src/test/lx_rmap/main.cc +++ b/repos/base-linux/src/test/lx_rmap/main.cc @@ -67,6 +67,7 @@ int main() PLOG("before RAM dataspace attach"); env()->rm_session()->attach_at(ds, beg); PERR("after RAM dataspace attach -- ERROR"); + sleep_forever(); } catch (Rm_session::Region_conflict) { PLOG("OK caught Region_conflict exception"); } @@ -79,6 +80,7 @@ int main() PLOG("before sub-RM dataspace attach"); env()->rm_session()->attach_at(ds, beg); PERR("after sub-RM dataspace attach -- ERROR"); + sleep_forever(); } catch (Rm_session::Region_conflict) { PLOG("OK caught Region_conflict exception"); } @@ -98,8 +100,7 @@ int main() *addr = 0x55; PLOG("after touch (%x/%x)", val, *addr); } catch (Rm_session::Region_conflict) { - PLOG("OK caught Region_conflict exception -- ERROR"); + PERR("Caught Region_conflict exception -- ERROR"); + sleep_forever(); } - - sleep_forever(); }