genode/libports/run/libc_fs_tar_fs.run
Christian Prochaska 3084c6f500 TAR file system service
This patch implements a service which provides the contents of a tar
archive via the 'File_system::Session' interface.

Configuration:

<config>
	<archive name="tar_archive.tar" />
	<policy label="label_of_client" root="/rootdir/for/client" />
</config>

Fixes #333.
2012-08-22 09:51:31 +02:00

103 lines
1.8 KiB
Tcl

#
# \brief Test for using the libc_fs plugin with the TAR file system
# \author Christian Prochaska
# \date 2012-08-20
#
#
# Build
#
build {
core init
drivers/timer
server/tar_fs
test/libc_fs_tar_fs
}
create_boot_directory
#
# Generate config
#
set config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="CAP"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<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="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="tar_fs">
<resource name="RAM" quantum="4M"/>
<provides> <service name="File_system"/> </provides>
<config>
<archive name="libc_fs_tar_fs.tar" />
<policy label="" root="/testdir" />
</config>
</start>
<start name="test-libc_fs_tar_fs">
<resource name="RAM" quantum="2M"/>
</start>
}
append config {
</config>
}
install_config $config
#
# Create tar archive
#
exec mkdir -p bin/libc_fs_tar_fs/testdir/testdir
exec echo -n "a single line of text" > bin/libc_fs_tar_fs/testdir/testdir/test.tst
exec tar cfv bin/libc_fs_tar_fs.tar -h -C bin/libc_fs_tar_fs .
#
# Boot modules
#
# generic modules
set boot_modules {
core init timer tar_fs
ld.lib.so libc.lib.so libc_log.lib.so libc_fs.lib.so
test-libc_fs_tar_fs libc_fs_tar_fs.tar
}
build_boot_image $boot_modules
#
# Execute test case
#
#
# Qemu
#
append qemu_args " -m 128 -nographic "
run_genode_until {.*child exited with exit value 0.*} 60
#exec rm -rf bin/libc_fs_tar_fs
#exec rm -rf bin/libc_fs_tar_fs.tar
puts "\ntest succeeded\n"
# vi: set ft=tcl :