mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 08:21:08 +00:00
ed52d5a211
Instead of holding SPEC-variable dependent files and directories inline within the repository structure, move them into 'spec' subdirectories at the corresponding levels, e.g.: repos/base/include/spec repos/base/mk/spec repos/base/lib/mk/spec repos/base/src/core/spec ... Moreover, this commit removes the 'platform' directories. That term was used in an overloaded sense. All SPEC-relative 'platform' directories are now named 'spec'. Other files, like for instance those related to the kernel/architecture specific startup library, where moved from 'platform' directories to explicit, more meaningful places like e.g.: 'src/lib/startup'. Fix #1673
103 lines
2.3 KiB
Plaintext
103 lines
2.3 KiB
Plaintext
#
|
|
# \brief Test to start threads on all available CPUs
|
|
# \author Norman Feske
|
|
# \author Alexander Boettcher
|
|
#
|
|
|
|
if {
|
|
![have_spec hw_arndale] &&
|
|
![have_spec foc_x86_32] &&
|
|
![have_spec foc_x86_64] &&
|
|
![have_spec foc_panda] &&
|
|
![have_spec foc_arndale] &&
|
|
![have_spec foc_odroid_x2] &&
|
|
![have_spec nova]
|
|
} {
|
|
puts "Platform is unsupported."
|
|
exit 0
|
|
}
|
|
|
|
|
|
set build_components { core init test/affinity }
|
|
|
|
lappend_if [have_spec arndale] build_components drivers/platform
|
|
|
|
build $build_components
|
|
|
|
create_boot_directory
|
|
|
|
set config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="LOG"/>
|
|
<service name="CPU"/>
|
|
<service name="RM"/>
|
|
<service name="CAP"/>
|
|
<service name="SIGNAL"/>
|
|
<service name="RAM"/>
|
|
<service name="ROM"/>
|
|
<service name="IO_MEM"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> </any-service>
|
|
</default-route> }
|
|
|
|
append_if [have_spec arndale] config {
|
|
<start name="platform_drv">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides><service name="Regulator"/></provides>
|
|
</start> }
|
|
|
|
append config {
|
|
<start name="test-affinity">
|
|
<resource name="RAM" quantum="10M"/>
|
|
</start>
|
|
</config> }
|
|
|
|
install_config $config
|
|
|
|
set boot_modules { core init test-affinity }
|
|
|
|
lappend_if [have_spec arndale] boot_modules platform_drv
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
if {[have_include "power_on/qemu"]} {
|
|
set want_cpus_x 4
|
|
set want_cpus_y 1
|
|
set want_cpus_total [expr $want_cpus_x*$want_cpus_y]
|
|
set rounds "03"
|
|
append qemu_args "-nographic -m 64 -smp $want_cpus_total,cores=$want_cpus_total "
|
|
} else {
|
|
set rounds "10"
|
|
if {[have_spec x86]} { set rounds "40" }
|
|
}
|
|
|
|
run_genode_until "Round $rounds:.*\n" 120
|
|
|
|
set cpus [regexp -inline {Detected [0-9x]+ CPU[s\.]} $output]
|
|
set cpus [regexp -all -inline {[0-9]+} $cpus]
|
|
set cpus [expr [lindex $cpus 0] * [lindex $cpus 1]]
|
|
|
|
if {[have_include "power_on/qemu"]} {
|
|
if {$want_cpus_total != $cpus} {
|
|
puts "CPU count is not as expected: $want_cpus_total != $cpus"
|
|
exit 1;
|
|
}
|
|
}
|
|
|
|
set good_string {}
|
|
for {set r 0} {$r <= $rounds} {incr r} {
|
|
append good_string {[init -> test-affinity] Round }
|
|
append good_string [format "%02d" $r]
|
|
append good_string ":"
|
|
for {set i 0} {$i < $cpus} {incr i} {
|
|
append good_string " A"
|
|
}
|
|
append good_string "\n"
|
|
}
|
|
|
|
grep_output {\[init -\> test-affinity\] Round}
|
|
|
|
compare_output_to $good_string
|