genode/repos/os/run/fs_report.run
Norman Feske 7d12d7a78f fs_report.run: replace test with dedicated program
The new version of the test exercises the combination of fs_report with
ram_fs and fs_rom as a more flexible alternative to report_rom.

It covers two corner cases that remained unaddressed by fs_rom and
ram_fs so far: First, the late installation of a ROM-update signal
handler at fs_rom right before the content of the file is modified.
Second, the case where the requested file is not present on the file
system at the creation time of the ROM session. Here, the ram_fs missed
to inform listeners for the compound directory about the later created
file.
2017-08-17 10:59:43 +02:00

92 lines
2.3 KiB
Plaintext

#
# Build
#
set build_components {
core init drivers/timer
server/fs_report server/fs_rom server/ram_fs test/fs_report
}
build $build_components
create_boot_directory
#
# Generate config
#
append config {
<config>
<parent-provides>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="PD"/>
<service name="ROM"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="ram_fs">
<resource name="RAM" quantum="4M"/>
<provides> <service name="File_system"/> </provides>
<config>
<content>
<dir name="test-fs_report">
<inline name="devices">
<devices version="initial"/>
</inline>
</dir>
</content>
<policy label_prefix="fs_report -> " root="/" writeable="yes"/>
<policy label_prefix="fs_rom -> " root="/test-fs_report"/>
</config>
</start>
<!--
All reports sent by 'test-fs_report' are prefixed with the label of the
component. Hence, they are written to the 'test-fs_report/' subdirectory.
-->
<start name="fs_report">
<resource name="RAM" quantum="4M"/>
<provides> <service name="Report"/> </provides>
<config> <vfs> <fs/> </vfs> </config>
</start>
<start name="fs_rom">
<resource name="RAM" quantum="4M"/>
<provides> <service name="ROM"/> </provides>
<config/>
</start>
<start name="test-fs_report">
<resource name="RAM" quantum="4M"/>
<config/>
<route>
<service name="ROM" label="devices"> <child name="fs_rom"/> </service>
<service name="ROM" label="focus"> <child name="fs_rom"/> </service>
<service name="Report" label="devices"> <child name="fs_report"/> </service>
<service name="Report" label="focus"> <child name="fs_report"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
</config>}
install_config $config
#
# Boot modules
#
set boot_modules {
core ld.lib.so init timer
fs_report fs_rom ram_fs test-fs_report
}
build_boot_image $boot_modules
append qemu_args " -nographic"
run_genode_until {child "test-fs_report" exited with exit value 0.*\n} 30