You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
2.2 KiB

# \brief Test for using the libc_vfs plugin with the TAR file system
# \author Christian Prochaska
# \date 2012-08-20
# Build
build {
core init
# Generate config
set config {
<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"/>
<any-service> <parent/> <any-child/> </any-service>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
<start name="tar_fs">
<resource name="RAM" quantum="4M"/>
<provides> <service name="File_system"/> </provides>
<archive name="libc_fs_tar_fs.tar" />
<policy label="" root="/testdir" />
<start name="test-libc_fs_tar_fs">
<resource name="RAM" quantum="2M"/>
<libc stdout="/dev/log">
<dir name="dev"> <log/> </dir>
append 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 mkdir -p bin/libc_fs_tar_fs/testdir/a
exec mkdir -p bin/libc_fs_tar_fs/testdir/c
exec ln -sf /a bin/libc_fs_tar_fs/testdir/c/d
exec ln -sf /c bin/libc_fs_tar_fs/testdir/e
exec echo -n "a single line of text" > bin/libc_fs_tar_fs/testdir/a/b
exec tar cfv bin/libc_fs_tar_fs.tar -C bin/libc_fs_tar_fs .
# Boot modules
# generic modules
set boot_modules {
core init timer tar_fs
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 "test-libc_fs_tar_fs" 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 :