mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-29 01:58:55 +00:00
b1b83f4d6d
Process I/O packets in batches. If a batch is processed and there are still packets pending, send a signal locally to the packet handler and return to the entrypoint signal dispatcher. This prevents clients from starving each other, which happens when a client continuously submits packets at a faster rate than the server can process. Fix #2900
102 lines
2.0 KiB
Plaintext
102 lines
2.0 KiB
Plaintext
#
|
|
# \brief Test of packet handling and signal scheduling
|
|
# \author Emery Hemingway
|
|
# \date 2018-07-03
|
|
#
|
|
|
|
if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"]} {
|
|
puts "Running fs_packet test in autopilot on Qemu is not recommended.\n"
|
|
exit
|
|
}
|
|
|
|
#
|
|
# Build
|
|
#
|
|
set build_components {
|
|
app/sequence
|
|
lib/vfs/jitterentropy
|
|
server/vfs
|
|
test/fs_packet
|
|
}
|
|
|
|
build $build_components
|
|
|
|
create_boot_directory
|
|
|
|
import_from_depot \
|
|
genodelabs/src/[base_src] \
|
|
genodelabs/src/init \
|
|
|
|
#
|
|
# Generate config
|
|
#
|
|
append config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="IRQ"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="IO_PORT"/>
|
|
<service name="CPU"/>
|
|
<service name="LOG"/>
|
|
<service name="PD"/>
|
|
<service name="ROM"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
<default caps="100"/>
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides> <service name="Timer"/> </provides>
|
|
</start>
|
|
<start name="vfs">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides> <service name="File_system"/> </provides>
|
|
<config>
|
|
<vfs> <jitterentropy name="test"/> </vfs>
|
|
<default-policy root="/" writeable="yes"/>
|
|
</config>
|
|
</start>
|
|
<start name="long-test">
|
|
<binary name="test-fs_packet"/>
|
|
<resource name="RAM" quantum="2M"/>
|
|
<config count="1024"/>
|
|
</start>
|
|
<start name="short-test">
|
|
<binary name="sequence"/>
|
|
<resource name="RAM" quantum="4M"/>
|
|
<config>
|
|
<start name="a">
|
|
<binary name="test-fs_packet"/>
|
|
<resource name="RAM" quantum="2M"/>
|
|
<config count="64"/>
|
|
</start>
|
|
<start name="b">
|
|
<binary name="test-fs_packet"/>
|
|
<resource name="RAM" quantum="2M"/>
|
|
<config count="64"/>
|
|
</start>
|
|
</config>
|
|
</start>
|
|
</config>
|
|
}
|
|
|
|
install_config $config
|
|
|
|
#
|
|
# Boot modules
|
|
#
|
|
set boot_modules {
|
|
sequence
|
|
test-fs_packet
|
|
vfs
|
|
vfs.lib.so
|
|
vfs_jitterentropy.lib.so
|
|
}
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
append qemu_args " -nographic"
|
|
|
|
run_genode_until {child "short-test" exited with exit value 0} 60
|