depot_autopilot: evaluate sets of test packages

This commit is contained in:
Martin Stein
2018-10-01 16:53:37 +02:00
committed by Christian Helmuth
parent 146f45f3d4
commit 2d041ac0fc
88 changed files with 2793 additions and 6513 deletions

View File

@@ -1,35 +0,0 @@
build "core init test/ds_ownership"
create_boot_directory
install_config {
<config verbose="yes">
<parent-provides>
<service name="ROM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<start name="test-ds_ownership" caps="100">
<resource name="RAM" quantum="10M"/>
<route><any-service><parent/></any-service></route>
<config verbose="yes">
<parent-provides>
<service name="ROM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
</config>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-ds_ownership"
append qemu_args "-nographic "
run_genode_until {.*test succeeded.*\n} 20

View File

@@ -1,58 +0,0 @@
#
# Build
#
build "core init test/fpu"
#
# Boot image
#
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<default caps="100"/>
<start name="test">
<binary name="test-fpu"/>
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-fpu"
#
# Execution
#
append qemu_args "-nographic "
run_genode_until "test done.*\n" 60
grep_output {^\[init -\> test\]}
compare_output_to {
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] FPU user started
[init -> test] test done
}

View File

@@ -1,41 +0,0 @@
#
# Build
#
build "core init test/mmio"
#
# Boot image
#
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<default caps="100"/>
<start name="test">
<binary name="test-mmio"/>
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-mmio"
#
# Execution
#
append qemu_args "-nographic "
run_genode_until "child \"test\" exited with exit value 0" 20

View File

@@ -1,82 +0,0 @@
build "core init test/new_delete"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="LOG"/>
<service name="ROM"/>
<service name="CPU"/>
<service name="PD"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<default caps="100"/>
<start name="test-new_delete">
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-new_delete"
append qemu_args "-nographic "
run_genode_until "Test done.*\n" 20
grep_output {^\[init -> test-new_delete\]}
compare_output_to {
[init -> test-new_delete] Allocator::alloc()
[init -> test-new_delete] A
[init -> test-new_delete] C
[init -> test-new_delete] B
[init -> test-new_delete] D
[init -> test-new_delete] E
[init -> test-new_delete] ~E
[init -> test-new_delete] ~D
[init -> test-new_delete] ~B
[init -> test-new_delete] ~C
[init -> test-new_delete] ~A
[init -> test-new_delete] Allocator::free()
[init -> test-new_delete] Allocator::alloc()
[init -> test-new_delete] A
[init -> test-new_delete] C
[init -> test-new_delete] B
[init -> test-new_delete] D
[init -> test-new_delete] E
[init -> test-new_delete] throw exception
[init -> test-new_delete] ~D
[init -> test-new_delete] ~B
[init -> test-new_delete] ~C
[init -> test-new_delete] ~A
[init -> test-new_delete] Allocator::free()
[init -> test-new_delete] exception caught
[init -> test-new_delete] Allocator::alloc()
[init -> test-new_delete] A
[init -> test-new_delete] C
[init -> test-new_delete] B
[init -> test-new_delete] D
[init -> test-new_delete] E
[init -> test-new_delete] ~E
[init -> test-new_delete] ~D
[init -> test-new_delete] ~B
[init -> test-new_delete] ~C
[init -> test-new_delete] ~A
[init -> test-new_delete] Allocator::free()
[init -> test-new_delete] Allocator::alloc()
[init -> test-new_delete] A
[init -> test-new_delete] C
[init -> test-new_delete] B
[init -> test-new_delete] D
[init -> test-new_delete] E
[init -> test-new_delete] throw exception
[init -> test-new_delete] ~D
[init -> test-new_delete] ~B
[init -> test-new_delete] ~C
[init -> test-new_delete] ~A
[init -> test-new_delete] Allocator::free()
[init -> test-new_delete] exception caught
}

View File

