2015-09-04 14:06:03 +00:00
|
|
|
#
|
|
|
|
# \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
|
|
|
|
#
|
|
|
|
|
2015-11-12 10:54:12 +00:00
|
|
|
set config {
|
2015-09-04 14:06:03 +00:00
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<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>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2015-09-04 14:06:03 +00:00
|
|
|
<start name="vfs">
|
2015-11-17 15:07:57 +00:00
|
|
|
<resource name="RAM" quantum="12M"/>
|
2015-09-04 14:06:03 +00:00
|
|
|
<provides> <service name="File_system"/> </provides>
|
|
|
|
<config>
|
2015-11-17 15:07:57 +00:00
|
|
|
<vfs> <ram/> </vfs>
|
2016-03-09 14:32:23 +00:00
|
|
|
<default-policy root="/" writeable="yes"/>
|
2015-09-04 14:06:03 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
<start name="test-libc_vfs">
|
2017-11-02 13:54:12 +00:00
|
|
|
<resource name="RAM" quantum="4M"/>
|
2015-09-04 14:06:03 +00:00
|
|
|
<config>
|
2015-11-12 10:54:12 +00:00
|
|
|
<iterations value="1"/>}
|
|
|
|
append_if [have_include "power_on/qemu"] config {
|
|
|
|
<write-read size="1M" buffer_size="8K"/>}
|
|
|
|
append config {
|
2017-03-20 11:04:55 +00:00
|
|
|
<vfs>
|
|
|
|
<dir name="tmp"> <fs/> </dir>
|
|
|
|
<dir name="dev"> <log/> </dir>
|
|
|
|
</vfs>
|
|
|
|
<libc stdout="/dev/log" cwd="/tmp"/>
|
2015-09-04 14:06:03 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
2015-11-12 10:54:12 +00:00
|
|
|
install_config $config
|
|
|
|
|
2015-09-04 14:06:03 +00:00
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
|
|
|
build_boot_image {
|
|
|
|
core init vfs
|
2018-04-23 08:49:21 +00:00
|
|
|
ld.lib.so libc.lib.so vfs.lib.so
|
2015-09-04 14:06:03 +00:00
|
|
|
test-libc_vfs
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Execute test case
|
|
|
|
#
|
|
|
|
|
2017-11-02 13:54:12 +00:00
|
|
|
append qemu_args " -nographic "
|
2015-09-04 14:06:03 +00:00
|
|
|
run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60
|
|
|
|
|
|
|
|
# vi: set ft=tcl :
|