create_boot_directory
import_from_depot \
[depot_user]/src/[base_src] \
[depot_user]/src/coreutils \
[depot_user]/src/bash \
[depot_user]/src/init \
[depot_user]/src/libc \
[depot_user]/src/fs_rom \
[depot_user]/src/posix \
[depot_user]/src/report_rom \
[depot_user]/src/vfs \
[depot_user]/src/vfs_import
install_config {
first
second
fourth
}
build { app/sequence app/fs_query }
build_boot_image { sequence fs_query }
append qemu_args " -nographic -serial mon:stdio "
run_genode_until {.*child "test" exited with exit value 0.*\n} 50
grep_output {\[init -> report_rom\].*}
set num_listings [regexp -all {report 'fs_query -> listing'} $output dummy]
# we expect at least four intermediate reports
if {$num_listings < 4} {
puts "Error: too few reports generated"
exit 1
}
#
# We cannot reliably compare the full output because some file operations
# may trigger one or two reports depending on the timing of signal delivery.
# However, we can at least check the last report for validity.
#
regsub {.*report 'fs_query -> listing'} $output {} output
compare_output_to {
[init -> report_rom]
[init -> report_rom]
[init -> report_rom] fourth
[init -> report_rom] first
[init -> report_rom] updated
[init -> report_rom]
[init -> report_rom]
[init -> report_rom]
}