# # \brief Test of Block session interface provided by server/part_blk # set parted [installed_command parted] # # Build # build { core init drivers/timer server/rom_blk server/part_blk server/report_rom test/blk/cli } set img_file ata.$mode.raw set img_path bin/$img_file if { ![file exists $img_path] } then { set block_count 20480 # create empty block device file catch { exec dd if=/dev/zero of=$img_path bs=512 count=$block_count } # create two primary partitions (one is extented) and two logical paritions puts "using parted to partition disk image" if { $mode == "mbr" } { exec $parted -s $img_path mklabel msdos exec $parted -s $img_path mkpart primary fat32 2048s 4095s exec $parted -s $img_path mkpart extended 4096s 20479s exec $parted -s $img_path mkpart logical fat32 6144s 10239s exec $parted -s $img_path mkpart logical fat32 12288s 20479s } else { exec $parted -s $img_path mklabel gpt exec $parted -s $img_path mkpart one fat32 2048s 4095s exec $parted -s $img_path mkpart two fat32 4096s 20446s } } create_boot_directory # # Generate config # append config { } if { $mode == "mbr" } { append config { } } else { append config { } } append config { } install_config $config # # Boot modules # append boot_modules { core ld.lib.so init timer rom_blk part_blk test-blk-cli report_rom } append boot_modules $img_file build_boot_image $boot_modules # # Qemu # append qemu_args " -nographic " run_genode_until "Tests finished successfully.*\n.*Tests finished successfully.*\n" 100 exec rm $img_path