@@ -1,67 +0,0 @@
build "core init test/reconstructible"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="test-reconstructible">
<resource name="RAM" quantum="1M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-reconstructible"
append qemu_args "-nographic "
run_genode_until {.*--- Reconstructible utility test finished ---.*\n} 20
grep_output {-> test-reconstructible}
compare_output_to {
[init -> test-reconstructible] --- Reconstructible utility test ---
[init -> test-reconstructible] construct Object 1
[init -> test-reconstructible] construct Object 2
[init -> test-reconstructible] create Compound object
[init -> test-reconstructible] construct Member_with_reference
[init -> test-reconstructible] construct Compound
[init -> test-reconstructible] compound.member.constructed returns 1
[init -> test-reconstructible] compound.lazy_member.constructed returns 0
[init -> test-reconstructible] construct lazy member
[init -> test-reconstructible] construct Member_with_reference
[init -> test-reconstructible] compound.lazy_member.constructed returns 1
[init -> test-reconstructible] call method on member (with reference to Object 1)
[init -> test-reconstructible] const method called on Object 1
[init -> test-reconstructible] reconstruct member with Object 2 as reference
[init -> test-reconstructible] destruct Member_with_reference
[init -> test-reconstructible] construct Member_with_reference
[init -> test-reconstructible] call method on member
[init -> test-reconstructible] const method called on Object 2
[init -> test-reconstructible] destruct member
[init -> test-reconstructible] destruct Member_with_reference
[init -> test-reconstructible] try to call method on member, catch exception
[init -> test-reconstructible] got exception, as expected
[init -> test-reconstructible] destruct Compound and Objects 1 and 2
[init -> test-reconstructible] destruct Compound
[init -> test-reconstructible] destruct Member_with_reference
[init -> test-reconstructible] destruct Object 2
[init -> test-reconstructible] destruct Object 1
[init -> test-reconstructible] construct Throwing object
[init -> test-reconstructible] construct Throwing -> don't throw
[init -> test-reconstructible] destruct Throwing
[init -> test-reconstructible] construct Throwing -> throw exception
[init -> test-reconstructible] got exception, as expected
[init -> test-reconstructible] --- Reconstructible utility test finished ---
}

View File

@@ -1,27 +0,0 @@
build "core init test/registry"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="LOG"/>
<service name="PD"/>
<service name="CPU"/>
<service name="ROM"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<default caps="50"/>
<start name="test-registry">
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-registry"
append qemu_args "-nographic "
run_genode_until ".*child \"test-registry\" exited with exit value 0.*\n" 20

View File

@@ -1,47 +0,0 @@
if {[have_spec linux]} {
puts "Platform does not support managed dataspaces"; exit }
#
# We skip the non-executable fault test on platforms where this functionality
# is not supported.
#
proc non_executable_supported { } {
if {[have_spec hw] && [have_spec x86_64]} { return true }
if {[have_spec hw] && [have_spec arm]} { return true }
if {[have_spec nova] && [have_spec x86_64]} { return true }
if {[have_spec foc] && [have_spec x86_64]} { return true }
if {[have_spec foc] && [have_spec arm]} { return true }
if {[have_spec sel4] && [have_spec arm]} { return true }
return false
}
build "core init test/rm_fault"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<start name="test-rm_fault" caps="110">
<resource name="RAM" quantum="10M"/>
<config executable_fault_test="} [non_executable_supported] {"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-rm_fault"
append qemu_args "-nographic "
run_genode_until {child "test-rm_fault" exited with exit value 0.*} 300

View File

@@ -1,34 +0,0 @@
if {[have_spec linux]} {
puts "Platform does not support managed dataspaces"; exit }
build "core init test/rm_nested"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<default caps="100"/>
<start name="test-rm_nested">
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-rm_nested"
append qemu_args "-nographic "
run_genode_until ".*--- finished nested region map test ---.*\n" 300
grep_output {(Error)}
compare_output_to {}

View File

@@ -1,39 +0,0 @@
build "core init test/synced_interface"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="test-synced_interface">
<resource name="RAM" quantum="1M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-synced_interface"
append qemu_args "-nographic "
run_genode_until {.*--- Synced interface test finished ---.*\n} 20
grep_output {-> test-synced_interface}
compare_output_to {
[init -> test-synced_interface] --- Synced interface test ---
[init -> test-synced_interface] lock
[init -> test-synced_interface] adding 13 + 14
[init -> test-synced_interface] unlock
[init -> test-synced_interface] result is 27
[init -> test-synced_interface] --- Synced interface test finished ---
}

View File

