genode/repos/libports/recipes/pkg/test-libc_pipe/runtime
Emery Hemingway c51b4b5742 New VFS plugin for emulating POSIX pipes
Add a new plugin for creating pipes between pairs of VFS handles. It is
intended to replace the libc_pipe plugin, one of the last remaining libc
plugins.

In contrast to the libc_pipe plugin, this plugin defers cross-handle
notification until I/O signal handling rather than block and unblock
readers using a semaphore. This is a performance regression in the case
of multiple threads blocking on a pipe, but shall be an intermediate
mechanism pending renovations within the libc VFS and threading layers.
As a side effect, threads blocked on a pipe might not be resumed until
the main thread suspends and dispatches I/O signals.

The "test-libc_pipe" test has been adjusted to use the VFS pipe plugin
and tests both local pipes and pipes hosted remotely in the VFS server.

Merge adaptations (such as EOF handling, adjustment to VFS/libc
interface changes) by Norman Feske.

Fix #2303
2019-11-19 14:54:13 +01:00

74 lines
1.8 KiB
Plaintext

<runtime ram="32M" caps="1000" binary="init">
<events>
<timeout meaning="failed" sec="30" />
<log meaning="succeeded">child "sequence" exited with exit value 0</log>
<log meaning="failed">Error: </log>
</events>
<content>
<rom label="ld.lib.so"/>
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="posix.lib.so"/>
<rom label="sequence"/>
<rom label="test-libc_pipe"/>
<rom label="vfs"/>
<rom label="vfs.lib.so"/>
<rom label="vfs_pipe.lib.so"/>
</content>
<config>
<parent-provides>
<service name="ROM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="Timer"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="256"/>
<start name="pipes_fs">
<binary name="vfs"/>
<provides> <service name="File_system"/> </provides>
<resource name="RAM" quantum="4M"/>
<config>
<vfs> <pipe/> </vfs>
<default-policy root="/" writeable="yes"/>
</config>
</start>
<start name="sequence">
<resource name="RAM" quantum="4M"/>
<config>
<start name="libc_pipe_local">
<binary name="test-libc_pipe"/>
<config>
<vfs>
<dir name="dev">
<dir name="pipe"> <pipe/> </dir>
<log/>
</dir>
</vfs>
<libc stdout="/dev/log" stderr="/dev/log" pipe="/dev/pipe"/>
</config>
</start>
<start name="libc_pipe_remote">
<binary name="test-libc_pipe"/>
<config>
<vfs>
<dir name="dev">
<dir name="pipe"> <fs/> </dir>
<log/>
</dir>
</vfs>
<libc stdout="/dev/log" stderr="/dev/log" pipe="/dev/pipe"/>
</config>
</start>
</config>
</start>
</config>
</runtime>