genode/repos/base/run/sub_rm.run

60 lines
1.4 KiB
Plaintext
Raw Normal View History

2011-12-22 15:19:25 +00:00
build "core init test/sub_rm"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<start name="test-sub_rm">
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-sub_rm"
2011-12-22 15:19:25 +00:00
append qemu_args "-nographic -m 64"
run_genode_until {.*--- end of sub-rm test ---.*} 10
if {([have_spec linux] && [have_spec x86_32])} {
2011-12-22 15:19:25 +00:00
set maps [exec cat /proc/[exec pidof test-sub_rm]/maps]
puts "\nmemory map after test completion follows:\n"
puts "$maps\n"
#
# Validate some properties of the final mmap
#
if {![regexp {60000000-60040000 ---p} $maps]} {
puts "Error: detaching from sub RM session failed"
exit -1
}
if {![regexp {60040000-60044000 rw.s} $maps]} {
2011-12-22 15:19:25 +00:00
puts "Error: populating already attached sub RM session failed"
exit -1
}
if {![regexp {60080000-60083000 rw.s 00001000} $maps]} {
2011-12-22 15:19:25 +00:00
puts "Error: using offset parameter to sub RM attach did not work"
exit -1
}
if {![regexp {600c0000-600c2000 rw.s 00001000} $maps]} {
2011-12-22 15:19:25 +00:00
puts "Error: using offset and size parameters to sub RM attach did not work"
exit -1
}
if {![regexp -- {-60100000 ---p} $maps]} {
puts "Error: attached sub RM session exceeds region boundary"
exit -1
}
}