2013-12-02 09:24:35 +00:00
|
|
|
build "core init test/thread"
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
install_config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="RM"/>
|
2014-04-03 12:18:52 +00:00
|
|
|
<service name="CPU"/>
|
2013-12-02 09:24:35 +00:00
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</default-route>
|
|
|
|
<start name="test-thread">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image "core init test-thread"
|
|
|
|
|
|
|
|
append qemu_args "-nographic -m 64"
|
|
|
|
|
2015-08-24 09:38:53 +00:00
|
|
|
run_genode_until {child "test-thread" exited with exit value .*\n} 40
|
2014-09-05 15:00:31 +00:00
|
|
|
|
|
|
|
# determine error code of child exit
|
|
|
|
set exit_code [regexp -inline {child "test-thread" exited with exit value .*\n} $output]
|
|
|
|
set exit_code [regexp -inline {[-+]?[0-9]+} $exit_code]
|
|
|
|
|
|
|
|
# good case
|
|
|
|
if {$exit_code eq 0} {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
# no pause/resume support for Fiasco and Pistachio - they may return a error
|
|
|
|
if {[expr [have_spec fiasco] || [have_spec pistachio]] && $exit_code eq -11} { return }
|
|
|
|
# no puase/resume support for Linux - it may return a error
|
|
|
|
if {[have_spec linux] && $exit_code eq -10} { return }
|
|
|
|
|
|
|
|
exit -1
|