X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c405aa8f8e373531b1f3cb8f7e2e4dfe59e188bb..498f97c6a9dba4c63ba605da7c7df669bffa96bf:/tools/simgrid-monkey diff --git a/tools/simgrid-monkey b/tools/simgrid-monkey index d2f627344d..c5699eaa8f 100755 --- a/tools/simgrid-monkey +++ b/tools/simgrid-monkey @@ -1,6 +1,6 @@ #! /usr/bin/env python3 -# The goal is to introduce random failures in a simulation, to test simgrid under extreme conditions. +# The goal is to introduce random failures in a simulation, to test SimGrid under extreme conditions. # # It is made of several components. # @@ -13,15 +13,15 @@ # Kill the link #0 after 42 seconds (using a kernel::Timer) # # * a python script: tools/simgrid-monkey (this file) -# * It takes a regular simgrid simulation as a parameter, use the cmonkey plugin to get the information about it, +# * It takes a regular SimGrid simulation as a parameter, use the cmonkey plugin to get the information about it, # and then restart many runs, with one resource being turn_off() + turn_on() in each run. # * Each resource gets killed between each timestamps, and on each timestamp. # * So the amount of simulations is: 1 + (host_c+link_c) * timestamps * 2 # # * Test program, written to resist these extreme conditions: -# * teshsuite/s4u/monkey-masterworkers: tests synchronous comms and execs +# * teshsuite/s4u/monkey-masterworkers: tests synchronous comms and execs (C++ and python) +# * teshsuite/s4u/monkey-semaphore: tests async semaphores (C++ only) -import multiprocessing as mp import sys import os import argparse @@ -65,7 +65,7 @@ def get_info(cmd): #print(f"hosts:{host_count} links:{link_count} timestamps:{' '.join(([str(i) for i in timestamps]))}") return (host_count, link_count, timestamps) -parser = argparse.ArgumentParser(description='Run a simgrid simulation, and turn off/on resources at random.') +parser = argparse.ArgumentParser(description='Run a SimGrid simulation, and turn off/on resources at random.') parser.add_argument('--valgrind', help="Run the simulations in valgrind") parser.add_argument('command', nargs='*') args = parser.parse_args() @@ -110,7 +110,6 @@ def do_run(cmd, extra_params, test_todo): def doit(): prev_time = 0 - test_count = 0 test_todo = 2 * len(timestamps) * (host_count + link_count) for pos in range(len(timestamps)): now = timestamps[pos]