@@ -1,85 +0,0 @@
build "core init test/xml_generator"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="LOG"/>
<service name="CPU"/>
<service name="RM"/>
<service name="PD"/>
</parent-provides>
<default-route>
<any-service> <any-child/> <parent/> </any-service>
</default-route>
<default caps="100"/>
<start name="test-xml_generator">
<resource name="RAM" quantum="1M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-xml_generator"
append qemu_args "-nographic "
run_genode_until "--- XML generator test finished ---.*\n" 30
grep_output {^\[init -> test-xml_generator}
compare_output_to {
[init -> test-xml_generator] --- XML generator test started ---
[init -> test-xml_generator]
[init -> test-xml_generator] used 308 bytes, result:
[init -> test-xml_generator]
[init -> test-xml_generator] <config xpos="27" ypos="34">
[init -> test-xml_generator] <box width="320" height="240"/>
[init -> test-xml_generator] <label name="a test">
[init -> test-xml_generator] <sub_label/>
[init -> test-xml_generator] <another_sub_label>
[init -> test-xml_generator] <sub_sub_label/>
[init -> test-xml_generator] </another_sub_label>
[init -> test-xml_generator] </label>
[init -> test-xml_generator] <bool true="true" false="false"/>
[init -> test-xml_generator] <signed int="-1" long="-2" longlong="-3"/>
[init -> test-xml_generator] <unsigned int="1" long="2" longlong="3"/>
[init -> test-xml_generator] </config>
[init -> test-xml_generator]
[init -> test-xml_generator] buffer exceeded (expected error)
[init -> test-xml_generator]
[init -> test-xml_generator] exception with value 10 on level 4 (expected error)
[init -> test-xml_generator] exception with value 20 on level 8 (expected error)
[init -> test-xml_generator] exception with value 30 on level 4 (expected error)
[init -> test-xml_generator] exception with value 11 on level 4 (expected error)
[init -> test-xml_generator] exception with value 21 on level 8 (expected error)
[init -> test-xml_generator] exception with value 31 on level 4 (expected error)
[init -> test-xml_generator] exception with value 12 on level 4 (expected error)
[init -> test-xml_generator] exception with value 22 on level 8 (expected error)
[init -> test-xml_generator] exception with value 32 on level 4 (expected error)
[init -> test-xml_generator] exception with value 40 on level 2 (expected error)
[init -> test-xml_generator]
[init -> test-xml_generator] used 419 bytes, result:
[init -> test-xml_generator]
[init -> test-xml_generator] <config>
[init -> test-xml_generator] <level1>
[init -> test-xml_generator] <level2 attr1="2271560481">
[init -> test-xml_generator] <level3 attr1="Hallo" attr2="123000">
[init -> test-xml_generator] <level4_1 attr1="true" attr2="Welt"/>
[init -> test-xml_generator] <level4_2/>
[init -> test-xml_generator] </level3>
[init -> test-xml_generator] <level3 attr1="Hallo" attr2="123001">
[init -> test-xml_generator] <level4_1 attr1="true" attr2="Welt"/>
[init -> test-xml_generator] <level4_2/>
[init -> test-xml_generator] </level3>
[init -> test-xml_generator] <level3 attr1="Hallo" attr2="123002">
[init -> test-xml_generator] <level4_1 attr1="true" attr2="Welt"/>
[init -> test-xml_generator] <level4_2/>
[init -> test-xml_generator] </level3>
[init -> test-xml_generator] </level2>
[init -> test-xml_generator] </level1>
[init -> test-xml_generator] </config>
[init -> test-xml_generator]
[init -> test-xml_generator] --- XML generator test finished ---
}

View File

@@ -1,135 +0,0 @@
build "core init test/xml_node"
create_boot_directory
install_config {
<config>
<parent-provides>
<service name="LOG"/>
<service name="CPU"/>
<service name="ROM"/>
<service name="PD"/>
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<default caps="100"/>
<start name="test-xml_node">
<resource name="RAM" quantum="10M"/>
</start>
</config>
}
build_boot_image "core ld.lib.so init test-xml_node"
append qemu_args "-nographic "
run_genode_until {.*child "test-xml_node" exited with exit value 0.*\n} 20
# pay only attention to the output of init and its children
grep_output {^\[init \-\> test\-xml_node\]}
trim_lines
compare_output_to {
[init -> test-xml_node] --- XML-token test ---
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="<"
[init -> test-xml_node] token type="IDENT", len=6, content="config"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content=">"
[init -> test-xml_node] token type="WHITESPACE", len=2, content=" "
[init -> test-xml_node] token type="IDENT", len=9, content="sometext1"
[init -> test-xml_node] token type="WHITESPACE", len=2, content=" "
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="<"
[init -> test-xml_node] token type="IDENT", len=7, content="program"
[init -> test-xml_node] token type="WHITESPACE", len=1, content=" "
[init -> test-xml_node] token type="IDENT", len=4, content="attr"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="="
[init -> test-xml_node] token type="STRING", len=6, content=""abcd""
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="/"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content=">"
[init -> test-xml_node] token type="WHITESPACE", len=2, content=" "
[init -> test-xml_node] token type="IDENT", len=9, content="sometext2"
[init -> test-xml_node] token type="WHITESPACE", len=2, content=" "
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="<"
[init -> test-xml_node] token type="IDENT", len=7, content="program"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content=">"
[init -> test-xml_node] token type="IDENT", len=9, content="inProgram"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="<"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="/"
[init -> test-xml_node] token type="IDENT", len=7, content="program"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content=">"
[init -> test-xml_node] token type="WHITESPACE", len=2, content=" "
[init -> test-xml_node] token type="IDENT", len=9, content="sometext3"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="<"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content="/"
[init -> test-xml_node] token type="IDENT", len=6, content="config"
[init -> test-xml_node] token type="SINGLECHAR", len=1, content=">"
[init -> test-xml_node] --- XML-parser test ---
[init -> test-xml_node] -- Test valid XML structure --
[init -> test-xml_node] XML node: name = "config", number of subnodes = 3
[init -> test-xml_node] XML node: name = "program", number of subnodes = 2
[init -> test-xml_node] XML node: name = "filename", leaf content = "init"
[init -> test-xml_node] XML node: name = "quota", leaf content = "16M"
[init -> test-xml_node] XML node: name = "program", number of subnodes = 2
[init -> test-xml_node] XML node: name = "filename", leaf content = "timer"
[init -> test-xml_node] XML node: name = "quota", leaf content = "64K"
[t] child "client" exited with exit value 0init -> test-xml_node] XML node: name = "program", number of subnodes = 2
[init -> test-xml_node] XML node: name = "filename", leaf content = "framebuffer"
[init -> test-xml_node] XML node: name = "quota", leaf content = "8M"
[init -> test-xml_node]
[init -> test-xml_node] -- Test invalid XML structure (broken tag) --
[init -> test-xml_node] XML node: name = "config", number of subnodes = 3
[init -> test-xml_node] XML node: name = "program", number of subnodes = 2
[init -> test-xml_node] XML node: name = "filename", leaf content = "init"
[init -> test-xml_node] XML node: name = "quota", leaf content = "16M"
[init -> test-xml_node] XML node: name = "program", number of subnodes = 2
[init -> test-xml_node] XML node: name = "filename", leaf content = "timer"
[init -> test-xml_node] XML node: name = "quota", leaf content = "64K"
[init -> test-xml_node] XML node: name = "program", number of subnodes = 2
[init -> test-xml_node] XML node: name = "filename", leaf content = "framebuffer"
[init -> test-xml_node] XML node: name = "quota", leaf content = "8M"
[init -> test-xml_node]
[init -> test-xml_node] -- Test invalid XML structure (truncated) --
[init -> test-xml_node] string has invalid XML syntax
[init -> test-xml_node]
[init -> test-xml_node] -- Test invalid XML structure (truncated comment) --
[init -> test-xml_node] string has invalid XML syntax
[init -> test-xml_node]
[init -> test-xml_node] -- Test invalid XML structure (unfinished string) --
[init -> test-xml_node] string has invalid XML syntax
[init -> test-xml_node]
[init -> test-xml_node] -- Test node access by key --
[init -> test-xml_node] content of sub node "filename" = "init"
[init -> test-xml_node] content of sub node "quota" = "16M"
[init -> test-xml_node] sub node "info" is not defined
[init -> test-xml_node]
[init -> test-xml_node] -- Test access to XML attributes --
[init -> test-xml_node] XML node: name = "config", number of subnodes = 3
[init -> test-xml_node] attribute name="priolevels", value="4"
[init -> test-xml_node] XML node: name = "program", number of subnodes = 2
[init -> test-xml_node] XML node: name = "filename", leaf content = "init"
[init -> test-xml_node] XML node: name = "quota", leaf content = "16M"
[init -> test-xml_node] XML node: name = "single-tag", leaf content = ""
[init -> test-xml_node] XML node: name = "single-tag-with-attr", leaf content = ""
[init -> test-xml_node] attribute name="name", value="ein_name"
[init -> test-xml_node] attribute name="quantum", value="2K"
[init -> test-xml_node]
[init -> test-xml_node] -- Test parsing XML with nodes mixed with text --
[init -> test-xml_node] XML node: name = "config", number of subnodes = 2
[init -> test-xml_node] XML node: name = "program", leaf content = ""
[init -> test-xml_node] attribute name="attr", value="abcd"
[init -> test-xml_node] XML node: name = "program", leaf content = "inProgram"
[init -> test-xml_node]
[init -> test-xml_node] -- Test parsing XML with comments --
[init -> test-xml_node] XML node: name = "config", number of subnodes = 2
[init -> test-xml_node] XML node: name = "visible-tag", leaf content = ""
[init -> test-xml_node] XML node: name = "visible-tag", leaf content = ""
[init -> test-xml_node]
[init -> test-xml_node] -- Test exporting decoded content from XML node --
[init -> test-xml_node] step 1
[init -> test-xml_node] step 2
[init -> test-xml_node] step 3
[init -> test-xml_node] step 4
[init -> test-xml_node] step 5
[init -> test-xml_node]
[init -> test-xml_node] --- End of XML-parser test ---
}