Use block_tester instead of test/block/client

Issue #4405
This commit is contained in:
Norman Feske 2022-02-04 14:12:34 +01:00
parent 76c090b694
commit 378e2d9e74
10 changed files with 113 additions and 60 deletions

View File

@ -1,3 +1,3 @@
_/src/init
_/src/lx_block
_/src/test-block
_/src/block_tester

View File

@ -3,14 +3,14 @@
<requires> <timer/> </requires>
<events>
<timeout meaning="failed" sec="100" />
<log meaning="succeeded">Done</log>
<timeout meaning="failed" sec="30" />
<log meaning="succeeded">child "block_tester" exited with exit value 0</log>
<log meaning="failed">Error: </log>
</events>
<content>
<rom label="ld.lib.so"/>
<rom label="test-block-bench"/>
<rom label="block_tester"/>
<rom label="lx_block.img"/>
<rom label="lx_block"/>
</content>
@ -37,8 +37,18 @@
<provides> <service name="Block"/> </provides>
<config file="lx_block.img" block_size="4K" writeable="yes"/>
</start>
<start name="test-block-bench">
<resource name="RAM" quantum="24M"/>
<start name="block_tester">
<binary name="block_tester"/>
<resource name="RAM" quantum="5M" />
<config verbose="no" log="yes" stop_on_error="no">
<tests>
<sequential length="256K" size="4K" io_buffer="128K" batch="4"/>
<sequential write="yes" length="256K" size="4K" io_buffer="128K" batch="4"/>
</tests>
</config>
<route>
<any-service> <child name="lx_block" /> <parent/> <any-child/> </any-service>
</route>
</start>
</config>
</runtime>

View File

@ -3,5 +3,5 @@ _/src/report_rom
_/src/part_block
_/src/vfs
_/src/vfs_block
_/src/test-block
_/src/block_tester
_/raw/test-part_block_gpt

View File

@ -5,8 +5,8 @@
<events>
<timeout meaning="failed" sec="70" />
<log meaning="succeeded">
--- all tests finished ---*
--- all tests finished ---
child "test-part*" exited with exit value 0*
child "test-part*" exited with exit value 0
</log>
<log meaning="failed">Error: </log>
</events>
@ -16,7 +16,7 @@
<rom label="vfs_block"/>
<rom label="vfs.lib.so"/>
<rom label="part_block"/>
<rom label="test-block-client"/>
<rom label="block_tester"/>
<rom label="report_rom"/>
<rom label="ata.gpt.raw"/>
</content>
@ -68,15 +68,25 @@
<config verbose="yes"/>
</start>
<start name="test-part1">
<binary name="test-block-client"/>
<binary name="block_tester"/>
<resource name="RAM" quantum="5M" />
<config verbose="no" log="yes" stop_on_error="no">
<tests>
<sequential length="32K" size="1K" io_buffer="128K" batch="4"/>
</tests>
</config>
<route>
<any-service> <child name="part_block" /> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-part2">
<binary name="test-block-client"/>
<binary name="block_tester"/>
<resource name="RAM" quantum="5M" />
<config verbose="no" log="yes" stop_on_error="no">
<tests>
<sequential length="256K" size="1K" io_buffer="128K" batch="4"/>
</tests>
</config>
<route>
<any-service> <child name="part_block" /> <parent/> <any-child/> </any-service>
</route>

View File

@ -3,5 +3,5 @@ _/src/report_rom
_/src/part_block
_/src/vfs
_/src/vfs_block
_/src/test-block
_/src/block_tester
_/raw/test-part_block_mbr

View File

@ -5,9 +5,9 @@
<events>
<timeout meaning="failed" sec="60" />
<log meaning="succeeded">
--- all tests finished ---*
--- all tests finished ---*
--- all tests finished ---
child "test-part*" exited with exit value 0*
child "test-part*" exited with exit value 0*
child "test-part*" exited with exit value 0
</log>
<log meaning="failed">Error: </log>
</events>
@ -17,7 +17,7 @@
<rom label="vfs_block"/>
<rom label="vfs.lib.so"/>
<rom label="part_block"/>
<rom label="test-block-client"/>
<rom label="block_tester"/>
<rom label="report_rom"/>
<rom label="ata.mbr.raw"/>
</content>
@ -70,22 +70,37 @@
<config verbose="yes"/>
</start>
<start name="test-part1">
<binary name="test-block-client"/>
<binary name="block_tester"/>
<resource name="RAM" quantum="5M" />
<config verbose="no" log="yes" stop_on_error="no">
<tests>
<sequential length="32K" size="1K" io_buffer="128K" batch="4"/>
</tests>
</config>
<route>
<any-service> <child name="part_block" /> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-part2">
<binary name="test-block-client"/>
<binary name="block_tester"/>
<resource name="RAM" quantum="5M" />
<config verbose="no" log="yes" stop_on_error="no">
<tests>
<sequential length="256K" size="1K" io_buffer="128K" batch="4"/>
</tests>
</config>
<route>
<any-service> <child name="part_block" /> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-part3">
<binary name="test-block-client"/>
<binary name="block_tester"/>
<resource name="RAM" quantum="5M" />
<config verbose="no" log="yes" stop_on_error="no">
<tests>
<sequential length="128K" size="1K" io_buffer="128K" batch="4"/>
</tests>
</config>
<route>
<any-service> <child name="part_block" /> <parent/> <any-child/> </any-service>
</route>

View File

