genode/repos/libports/run/libc_vfs.run
Christian Helmuth db3a5a3b02 Some rounds of write/read in libc fs test
The test performs several rounds of write-read cycles with the following
configuration attributes in a <write-read> config node

  rounds       determines the number of rounds (default is 4)
  size         determines the number of bytes written/read in one round
               (default is 4 MiB)
  buffer_size  determines the size of the write-read buffer
               (default is 32 KiB)

In one round the test writes and reads "size/buffer_size" times
from/into a buffer_size'd buffer.
2015-11-18 12:22:05 +01:00

79 lines
1.4 KiB
Tcl

#
# \brief Test for using the libc_vfs plugin
# \author Norman Feske
# \date 2014-04-10
#
#
# Build
#
build { core init server/ram_fs test/libc_vfs }
create_boot_directory
#
# Generate config
#
set config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="SIGNAL"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="ram_fs">
<resource name="RAM" quantum="4M"/>
<provides> <service name="File_system"/> </provides>
<config> <policy label="" 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 {
<libc stdout="/dev/log" cwd="/tmp" >
<vfs>
<dir name="tmp" >
<fs/>
</dir>
<dir name="dev"> <log/> </dir>
</vfs>
</libc>
</config>
</start>
</config>
}
install_config $config
#
# Boot modules
#
build_boot_image {
core init
ld.lib.so libc.lib.so
ram_fs 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 :