create_boot_directory
import_from_depot \
genodelabs/src/[base_src] \
genodelabs/src/coreutils \
genodelabs/src/bash \
genodelabs/src/init \
genodelabs/src/libc \
genodelabs/src/noux \
genodelabs/src/posix \
genodelabs/src/report_rom \
genodelabs/src/vfs \
genodelabs/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} 30
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]
}