@ -10,7 +10,7 @@ set build_components {
core init timer
drivers/ahci
server/report_rom
test/block/client
app/block_tester
}
source ${genode_dir}/repos/base/run/platform_drv.inc
@ -73,18 +73,27 @@ append config {
</route>
</start>
<start name="test-ahci">
<binary name="test-block-client" />
<binary name="block_tester" />
<resource name="RAM" quantum="50M" />
<config test_size="100M"></config>
<config verbose="no" report="no" log="yes" stop_on_error="no">
<tests>
<sequential length="8M" size="1M" io_buffer="8M" batch="4"/>
<sequential start="1000" write="yes" length="2M" size="1M" io_buffer="8M" batch="4"/>
</tests>
</config>
<route>
<service name="Block"><child name="ahci_drv"/></service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>
<start name="test-ahci-atapi">
<binary name="test-block-client" />
<binary name="block_tester" />
<resource name="RAM" quantum="50M" />
<config test_size="100M"></config>
<config verbose="no" report="no" log="yes" stop_on_error="no">
<tests>
<sequential length="1M" size="1M" io_buffer="8M" batch="4"/>
</tests>
</config>
<route>
<service name="Block"><child name="ahci_drv"/></service>
<any-service> <parent/> <any-child /> </any-service>
@ -97,7 +106,7 @@ install_config $config
#
# Boot modules
#
set boot_modules { core ld.lib.so init timer ahci_drv report_rom test-block-client }
set boot_modules { core ld.lib.so init timer ahci_drv report_rom block_tester }
append_platform_drv_boot_modules

View File

@ -30,9 +30,9 @@ set build_components {
core init timer
drivers/ahci
server/lx_block
server/report_rom
app/block_tester
server/part_block
test/block/client
}
source ${genode_dir}/repos/base/run/platform_drv.inc
@ -167,9 +167,13 @@ append config {
append config {
<start name="test-part0">
<binary name="test-block-client" />
<binary name="block_tester" />
<resource name="RAM" quantum="32M" />
<config test_size="64M" />
<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>
@ -251,9 +255,13 @@ append config {
append config {
<start name="test-part1">
<binary name="test-block-client" />
<binary name="block_tester" />
<resource name="RAM" quantum="32M" />
<config test_size="64M" />
<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>
@ -343,8 +351,8 @@ create_disk_image 1
# generic modules
set boot_modules {
core init timer ahci_drv block_tester
ld.lib.so test-block-client part_block
core init timer ahci_drv block_tester report_rom
ld.lib.so part_block
}
append_if $use_linux boot_modules {

View File

@ -1,11 +1,14 @@
assert_spec pbxa9
if {![have_board pbxa9]} {
puts "Test requires board pbxa9"
exit
}
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/init \
[depot_user]/src/platform_drv
build { drivers/sd_card test/block/client }
build { drivers/sd_card app/block_tester }
install_config {
<config>
@ -55,20 +58,19 @@ install_config {
</route>
</start>
<start name="test-block-client">
<resource name="RAM" quantum="1M" />
<route>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<any-service> <any-child/> </any-service>
</route>
<start name="block_tester">
<resource name="RAM" quantum="64M" />
<config verbose="no" report="no" log="yes" stop_on_error="no">
<tests>
<sequential length="16M" size="1M" io_buffer="8M" batch="4"/>
<sequential start="4000" write="yes" length="16M" size="1M" io_buffer="8M" batch="4"/>
</tests>
</config>
<route> <any-service> <any-child/> <parent/> </any-service> </route>
</start>
</config> }
build_boot_image { pl180_sd_card_drv test-block-client }
build_boot_image { pl180_sd_card_drv block_tester }
set disk_image "bin/sd_card.img"
if { [file exists $disk_image] == 0 } then {

View File

@ -9,8 +9,7 @@ set build_components {
drivers/usb_host
drivers/usb_block
server/report_rom
test/block/client
test/block/bench
app/block_tester
}
source ${genode_dir}/repos/base/run/platform_drv.inc
@ -92,21 +91,22 @@ append config {
<start name="usb_block_drv">
<resource name="RAM" quantum="4M"/>
<provides> <service name="Block"/> </provides>
<config report="yes"/>
<config report="yes" writeable="no"/>
<route>
<service name="Usb"> <child name="usb_drv"/> </service>
<service name="Report"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-usb">
<resource name="RAM" quantum="128M"/>
<binary name="test-block-bench"/>
<!--binary name="test-block-client"/-->
<config>
<libc stdout="/dev/log">
<vfs> <dir name="dev"> <log/> </dir> </vfs>
</libc>
<start name="block_tester">
<resource name="RAM" quantum="64M" />
<config verbose="no" report="no" log="yes" stop_on_error="no">
<tests>
<sequential length="8M" size="1M" io_buffer="8M" batch="4"/>
<!-- enable 'writeable="yes"' at usb_block_drv for write test -->
<!-- <sequential write="yes" start="4000" length="2M" size="1M" io_buffer="8M" batch="4"/> -->
</tests>
</config>
<route>
<service name="Block"> <child name="usb_block_drv"/> </service>
@ -123,8 +123,7 @@ install_config $config
# generic modules
set boot_modules {
core init timer report_rom usb_block_drv
test-block-client test-block-bench
core init timer report_rom usb_block_drv block_tester
ld.lib.so
}
@ -151,4 +150,4 @@ append qemu_args " -nographic -M pc -boot order=d "
append qemu_args " -drive if=none,id=disk,file=$disk_image,format=raw "
append qemu_args " -device usb-ehci,id=ehci -device usb-storage,bus=ehci.0,drive=disk "
run_genode_until {.*child "test-usb" exited with exit value 0.*} 100
run_genode_until {.*child "block_tester" exited with exit value 0.*} 100