genode/repos/base/run/thread.run
Christian Helmuth 019528ee6a Disable lock tests on platforms without priorities
The implementations of the lock and C++ guards tests depend on
thread-execution priorities, which produces false negatives of the whole
thread test on platforms without priority support.
2017-06-29 11:59:49 +02:00

55 lines
1.3 KiB
Plaintext

build "core init test/thread"
create_boot_directory
#
# We skip pause-resume test on platforms where this functionality is not
# supported.
#
proc pause_resume_supported { } {
if {[have_spec pistachio]} { return false }
if {[have_spec linux]} { return false }
if {[have_spec fiasco]} { return false }
return true
}
#
# We skip the lock and C++ guard tests on kernels without priority support (as
# it is needed for the test implementation).
#
proc prio_supported { } {
if {[have_spec hw]} { return false }
if {[have_spec sel4]} { return false }
if {[have_spec linux]} { return false }
if {[have_spec fiasco]} { return false }
return true
}
append config {
<config prio_levels="2">
<parent-provides>
<service name="LOG"/>
<service name="CPU"/>
<service name="ROM"/>
<service name="PD"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<start name="test-thread" caps="2000">
<resource name="RAM" quantum="10M"/>
<resource name="CPU" quantum="100"/>
<config pause_resume="} [pause_resume_supported] {" prio="} [prio_supported] {"/>
</start>
</config>
}
install_config $config
build_boot_image "core ld.lib.so init test-thread"
append qemu_args "-nographic "
run_genode_until {.*test completed successfully.*\n} 60