2018-03-12 18:29:58 +00:00
|
|
|
#
|
|
|
|
# \brief Test for auditing the vfs
|
|
|
|
# \author Emery Hemingway
|
|
|
|
# \date 2018-03-22
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
|
|
|
build { core init server/vfs test/libc_vfs lib/vfs/audit }
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate config
|
|
|
|
#
|
|
|
|
|
|
|
|
set config {
|
|
|
|
<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>
|
|
|
|
<default caps="100"/>
|
|
|
|
<start name="vfs">
|
|
|
|
<resource name="RAM" quantum="12M"/>
|
|
|
|
<provides> <service name="File_system"/> </provides>
|
|
|
|
<config>
|
|
|
|
<vfs>
|
|
|
|
<dir name="ram"> <ram/> </dir>
|
|
|
|
<dir name="audit"> <audit path="ram"/> </dir>
|
|
|
|
</vfs>
|
|
|
|
<default-policy root="/audit" writeable="yes"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
<start name="test-libc_vfs">
|
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<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
|
2018-04-23 08:49:21 +00:00
|
|
|
ld.lib.so libc.lib.so vfs.lib.so
|
2018-03-12 18:29:58 +00:00
|
|
|
test-libc_vfs
|
|
|
|
vfs_audit.lib.so
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Execute test case
|
|
|
|
#
|
|
|
|
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60
|
|
|
|
|
|
|
|
# vi: set ft=tcl :
|