genode/repos/libports/run/libc_vfs_fs.run
Norman Feske 03d7208386 Turn posix lib into shared library
By building the posix library as shared object with an ABI, we
effectively decouple posix-using programs from the library
implementation (which happens to depend on several os-level APIs such as
the VFS).
2017-05-31 13:16:02 +02:00

77 lines
1.4 KiB
Tcl

#
# \brief Test for using the vfs server
# \author Emery Hemingway
# \date 2015-08-17
#
#
# Build
#
build { core init server/vfs test/libc_vfs }
create_boot_directory
#
# Generate config
#
set config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<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="vfs">
<resource name="RAM" quantum="12M"/>
<provides> <service name="File_system"/> </provides>
<config>
<vfs> <ram/> </vfs>
<default-policy root="/" writeable="yes"/>
</config>
</start>
<start name="test-libc_vfs">
<resource name="RAM" quantum="2M"/>
<config>
<iterations value="1"/>}
append_if [have_include "power_on/qemu"] config {
<write-read size="1M" buffer_size="8K"/>}
append config {
<vfs>
<dir name="tmp"> <fs/> </dir>
<dir name="dev"> <log/> </dir>
</vfs>
<libc stdout="/dev/log" cwd="/tmp"/>
</config>
</start>
</config>
}
install_config $config
#
# Boot modules
#
build_boot_image {
core init vfs
ld.lib.so libc.lib.so libm.lib.so posix.lib.so
test-libc_vfs
}
#
# Execute test case
#
append qemu_args " -m 128 -nographic "
run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60
# vi: set ft=tcl :