set dd [installed_command dd] proc tresor_image_name { } { return "tresor_block.img" } proc local_tresor_image { } { return bin/[tresor_image_name] } proc autopilot_tresor_image { } { return /tmp/[tresor_image_name].[exec id -un] } set image_size 1024 if {[info exists ::env(tresor_IMAGE_SIZE)]} { set image_size $::env(tresor_IMAGE_SIZE) } proc tresor_image_size_mb { } { global image_size return $image_size } proc tresor_vbd_size_mb { } { return [expr [tresor_image_size_mb] / 2] } proc tresor_ft_size_mb { } { return [expr [tresor_image_size_mb] / 8] } proc benchmark_blk_count_base { } { if {[have_board virt_qemu_arm_v8a]} { return 6400; } else { return 12800; } } append build_components { core init timer server/vfs app/tresor_tester server/log_terminal server/report_rom lib/vfs_tresor_crypto_aes_cbc lib/vfs_tresor_trust_anchor lib/vfs_import lib/vfs_jitterentropy } append_if [have_board linux] build_components { server/lx_fs } append_if [have_board linux] build_components { server/lx_block } build $build_components create_boot_directory append config { } if {[have_board linux]} { append config { } } else { append config { } } append config { } install_config $config if {[have_board linux]} { exec rm -rf [local_tresor_image] if { [get_cmd_switch --autopilot] } { exec rm -rf [autopilot_tresor_image] catch { exec $dd if=/dev/urandom of=[autopilot_tresor_image] bs=1M count=[tresor_image_size_mb] } exec ln -sf -T [autopilot_tresor_image] [local_tresor_image] } else { catch { exec $dd if=/dev/urandom of=[local_tresor_image] bs=1M count=[tresor_image_size_mb] } } } append boot_modules { core init timer tresor_tester ld.lib.so log_terminal report_rom vfs libc.lib.so libcrypto.lib.so vfs.lib.so vfs_tresor_trust_anchor.lib.so vfs_tresor_crypto_aes_cbc.lib.so vfs_import.lib.so vfs_jitterentropy.lib.so } append_if [have_board linux] boot_modules { lx_fs } append_if [have_board linux] boot_modules [tresor_image_name] build_boot_image $boot_modules append qemu_args " -nographic -m 512 " run_genode_until "child \"test\" exited with exit value.*\n" 500 if { [get_cmd_switch --autopilot] } { exec rm -rf [local_tresor_image] exec rm -rf [autopilot_tresor_image] } grep_output {\[init\] child "test" exited with exit value} compare_output_to {[init] child "test" exited with exit value 0}