From 0826c6daac070f8855db813875d4f5dc99a095d6 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 21 Mar 2020 09:40:49 +0530 Subject: [PATCH] part_block: benchmark test Ref #3705 --- repos/os/run/part_block_bench.run | 142 ++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 repos/os/run/part_block_bench.run diff --git a/repos/os/run/part_block_bench.run b/repos/os/run/part_block_bench.run new file mode 100644 index 000000000..c93e56be4 --- /dev/null +++ b/repos/os/run/part_block_bench.run @@ -0,0 +1,142 @@ +set dd [installed_command dd] +set sgdisk [installed_command sgdisk] + +# +# Build +# +set build_components { + core init timer + app/sequence + server/part_block + server/rom_block + test/block/bench +} + +build $build_components + +create_boot_directory + +set partition_blocks 8192 + +# create empty block device file +catch { exec $dd if=/dev/zero of=bin/gpt.raw bs=512 count=[expr $partition_blocks*5+2082]} + +# create paritions +puts "using sgdisk to partition disk image" + catch { exec $sgdisk -o \ + -n 1:2048:[expr 2048+$partition_blocks*1-1] \ + -n 2:[expr 2048+$partition_blocks*1]:[expr 2048+$partition_blocks*2-1] \ + -n 3:[expr 2048+$partition_blocks*2]:[expr 2048+$partition_blocks*3-1] \ + -n 4:[expr 2048+$partition_blocks*3]:[expr 2048+$partition_blocks*4-1] \ + -n 5:[expr 2048+$partition_blocks*4]:[expr 2048+$partition_blocks*5-1] \ + bin/gpt.raw } + +# +# Generate config +# +set config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + +install_config $config + +# +# Boot modules +# +set boot_modules { + core ld.lib.so init timer + part_block rom_block test-block-bench sequence + gpt.raw +} + +build_boot_image $boot_modules + +append qemu_args " -nographic" + +run_genode_until forever + +file delete bin/gpt.raw