mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 00:11:07 +00:00
aa66b5d62f
This patch adjusts the implementation of the base library and core such that the code no longer relies on deprecated APIs except for very few cases, mainly to keep those deprecated APIs in tact for now. The most prominent changes are: - Removing the use of base/printf.h - Removing of the log backend for printf. The 'Console' with the format-string parser is still there along with 'snprintf.h' because the latter is still used at a few places, most prominently the 'Connection' classes. - Removing the notion of a RAM session, which does not exist in Genode anymore. Still the types were preserved (by typedefs to PD session) to keep up compatibility. But this transition should come to an end now. - Slight rennovation of core's tracing service, e.g., the use of an Attached_dataspace as the Argument_buffer. - Reducing the reliance on global accessors like deprecated_env() or core_env(). Still there is a longish way to go to eliminate all such calls. A useful pattern (or at least a stop-gap solution) is to pass the 'Env' to the individual compilation units via init functions. - Avoiding the use of the old 'Child_policy::resolve_session_request' interface that returned a 'Service' instead of a 'Route'. Issue #1987
73 lines
1.3 KiB
Tcl
73 lines
1.3 KiB
Tcl
#
|
|
# \brief Test if global static constructors in hybrid applications and
|
|
# host shared libs get called
|
|
# \author Christian Prochaska
|
|
# \date 2011-11-24
|
|
#
|
|
|
|
#
|
|
# Build
|
|
#
|
|
|
|
build {
|
|
core init
|
|
test/lx_hybrid_ctors
|
|
}
|
|
|
|
create_boot_directory
|
|
|
|
#
|
|
# Generate config
|
|
#
|
|
|
|
install_config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="CPU"/>
|
|
<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-lx_hybrid_ctors" ld="no">
|
|
<resource name="RAM" quantum="1M"/>
|
|
</start>
|
|
</config>
|
|
}
|
|
|
|
#
|
|
# Boot modules
|
|
#
|
|
|
|
# generic modules
|
|
set boot_modules {
|
|
core ld.lib.so init
|
|
test-lx_hybrid_ctors
|
|
}
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
#
|
|
# Execute test case
|
|
#
|
|
|
|
run_genode_until {child "test-lx_hybrid_ctors" exited with exit value 0.*\n} 10
|
|
|
|
#
|
|
# Compare output
|
|
#
|
|
|
|
grep_output {\[init -\> test-lx_hybrid_ctors\]}
|
|
|
|
compare_output_to {
|
|
[init -> test-lx_hybrid_ctors] Global static constructor of host library called.
|
|
[init -> test-lx_hybrid_ctors] Global static constructor of Genode application called.
|
|
[init -> test-lx_hybrid_ctors] --- lx_hybrid global static constructor test ---
|
|
[init -> test-lx_hybrid_ctors] --- returning from main ---
|
|
}
|
|
|
|
# vi: set ft=tcl :
|