mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 15:02:25 +00:00
b2bc5912c8
Issue #4860
288 lines
10 KiB
Plaintext
288 lines
10 KiB
Plaintext
assert_spec linux
|
|
|
|
#
|
|
# Check used commands
|
|
#
|
|
set dd [installed_command dd]
|
|
set sfdisk [installed_command sfdisk]
|
|
set sgdisk [installed_command sgdisk]
|
|
|
|
create_boot_directory
|
|
build {
|
|
core init timer lib/ld
|
|
server/lx_block
|
|
server/report_rom
|
|
app/block_tester
|
|
server/part_block
|
|
}
|
|
|
|
proc create_disk_image {number} {
|
|
global dd
|
|
global sfdisk
|
|
global sgdisk
|
|
|
|
catch { exec $dd if=/dev/zero of=bin/block$number.raw bs=1M count=0 seek=2048 }
|
|
|
|
if { $number == 0 } {
|
|
exec echo -e "2048 2097151 - -\n2099200 2095070 - -" | $sfdisk -f bin/block$number.raw
|
|
} else {
|
|
catch { exec $sgdisk --clear bin/block$number.raw }
|
|
catch { exec $sgdisk -n1:2048:2099199 -n2:2099200:4194270 bin/block$number.raw }
|
|
}
|
|
}
|
|
|
|
install_config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="IRQ"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="IO_PORT"/>
|
|
<service name="PD"/>
|
|
<service name="RM"/>
|
|
<service name="CPU"/>
|
|
<service name="LOG"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
|
|
<default caps="100"/>
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides><service name="Timer"/></provides>
|
|
</start>
|
|
|
|
<start name="block_report_rom">
|
|
<binary name="report_rom"/>
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
<config verbose="yes"/>
|
|
</start>
|
|
|
|
<start name="lx_block0" ld="no">
|
|
<binary name="lx_block"/>
|
|
<resource name="RAM" quantum="2G"/>
|
|
<provides><service name="Block"/></provides>
|
|
<config file="block0.raw" block_size="512" writeable="yes"/>
|
|
</start>
|
|
<start name="lx_block1" ld="no">
|
|
<binary name="lx_block"/>
|
|
<resource name="RAM" quantum="2G"/>
|
|
<provides><service name="Block"/></provides>
|
|
<config file="block1.raw" block_size="512" writeable="yes"/>
|
|
</start>
|
|
|
|
<start name="part_block0">
|
|
<binary name="part_block"/>
|
|
<resource name="RAM" quantum="10M" />
|
|
<provides><service name="Block" /></provides>
|
|
<route>
|
|
<service name="Report"><child name="block_report_rom"/></service>
|
|
<service name="Block"><child name="lx_block0"/></service>
|
|
<any-service><parent/><any-child/></any-service>
|
|
</route>
|
|
<config io_buffer="2M">
|
|
<report partitions="yes"/>
|
|
<policy label="block_tester0 -> " partition="1" writeable="yes"/>
|
|
<policy label="test-part0 -> " partition="2" writeable="yes" />
|
|
</config>
|
|
</start>
|
|
|
|
<start name="part_block1">
|
|
<binary name="part_block"/>
|
|
<resource name="RAM" quantum="10M" />
|
|
<provides><service name="Block" /></provides>
|
|
<route>
|
|
<service name="Report"><child name="block_report_rom"/></service>
|
|
<service name="Block"><child name="lx_block1"/></service>
|
|
<any-service><parent/><any-child/></any-service>
|
|
</route>
|
|
<config io_buffer="2M">
|
|
<report partitions="yes"/>
|
|
<policy label="block_tester1 -> " partition="1" writeable="yes"/>
|
|
<policy label="test-part1 -> " partition="2" writeable="yes" />
|
|
</config>
|
|
</start>
|
|
|
|
<start name="test-part0">
|
|
<binary name="block_tester" />
|
|
<resource name="RAM" quantum="32M" />
|
|
<config verbose="no" log="yes" stop_on_error="no">
|
|
<tests>
|
|
<sequential length="2M" size="256K" io_buffer="8M" batch="4"/>
|
|
</tests>
|
|
</config>
|
|
<route>
|
|
<service name="Block"><child name="part_block0"/></service>
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="block_tester0">
|
|
<binary name="block_tester" />
|
|
<resource name="RAM" quantum="32M"/>
|
|
<config verbose="yes" report="no" log="yes" stop_on_error="no">
|
|
<tests>
|
|
<!-- synchronous="no" 4K/8K currently leads to deadlocking ahci_drv -->
|
|
<sequential copy="no" length="16M" size="4K"/>
|
|
<sequential copy="no" length="16M" size="4K" batch="32"/>
|
|
<sequential copy="no" length="16M" size="4K" batch="1000"/>
|
|
|
|
<sequential copy="no" length="128M" size="8K"/>
|
|
<sequential copy="no" length="128M" size="8K" batch="32"/>
|
|
|
|
<sequential copy="no" length="128M" size="4K" write="yes"/>
|
|
|
|
<random length="128M" size="16K" seed="0xdeadbeef" batch="32"/>
|
|
<random length="512M" size="512K" seed="0xc0ffee" />
|
|
|
|
<ping_pong length="128M" size="16K"/>
|
|
<replay batch="10">
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="2048" count="1016"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="2048" count="1016"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="2048" count="1016"/>
|
|
<request type="read" lba="4096" count="1"/>
|
|
<request type="read" lba="51881" count="1"/>
|
|
<request type="read" lba="51890" count="1"/>
|
|
<request type="read" lba="114184" count="14"/>
|
|
<request type="read" lba="114198" count="1"/>
|
|
<request type="read" lba="114033" count="127"/>
|
|
<request type="read" lba="114160" count="24"/>
|
|
<request type="write" lba="0" count="1"/>
|
|
<request type="read" lba="12288" count="2048"/>
|
|
<request type="write" lba="4096" count="2048"/>
|
|
<request type="write" lba="0" count="1"/>
|
|
<request type="write" lba="2048" count="1"/>
|
|
<request type="write" lba="5696" count="1"/>
|
|
<request type="write" lba="5696" count="1"/>
|
|
<request type="write" lba="5696" count="1"/>
|
|
<request type="read" lba="4096" count="1"/>
|
|
<request type="read" lba="61440" count="16"/>
|
|
<request type="read" lba="158777" count="127"/>
|
|
<request type="write" lba="40960" count="2048"/>
|
|
<request type="write" lba="0" count="1"/>
|
|
<request type="write" lba="2073" count="1"/>
|
|
<request type="read" lba="190483" count="64"/>
|
|
<request type="read" lba="190411" count="53"/>
|
|
<request type="read" lba="190464" count="11"/>
|
|
<request type="read" lba="106074" count="64"/>
|
|
<request type="read" lba="105954" count="56"/>
|
|
<request type="read" lba="122802" count="24"/>
|
|
<request type="read" lba="123594" count="64"/>
|
|
<request type="read" lba="123722" count="64"/>
|
|
</replay>
|
|
</tests>
|
|
</config>
|
|
<route>
|
|
<service name="Block"><child name="part_block0"/></service>
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="test-part1">
|
|
<binary name="block_tester" />
|
|
<resource name="RAM" quantum="32M" />
|
|
<config verbose="no" log="yes" stop_on_error="no">
|
|
<tests>
|
|
<sequential length="2M" size="256K" io_buffer="8M" batch="4"/>
|
|
</tests>
|
|
</config>
|
|
<route>
|
|
<service name="Block"><child name="part_block1"/></service>
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="block_tester1">
|
|
<binary name="block_tester" />
|
|
<resource name="RAM" quantum="32M"/>
|
|
<config verbose="yes" report="no" log="yes" stop_on_error="no">
|
|
<tests>
|
|
<!-- synchronous="no" 4K/8K currently leads to deadlocking ahci_drv -->
|
|
<sequential copy="no" length="16M" size="4K"/>
|
|
<sequential copy="no" length="16M" size="4K" batch="32"/>
|
|
<sequential copy="no" length="16M" size="4K" batch="1000"/>
|
|
|
|
<sequential copy="no" length="128M" size="8K"/>
|
|
<sequential copy="no" length="128M" size="8K" batch="32"/>
|
|
<sequential copy="no" length="128M" size="4K" write="yes"/>
|
|
|
|
<random length="128M" size="16K" seed="0xdeadbeef" batch="32"/>
|
|
<random length="512M" size="512K" seed="0xc0ffee" />
|
|
|
|
<ping_pong length="128M" size="16K"/>
|
|
<replay batch="10">
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="2048" count="1016"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="2048" count="1016"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="0" count="1"/>
|
|
<request type="read" lba="2048" count="1016"/>
|
|
<request type="read" lba="4096" count="1"/>
|
|
<request type="read" lba="51881" count="1"/>
|
|
<request type="read" lba="51890" count="1"/>
|
|
<request type="read" lba="114184" count="14"/>
|
|
<request type="read" lba="114198" count="1"/>
|
|
<request type="read" lba="114033" count="127"/>
|
|
<request type="read" lba="114160" count="24"/>
|
|
<request type="write" lba="0" count="1"/>
|
|
<request type="read" lba="12288" count="2048"/>
|
|
<request type="write" lba="4096" count="2048"/>
|
|
<request type="write" lba="0" count="1"/>
|
|
<request type="write" lba="2048" count="1"/>
|
|
<request type="write" lba="5696" count="1"/>
|
|
<request type="write" lba="5696" count="1"/>
|
|
<request type="write" lba="5696" count="1"/>
|
|
<request type="read" lba="4096" count="1"/>
|
|
<request type="read" lba="61440" count="16"/>
|
|
<request type="read" lba="158777" count="127"/>
|
|
<request type="write" lba="40960" count="2048"/>
|
|
<request type="write" lba="0" count="1"/>
|
|
<request type="write" lba="2073" count="1"/>
|
|
<request type="read" lba="190483" count="64"/>
|
|
<request type="read" lba="190411" count="53"/>
|
|
<request type="read" lba="190464" count="11"/>
|
|
<request type="read" lba="106074" count="64"/>
|
|
<request type="read" lba="105954" count="56"/>
|
|
<request type="read" lba="122802" count="24"/>
|
|
<request type="read" lba="123594" count="64"/>
|
|
<request type="read" lba="123722" count="64"/>
|
|
</replay>
|
|
</tests>
|
|
</config>
|
|
<route>
|
|
<service name="Block"><child name="part_block1"/></service>
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
</route>
|
|
</start>
|
|
</config>}
|
|
|
|
create_disk_image 0
|
|
create_disk_image 1
|
|
|
|
build_boot_image [list {*}[build_artifacts] block0.raw block1.raw]
|
|
|
|
run_genode_until {.*--- all tests finished ---.*\n} 360
|
|
set serial_id [output_spawn_id]
|
|
run_genode_until {.*--- all tests finished ---.*\n} 360 $serial_id
|
|
run_genode_until {.*--- all tests finished ---.*\n} 360 $serial_id
|
|
run_genode_until {.*--- all tests finished ---.*\n} 360 $serial_id
|
|
|
|
exec rm -f bin/block0.raw bin/block1.raw
|