2017-08-14 06:19:24 +00:00
|
|
|
build "core init test/libc_getenv"
|
2017-01-24 13:07:43 +00:00
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
install_config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="ROM"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</default-route>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2017-01-24 13:07:43 +00:00
|
|
|
<start name="test-libc_getenv">
|
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<config>
|
|
|
|
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
|
|
|
<libc stdout="/dev/log"/>
|
|
|
|
<arg value="test-libc_getenv"/>
|
|
|
|
<arg value="foo"/>
|
|
|
|
<arg value="bar"/>
|
|
|
|
<arg value="baz"/>
|
|
|
|
<env key="foo" value="bar"/>
|
|
|
|
<env key="bar" value="foo"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image {
|
2017-08-14 06:19:24 +00:00
|
|
|
core init test-libc_getenv
|
2017-05-14 19:55:57 +00:00
|
|
|
ld.lib.so libc.lib.so libm.lib.so posix.lib.so
|
2017-01-24 13:07:43 +00:00
|
|
|
}
|
|
|
|
|
2017-05-23 13:05:55 +00:00
|
|
|
append qemu_args " -nographic "
|
2017-01-24 13:07:43 +00:00
|
|
|
|
2017-08-14 06:19:24 +00:00
|
|
|
run_genode_until "child .* exited with exit value 0.*\n" 20
|
2017-01-24 13:07:43 +00:00
|
|
|
|
|
|
|
grep_output {\[init -\> test-libc_getenv\]}
|
|
|
|
|
|
|
|
compare_output_to {
|
|
|
|
[init -> test-libc_getenv] foo="bar"
|
|
|
|
[init -> test-libc_getenv] bar="foo"
|
|
|
|
[init -> test-libc_getenv] baz="(null)"
|
|
|
|
}
|