genode/repos/libports/run/ldso.run

147 lines
5.3 KiB
Plaintext
Raw Normal View History

build "core init test/ldso"
2011-12-22 16:19:25 +01:00
create_boot_directory
set config {
2011-12-22 16:19:25 +01:00
<config>
<parent-provides>
<service name="ROM"/>
<service name="CPU"/>
2011-12-22 16:19:25 +01:00
<service name="LOG"/>
<service name="PD"/>
2011-12-22 16:19:25 +01:00
</parent-provides>
<default-route>
<any-service> <parent/> </any-service>
</default-route>
<default caps="100"/>
2011-12-22 16:19:25 +01:00
<start name="test-ldso">
<resource name="RAM" quantum="2M"/>
<config ld_bind_now="no" ld_verbose="no">
<vfs> <dir name="dev"> <log/> </dir> </vfs>
<libc stdout="/dev/log"/>
</config>
2011-12-22 16:19:25 +01:00
</start>
</config>
}
install_config $config
set boot_modules {
core init test-ldso test-ldso_lib_1.lib.so
test-ldso_lib_2.lib.so test-ldso_lib_dl.lib.so
ld.lib.so libc.lib.so libm.lib.so
}
build_boot_image $boot_modules
2011-12-22 16:19:25 +01:00
append qemu_args "-nographic "
2011-12-22 16:19:25 +01:00
run_genode_until {child ".*" exited with exit value 123.*\n} 10
2011-12-22 16:19:25 +01:00
# pay only attention to the output of init and its children
grep_output {^\[init }
unify_output {\[init \-\> test\-ldso\] upgrading quota donation for .* \([0-9]+ bytes\)} ""
unify_output {ram_quota=[0-9]+} "ram_quota=UNIFIED"
Capability quota accounting and trading This patch mirrors the accounting and trading scheme that Genode employs for physical memory to the accounting of capability allocations. Capability quotas must now be explicitly assigned to subsystems by specifying a 'caps=<amount>' attribute to init's start nodes. Analogously to RAM quotas, cap quotas can be traded between clients and servers as part of the session protocol. The capability budget of each component is maintained by the component's corresponding PD session at core. At the current stage, the accounting is applied to RPC capabilities, signal-context capabilities, and dataspace capabilities. Capabilities that are dynamically allocated via core's CPU and TRACE service are not yet covered. Also, the capabilities allocated by resource multiplexers outside of core (like nitpicker) must be accounted by the respective servers, which is not covered yet. If a component runs out of capabilities, core's PD service prints a warning to the log. To observe the consumption of capabilities per component in detail, the PD service is equipped with a diagnostic mode, which can be enabled via the 'diag' attribute in the target node of init's routing rules. E.g., the following route enables the diagnostic mode for the PD session of the "timer" component: <default-route> <service name="PD" unscoped_label="timer"> <parent diag="yes"/> </service> ... </default-route> For subsystems based on a sub-init instance, init can be configured to report the capability-quota information of its subsystems by adding the attribute 'child_caps="yes"' to init's '<report>' config node. Init's own capability quota can be reported by adding the attribute 'init_caps="yes"'. Fixes #2398
2017-05-08 21:35:43 +02:00
unify_output {cap_quota=[0-9]+} "cap_quota=UNIFIED"
trim_lines
2011-12-22 16:19:25 +01:00
compare_output_to {
[init -> test-ldso] Lib_2_global 11223343
[init -> test-ldso] Lib_1_global_1 5060707
[init -> test-ldso] Lib_1_global_2 1020303
[init -> test-ldso] lib_1_attr_constructor_2 4030200f
[init -> test-ldso] lib_1_attr_constructor_1 8070604f
[init -> test-ldso] Global_1 5060707
[init -> test-ldso] Global_2 1020303
[init -> test-ldso] attr_constructor_2 4030200f
[init -> test-ldso] attr_constructor_1 8070604f
[init -> test-ldso]
[init -> test-ldso] Dynamic-linker test
[init -> test-ldso] ===================
[init -> test-ldso]
[init -> test-ldso] Global objects and local static objects of program
[init -> test-ldso] --------------------------------------------------
[init -> test-ldso] global_1 5060706
[init -> test-ldso] global_2 1020302
[init -> test-ldso] Local_1 5060707f
[init -> test-ldso] local_1 5060707e
[init -> test-ldso] Local_2 1020303f
[init -> test-ldso] local_2 1020303e
[init -> test-ldso] pod_1 8070604e
[init -> test-ldso] pod_2 4030200e
[init -> test-ldso]
[init -> test-ldso] Access shared lib from program
[init -> test-ldso] ------------------------------
[init -> test-ldso] lib_2_global 11223342
[init -> test-ldso] Lib_1_local_3 12345677
[init -> test-ldso] lib_1_local_3 12345676
[init -> test-ldso] lib_1_pod_1 8070604d
[init -> test-ldso] Libc::read:
[init -> test-ldso] Error: no plugin found for read(0)
[init -> test-ldso] Libc::abs(-10): 10
[init -> test-ldso]
[init -> test-ldso] Catch exceptions in program
[init -> test-ldso] ---------------------------
[init -> test-ldso] exception in remote procedure call:
Capability quota accounting and trading This patch mirrors the accounting and trading scheme that Genode employs for physical memory to the accounting of capability allocations. Capability quotas must now be explicitly assigned to subsystems by specifying a 'caps=<amount>' attribute to init's start nodes. Analogously to RAM quotas, cap quotas can be traded between clients and servers as part of the session protocol. The capability budget of each component is maintained by the component's corresponding PD session at core. At the current stage, the accounting is applied to RPC capabilities, signal-context capabilities, and dataspace capabilities. Capabilities that are dynamically allocated via core's CPU and TRACE service are not yet covered. Also, the capabilities allocated by resource multiplexers outside of core (like nitpicker) must be accounted by the respective servers, which is not covered yet. If a component runs out of capabilities, core's PD service prints a warning to the log. To observe the consumption of capabilities per component in detail, the PD service is equipped with a diagnostic mode, which can be enabled via the 'diag' attribute in the target node of init's routing rules. E.g., the following route enables the diagnostic mode for the PD session of the "timer" component: <default-route> <service name="PD" unscoped_label="timer"> <parent diag="yes"/> </service> ... </default-route> For subsystems based on a sub-init instance, init can be configured to report the capability-quota information of its subsystems by adding the attribute 'child_caps="yes"' to init's '<report>' config node. Init's own capability quota can be reported by adding the attribute 'init_caps="yes"'. Fixes #2398
2017-05-08 21:35:43 +02:00
[init -> test-ldso] Error: ROM-session creation failed (ram_quota=UNIFIED, cap_quota=UNIFIED, label="unknown_file")
[init -> test-ldso] Error: Could not open ROM session for "unknown_file"
[init -> test-ldso] caught
[init -> test-ldso] exception in program: caught
[init -> test-ldso] exception in shared lib: caught
[init -> test-ldso] exception in dynamic linker: caught
[init -> test-ldso]
[init -> test-ldso] global objects and local static objects of shared lib
[init -> test-ldso] -----------------------------------------------------
[init -> test-ldso] lib_1_global_1 5060706
[init -> test-ldso] lib_1_global_2 1020302
[init -> test-ldso] Lib_1_local_1 5060707f
[init -> test-ldso] lib_1_local_1 5060707e
[init -> test-ldso] Lib_1_local_2 1020303f
[init -> test-ldso] lib_1_local_2 1020303e
[init -> test-ldso] lib_1_pod_1 8070604e
[init -> test-ldso] lib_1_pod_2 4030200e
[init -> test-ldso]
[init -> test-ldso] Access shared lib from another shared lib
[init -> test-ldso] -----------------------------------------
[init -> test-ldso] lib_2_global 11223341
[init -> test-ldso] Lib_2_local 55667787
[init -> test-ldso] lib_2_local 55667786
[init -> test-ldso] lib_2_pod_1 87654320
[init -> test-ldso]
[init -> test-ldso] Catch exceptions in shared lib
[init -> test-ldso] ------------------------------
[init -> test-ldso] exception in lib: caught
[init -> test-ldso] exception in another shared lib: caught
[init -> test-ldso]
[init -> test-ldso] Test stack alignment
[init -> test-ldso] --------------------
[init -> test-ldso] <warning: unsupported format string argument>
[init -> test-ldso] <warning: unsupported format string argument>
[init -> test-ldso] <warning: unsupported format string argument>
[init -> test-ldso] <warning: unsupported format string argument>
[init -> test-ldso]
[init -> test-ldso] Dynamic cast
[init -> test-ldso] ------------
[init -> test-ldso] 'Object' called: good
[init -> test-ldso]
[init -> test-ldso] Shared-object API
[init -> test-ldso] -----------------
[init -> test-ldso] Global object constructed
[init -> test-ldso]
[init -> test-ldso] Destruction
[init -> test-ldso] -----------
[init -> test-ldso] ~Lib_2_local 55667785
[init -> test-ldso] ~Lib_1_local_2 1020303d
[init -> test-ldso] ~Lib_1_local_1 5060707d
[init -> test-ldso] ~Lib_1_local_3 12345675
[init -> test-ldso] ~Local_2 1020303d
[init -> test-ldso] ~Local_1 5060707d
[init -> test-ldso] attr_destructor_2 4030200d
[init -> test-ldso] attr_destructor_1 8070604c
[init -> test-ldso] ~Global_2 1020301
[init -> test-ldso] ~Global_1 5060705
[init -> test-ldso] ~Lib_1_global_2 1020301
[init -> test-ldso] ~Lib_1_global_1 5060705
[init -> test-ldso] ~Lib_2_global 11223340
2011-12-22 16:19:25 +01:00
}