genode/repos/dde_rump/run/rump_ext2.run
Norman Feske 5a1cef6381 Make label prefixing more strict
This patch unconditionally applies the labeling of sessions and thereby
removes the most common use case of 'Child_policy::filter_session_args'.
Furthermore, the patch removes an ambiguity of the session labels of
sessions created by the parent of behalf of its child, e.g., the PD
session created as part of 'Child' now has the label "<child-name>"
whereas an unlabeled PD-session request originating from the child
has the label "<child-name> -> ". This way, the routing-policy of
'Child_policy::resolve_session_request' can differentiate both cases.

As a consequence, the stricter labeling must now be considered wherever
a precise label was specified as a key for a session route or a server-
side policy selection. The simplest way to adapt those cases is to use a
'label_prefix' instead of the 'label' attribute. Alternatively, the
'label' attribute may used by appending " -> " (note the whitespace).

Fixes #2171
2016-11-30 13:37:07 +01:00

98 lines
1.9 KiB
Plaintext

if {[have_spec arm]} {
assert_spec arm_v7
}
#
# Check used commands
#
set mke2fs [check_installed mke2fs]
set dd [check_installed dd]
#
# Build
#
set build_components {
core init
drivers/timer
server/ram_blk
server/rump_fs
test/libc_vfs
}
build $build_components
#
# Build EXT2-file-system image
#
catch { exec $dd if=/dev/zero of=bin/ext2.raw bs=1M count=16 }
catch { exec $mke2fs -F bin/ext2.raw }
create_boot_directory
#
# Generate config
#
append config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="ram_blk">
<resource name="RAM" quantum="20M"/>
<provides><service name="Block"/></provides>
<config file="ext2.raw" block_size="512"/>
</start>
<start name="rump_fs">
<resource name="RAM" quantum="8M" />
<provides><service name="File_system"/></provides>
<config fs="ext2fs"><policy label_prefix="test-libc_vfs" root="/" writeable="yes"/></config>
</start>
<start name="test-libc_vfs">
<resource name="RAM" quantum="4M"/>
<config>
<libc stdout="/dev/log">
<vfs>
<dir name="dev"> <log/> </dir>
<fs/>
</vfs>
</libc>
</config>
</start>
</config>}
install_config $config
#
# Boot modules
#
# generic modules
set boot_modules {
core init timer test-libc_vfs ram_blk
rump.lib.so rump_fs.lib.so rump_fs
ld.lib.so ext2.raw libc.lib.so
}
build_boot_image $boot_modules
append qemu_args " -m 256 -nographic"
run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60
exec rm -f bin/ext2.raw