bomb: limit generations on Linux

Limit the number of generations to 4 to prevent hitting the
socket-descriptor limit on Linux. Also, all possible configuration
parameters for bomb our now customizable in the run script and the
current config is logged by bomb master.
This commit is contained in:
Christian Helmuth 2016-11-10 10:16:14 +01:00
parent f4a7223bbf
commit ff5d28822c
2 changed files with 16 additions and 7 deletions

View File

@ -1,8 +1,11 @@
build "core init test/bomb drivers/timer"
set timeout 240
set rounds 20
set timeout 240
set rounds 20
set generations 6
set children 2
set sleep 1500
set demand [expr 1*1024*1024]
if {[have_include "power_on/qemu"]} {
append qemu_args "-nographic -m 128"
@ -12,6 +15,9 @@ if {[have_include "power_on/qemu"]} {
if {[have_spec foc_x86_64]} { set rounds 6 }
}
# prevent hitting the socket-descriptor limit on Linux
if {[have_spec linux]} { set generations 4 }
set config {
<config prio_levels="2">
<parent-provides>
@ -39,7 +45,8 @@ set config {
<resource name="RAM" quantum="2G"/>}
append config "
<config rounds=\"$rounds\" generations=\"6\" sleep=\"1500\"/>"
<config rounds=\"$rounds\" generations=\"$generations\"
children=\"$children\" sleep=\"$sleep\" demand=\"$demand\"/>"
append config {
</start>
@ -51,6 +58,4 @@ install_config $config
build_boot_image "core init bomb timer"
run_genode_until "Done\. Going to sleep\." $timeout
puts "Test succeeded."
run_genode_until {.*Done\. Going to sleep.*} $timeout

View File

@ -258,6 +258,10 @@ int main(int argc, char **argv)
unsigned long const demand = node.attribute_value("demand", 1024UL * 1024);
log("--- bomb started ---");
if (timer())
log("rounds=", rounds, " generations=", generation, " children=",
children, " sleep=", sleeptime, " demand=", demand/1024, "K");
/* connect to core's cap service used for creating parent capabilities */
Cap_connection cap;