examples/msg/mc/bugged2_liveness
examples/msg/mc/bugged2_stateful
examples/msg/mc/bugged3
-examples/msg/mc/centralized
+examples/msg/mc/centralized_mutex
examples/msg/mc/centralized_liveness
examples/msg/mc/electric_fence
examples/msg/mc/test/snapshot_comparison1
-if(HAVE_MC)
- add_executable (centralized centralized_mutex.c)
- target_link_libraries(centralized simgrid)
- add_executable (bugged1 bugged1.c)
- target_link_libraries(bugged1 simgrid)
- add_executable (bugged2 bugged2.c)
- target_link_libraries(bugged2 simgrid)
- add_executable (bugged3 bugged3.c)
- target_link_libraries(bugged3 simgrid)
- add_executable (electric_fence electric_fence.c)
- target_link_libraries(electric_fence simgrid)
- add_executable (bugged1_liveness bugged1_liveness.c)
- target_link_libraries(bugged1_liveness simgrid)
- add_executable (bugged2_liveness bugged2_liveness.c)
- target_link_libraries(bugged2_liveness simgrid)
+foreach (x bugged1 bugged2 bugged3 centralized_mutex electric_fence bugged1_liveness bugged2_liveness)
+ if(HAVE_MC)
+ add_executable (${x} ${x}.c)
+ target_link_libraries(${x} simgrid)
+ endif()
+ set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c)
+ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/deploy_${x}.xml)
+endforeach()
+if(HAVE_MC)
if(HAVE_C_STACK_CLEANER)
add_executable (bugged1_liveness_cleaner_on bugged1_liveness.c)
target_link_libraries(bugged1_liveness_cleaner_on simgrid)
endif()
endif()
-set(tesh_files
- ${tesh_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_visited.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_sparse.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_visited_sparse.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/centralized.tesh
- PARENT_SCOPE)
-set(xml_files
- ${xml_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged1_liveness.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged1_liveness_visited.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged1.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged2_liveness.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged2.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged3.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_electric_fence.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/deploy_mutex.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/platform.xml
- PARENT_SCOPE)
-set(examples_src
- ${examples_src}
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_liveness.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged3.c
- ${CMAKE_CURRENT_SOURCE_DIR}/electric_fence.c
- ${CMAKE_CURRENT_SOURCE_DIR}/centralized_mutex.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.h
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_liveness.h
- PARENT_SCOPE)
-set(bin_files
- ${bin_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged1_liveness
- ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged2_liveness
- ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_stack_cleaner
- PARENT_SCOPE)
+set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_visited.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_sparse.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_visited_sparse.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/centralized_mutex.tesh PARENT_SCOPE)
+set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged1_liveness_visited.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/platform.xml PARENT_SCOPE)
+set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_liveness.h PARENT_SCOPE)
+set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged1_liveness
+ ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged2_liveness
+ ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_stack_cleaner PARENT_SCOPE)
XBT_LOG_NEW_DEFAULT_CATEGORY(example, "this example");
-int server(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-
-int server(int argc, char *argv[])
+static int server(int argc, char *argv[])
{
msg_task_t task = NULL;
int count = 0;
return 0;
}
-int client(int argc, char *argv[])
+static int client(int argc, char *argv[])
{
-
- msg_task_t task =
- MSG_task_create(argv[1], 0 /*comp cost */ , 10000 /*comm size */ ,
- NULL /*arbitrary data */ );
+ msg_task_t task = MSG_task_create(argv[1], 0 /*comp cost */ , 10000 /*comm size */ , NULL /*arbitrary data */ );
MSG_task_send(task, "mymailbox");
int main(int argc, char *argv[])
{
-
MSG_init(&argc, argv);
MSG_create_environment("platform.xml");
MSG_function_register("server", server);
-
MSG_function_register("client", client);
-
MSG_launch_application("deploy_bugged1.xml");
MSG_main();
-
return 0;
-
}
}
#endif
-int coordinator(int argc, char *argv[])
+static int coordinator(int argc, char *argv[])
{
int CS_used = 0;
msg_task_t task = NULL, answer = NULL;
answer = NULL;
}
}
- } else {
+ } else {
if (!xbt_dynar_is_empty(requests)) {
XBT_INFO("CS release. Grant to queued requests (queue size: %lu)", xbt_dynar_length(requests));
xbt_dynar_shift(requests, &req);
kind = NULL;
req = NULL;
}
-
return 0;
}
-int client(int argc, char *argv[])
+static int client(int argc, char *argv[])
{
int my_pid = MSG_process_get_PID(MSG_process_self());
release = NULL;
MSG_process_sleep(my_pid);
-
+
if(strcmp(my_mailbox, "1") == 0){
cs=0;
r=0;
}
}
-
return 0;
}
int main(int argc, char *argv[])
{
MSG_init(&argc, argv);
- char **options = &argv[1];
MC_automaton_new_propositional_symbol_pointer("r", &r);
MC_automaton_new_propositional_symbol_pointer("cs", &cs);
- const char* platform_file = options[0];
- const char* application_file = options[1];
-
- MSG_create_environment(platform_file);
+ MSG_create_environment(argv[1]);
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", raw_client);
- MSG_launch_application(application_file);
+ MSG_launch_application(argv[2]);
MSG_main();
int predR(void);
int predCS(void);
-int coordinator(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-
#endif
XBT_LOG_NEW_DEFAULT_CATEGORY(example, "this example");
-int server(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-
-int server(int argc, char *argv[])
+static int server(int argc, char *argv[])
{
msg_task_t task1 = NULL;
msg_task_t task2 = NULL;
return 0;
}
-int client(int argc, char *argv[])
+static int client(int argc, char *argv[])
{
msg_task_t task1 = MSG_task_create(argv[1], 0, 10000, NULL);
msg_task_t task2 = MSG_task_create(argv[1], 0, 10000, NULL);
MSG_launch_application("deploy_bugged2.xml");
MSG_main();
-
return 0;
}
#include "bugged2_liveness.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(bugged3, "my log messages");
-
-int cs = 0;
-int coordinator(int argc, char **argv);
-int client(int argc, char **argv);
+int cs = 0;
-int coordinator(int argc, char *argv[])
+static int coordinator(int argc, char *argv[])
{
int CS_used = 0; // initially the CS is idle
-
+
while (1) {
msg_task_t task = NULL;
MSG_task_receive(&task, "coordinator");
MSG_task_destroy(task);
kind = NULL;
}
-
+
return 0;
}
-int client(int argc, char *argv[])
+static int client(int argc, char *argv[])
{
int my_pid = MSG_process_get_PID(MSG_process_self());
char *my_mailbox = xbt_strdup(argv[1]);
const char* kind;
-
- while(1){
+ while(1){
XBT_INFO("Client (%s) asks the request", my_mailbox);
- MSG_task_send(MSG_task_create("request", 0, 1000, my_mailbox),
- "coordinator");
+ MSG_task_send(MSG_task_create("request", 0, 1000, my_mailbox), "coordinator");
msg_task_t answer = NULL;
MSG_task_receive(&answer, my_mailbox);
kind = MSG_task_get_name(answer);
-
- if (!strcmp(kind, "grant")) {
+ if (!strcmp(kind, "grant")) {
XBT_INFO("Client (%s) got the answer (grant). Sleep a bit and release it", my_mailbox);
-
if(!strcmp(my_mailbox, "1"))
cs = 1;
-
}else{
-
XBT_INFO("Client (%s) got the answer (not grant). Try again", my_mailbox);
-
}
MSG_task_destroy(answer);
kind = NULL;
-
+
MSG_process_sleep(my_pid);
}
-
return 0;
}
int main(int argc, char *argv[])
{
-
MSG_init(&argc, argv);
MC_automaton_new_propositional_symbol_pointer("cs", &cs);
-
+
MSG_create_environment("../msg_platform.xml");
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
int predCS(void);
-int coordinator(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-
#endif
XBT_LOG_NEW_DEFAULT_CATEGORY(bugged3, "this example");
-int server(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-int server(int argc, char *argv[])
+static int server(int argc, char *argv[])
{
msg_task_t task1,task2;
return 0;
}
-int client(int argc, char *argv[])
+static int client(int argc, char *argv[])
{
msg_task_t task1 = MSG_task_create(argv[1], 0, 10000, NULL);
MSG_launch_application("deploy_bugged3.xml");
MSG_main();
-
return 0;
}
#define CS_PER_PROCESS 2
XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages");
-int coordinator(int argc, char **argv);
-int client(int argc, char **argv);
-
-int coordinator(int argc, char *argv[])
+static int coordinator(int argc, char *argv[])
{
xbt_dynar_t requests = xbt_dynar_new(sizeof(char *), NULL); // dynamic vector storing requests (which are char*)
int CS_used = 0; // initially the CS is idle
}
} else { // that's a release. Check if someone was waiting for the lock
if (!xbt_dynar_is_empty(requests)) {
- XBT_INFO("CS release. Grant to queued requests (queue size: %lu)",
- xbt_dynar_length(requests));
+ XBT_INFO("CS release. Grant to queued requests (queue size: %lu)", xbt_dynar_length(requests));
char *req;
xbt_dynar_shift(requests, &req);
MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
return 0;
}
-int client(int argc, char *argv[])
+static int client(int argc, char *argv[])
{
int my_pid = MSG_process_get_PID(MSG_process_self());
// use my pid as name of mailbox to contact me
int i;
for (i = 0; i < CS_PER_PROCESS; i++) {
XBT_INFO("Ask the request");
- MSG_task_send(MSG_task_create("request", 0, 1000, my_mailbox),
- "coordinator");
+ MSG_task_send(MSG_task_create("request", 0, 1000, my_mailbox), "coordinator");
// wait the answer
msg_task_t grant = NULL;
MSG_task_receive(&grant, my_mailbox);
MSG_task_destroy(grant);
XBT_INFO("got the answer. Sleep a bit and release it");
MSG_process_sleep(1);
- MSG_task_send(MSG_task_create("release", 0, 1000, NULL),
- "coordinator");
+ MSG_task_send(MSG_task_create("release", 0, 1000, NULL), "coordinator");
MSG_process_sleep(my_pid);
}
XBT_INFO("Got all the CS I wanted, quit now");
MSG_create_environment("../msg_platform.xml");
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
- MSG_launch_application("deploy_mutex.xml");
+ MSG_launch_application("deploy_centralized_mutex.xml");
MSG_main();
return 0;
}
#! ./tesh
-$ ${bindir:=.}/centralized
+$ ${bindir:=.}/centralized_mutex
> [Fafard:client:(2) 0.000000] [centralized/INFO] Ask the request
> [Boivin:client:(3) 0.000000] [centralized/INFO] Ask the request
> [TeX:client:(4) 0.000000] [centralized/INFO] Ask the request
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
- <process host="HostA" function="server">
- <argument value="0"/>
- </process>
- <process host="HostB" function="client">
- <argument value="1"/>
- </process>
- <process host="HostC" function="client">
- <argument value="2"/>
- </process>
- <process host="HostD" function="client">
- <argument value="3"/>
- </process>
+ <process host="HostA" function="server"> <argument value="0"/> </process>
+ <process host="HostB" function="client"> <argument value="1"/> </process>
+ <process host="HostC" function="client"> <argument value="2"/> </process>
+ <process host="HostD" function="client"> <argument value="3"/> </process>
</platform>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
<process host="Tremblay" function="coordinator" />
-
- <process host="Boivin" function="client" >
- <argument value="1"/>
- </process>
-
- <process host="Fafard" function="client" >
- <argument value="2"/>
- </process>
+ <process host="Boivin" function="client" > <argument value="1"/> </process>
+ <process host="Fafard" function="client" > <argument value="2"/> </process>
</platform>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
<process host="Tremblay" function="coordinator" />
-
- <process host="Boivin" function="client" >
- <argument value="2"/>
- </process>
-
- <process host="Fafard" function="client" >
- <argument value="1"/>
- </process>
+ <process host="Boivin" function="client" > <argument value="2"/> </process>
+ <process host="Fafard" function="client" > <argument value="1"/> </process>
</platform>
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
- <process host="HostA" function="server">
- <argument value="0"/>
- </process>
- <process host="HostB" function="client">
- <argument value="1"/>
- </process>
- <process host="HostC" function="client">
- <argument value="2"/>
- </process>
+ <process host="HostA" function="server"> <argument value="0"/> </process>
+ <process host="HostB" function="client"> <argument value="1"/> </process>
+ <process host="HostC" function="client"> <argument value="2"/> </process>
</platform>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
<process host="Tremblay" function="coordinator" />
-
- <process host="Fafard" function="client" >
- <argument value="1"/>
- </process>
-
- <process host="Boivin" function="client" >
- <argument value="2"/>
- </process>
+ <process host="Fafard" function="client" > <argument value="1"/> </process>
+ <process host="Boivin" function="client" > <argument value="2"/> </process>
</platform>
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
- <process host="HostA" function="server">
- <argument value="0"/>
- </process>
- <process host="HostB" function="client">
- <argument value="1"/>
- </process>
- <process host="HostC" function="client">
- <argument value="2"/>
- </process>
+ <process host="HostA" function="server"> <argument value="0"/> </process>
+ <process host="HostB" function="client"> <argument value="1"/> </process>
+ <process host="HostC" function="client"> <argument value="2"/> </process>
</platform>
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
- <process host="HostA" function="server">
- <argument value="0"/>
- </process>
- <process host="HostB" function="client">
- <argument value="1"/>
- </process>
- <process host="HostC" function="client">
- <argument value="2"/>
- </process>
+ <process host="HostA" function="server"> <argument value="0"/> </process>
+ <process host="HostB" function="client"> <argument value="1"/> </process>
+ <process host="HostC" function="client"> <argument value="2"/> </process>
</platform>
XBT_LOG_NEW_DEFAULT_CATEGORY(electric_fence, "Example to check the soundness of DPOR");
-int server(int argc, char *argv[]);
-int client(int argc, char *argv[]);
-int server(int argc, char *argv[])
+static int server(int argc, char *argv[])
{
msg_task_t task1 = NULL, task2 = NULL;
msg_comm_t comm_received1 = NULL, comm_received2 = NULL;
return 0;
}
-int client(int argc, char *argv[])
+static int client(int argc, char *argv[])
{
-
msg_task_t task = MSG_task_create(argv[1], 0, 10000, NULL);
MSG_task_send(task, "mymailbox");
-
+
XBT_INFO("Sent!");
return 0;
}
int main(int argc, char *argv[])
{
-
MSG_init(&argc, argv);
MSG_create_environment("platform.xml");
MSG_function_register("server", server);
-
MSG_function_register("client", client);
-
MSG_launch_application("deploy_electric_fence.xml");
MSG_main();
-
return 0;
-
}
target_link_libraries(without_mutex_handling simgrid)
set_target_properties(without_mutex_handling PROPERTIES COMPILE_FLAGS -DDISABLE_THE_MUTEX=1)
-set(tesh_files
- ${tesh_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/with_mutex_handling.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/without_mutex_handling.tesh
- PARENT_SCOPE)
-set(testsuite_src
- ${testsuite_src}
- ${CMAKE_CURRENT_SOURCE_DIR}/mutex_handling.c
- PARENT_SCOPE)
-set(xml_files
- ${xml_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/mutex_handling.xml
- PARENT_SCOPE)
+set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/with_mutex_handling.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/without_mutex_handling.tesh PARENT_SCOPE)
+set(testsuite_src ${testsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/mutex_handling.c PARENT_SCOPE)
+set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/mutex_handling.xml PARENT_SCOPE)
target_link_libraries(dwarf simgrid)
endif()
-set(tesh_files
- ${tesh_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.tesh
- PARENT_SCOPE)
-set(testsuite_src
- ${testsuite_src}
- ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.cpp
- PARENT_SCOPE)
+set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.tesh PARENT_SCOPE)
+set(testsuite_src ${testsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.cpp PARENT_SCOPE)
target_link_libraries(dwarf-expression simgrid)
endif()
-set(tesh_files
- ${tesh_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/dwarf_expression.tesh
- PARENT_SCOPE)
-set(testsuite_src
- ${testsuite_src}
- ${CMAKE_CURRENT_SOURCE_DIR}/dwarf_expression.cpp
- PARENT_SCOPE)
+set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/dwarf_expression.tesh PARENT_SCOPE)
+set(testsuite_src ${testsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/dwarf_expression.cpp PARENT_SCOPE)
* and the MC does not find the counter-example.
*/
-#include <stdio.h>
#include "simgrid/msg.h"
-#include "xbt/log.h"
#include "mc/mc.h"
#include <xbt/synchro_core.h>
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
- "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
#define BOX_NAME "box"
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
"\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
- const char *platform_file = argv[1];
- const char *application_file = argv[2];
- MSG_create_environment(platform_file);
+ MSG_create_environment(argv[1]);
MSG_function_register("receiver", receiver);
MSG_function_register("sender", sender);
- MSG_launch_application(application_file);
+ MSG_launch_application(argv[2]);
#ifndef DISABLE_THE_MUTEX
mutex = xbt_mutex_init();
#endif
XBT_INFO("Simulation time %g", MSG_get_clock());
return res != MSG_OK;
-}
\ No newline at end of file
+}
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4">
- <!-- For using with ping_pong, platform_sendrecv.xml -->
- <!-- receiver my_name -->
<process host="Disney" function="receiver"/>
-
- <!-- sender my_name receiver_name other_sender_name -->
- <process host="Jill" function="sender">
- <argument value="X"/>
- </process>
- <process host="UNIX" function="sender">
- <argument value="Y"/>
- </process>
+ <process host="Jill" function="sender"> <argument value="X"/> </process>
+ <process host="UNIX" function="sender"> <argument value="Y"/> </process>
</platform>
add_executable (random_bug random_bug.c)
target_link_libraries(random_bug simgrid)
-set(tesh_files
- ${tesh_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/random_bug.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/random_bug_replay.tesh
- PARENT_SCOPE)
-set(testsuite_src
- ${testsuite_src}
- ${CMAKE_CURRENT_SOURCE_DIR}/random_bug.c
- PARENT_SCOPE)
-set(xml_files
- ${xml_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/random_bug.xml
- PARENT_SCOPE)
+set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/random_bug.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/random_bug_replay.tesh PARENT_SCOPE)
+set(testsuite_src ${testsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/random_bug.c PARENT_SCOPE)
+set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/random_bug.xml PARENT_SCOPE)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <stdio.h>
-
-#include <xbt/log.h>
#include <simgrid/msg.h>
#include <simgrid/modelchecker.h>
XBT_LOG_NEW_DEFAULT_CATEGORY(random_bug, "Application");
-/** An (fake) application with a bug occuring for some random values
- */
+/** An (fake) application with a bug occuring for some random values */
static int app(int argc, char *argv[])
{
int x = MC_random(0, 5);
-add_executable (basic_parsing_test basic_parsing_test.c)
-target_link_libraries(basic_parsing_test simgrid)
+foreach(x basic_parsing_test basic_link_test evaluate_parse_time evaluate_get_route_time)
+ add_executable (${x} ${x}.c)
+ target_link_libraries(${x} simgrid)
+
+ set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c)
+endforeach()
+
add_executable (is_router_test is_router_test.cpp)
target_link_libraries(is_router_test simgrid)
add_executable (flatifier flatifier.cpp)
target_link_libraries(flatifier simgrid)
-add_executable (basic_link_test basic_link_test.c)
-target_link_libraries(basic_link_test simgrid)
-add_executable (evaluate_parse_time Evaluate_parse_time.c)
-target_link_libraries(evaluate_parse_time simgrid)
-add_executable (evaluate_get_route_time Evaluate_get_route_time.c)
-target_link_libraries(evaluate_get_route_time simgrid)
-set(tesh_files
- ${tesh_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test_failing.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test_sym_full.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test_bypass.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/basic_link_test.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/flatifier.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/get_full_link.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bogus_two_hosts_asymetric.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_gateway.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/bogus_disk_attachment.tesh
- PARENT_SCOPE)
-set(xml_files
- ${xml_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/four_hosts_Dijkstra_ns3.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/four_hosts_floyd_ns3.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/four_hosts_floyd.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_multi_hop.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/host_attributes.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/link_attributes.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_file.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_multicore.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_fullduplex.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_router_id.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/platform_include.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/properties.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/test_of_is_router.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/three_hosts_non_symmetric_route.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters_one_name.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters_router_id.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_src_gateway.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_dst_gateway.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/bogus_two_hosts_asymetric.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link_fullduplex.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link_symmetrical.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/clusterA.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/clusterB.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/Dijkstra.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/bogus_disk_attachment.xml
- PARENT_SCOPE)
-set(teshsuite_src
- ${teshsuite_src}
- ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test.c
- ${CMAKE_CURRENT_SOURCE_DIR}/basic_link_test.c
- ${CMAKE_CURRENT_SOURCE_DIR}/Evaluate_get_route_time.c
- ${CMAKE_CURRENT_SOURCE_DIR}/Evaluate_parse_time.c
- ${CMAKE_CURRENT_SOURCE_DIR}/flatifier.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/is_router_test.cpp
- PARENT_SCOPE)
-set(txt_files
- ${txt_files}
- ${CMAKE_CURRENT_SOURCE_DIR}/carol.fail
- ${CMAKE_CURRENT_SOURCE_DIR}/bob.trace
- ${CMAKE_CURRENT_SOURCE_DIR}/erin.avail
- ${CMAKE_CURRENT_SOURCE_DIR}/link.bw
- ${CMAKE_CURRENT_SOURCE_DIR}/link.fail
- ${CMAKE_CURRENT_SOURCE_DIR}/link.lat
- PARENT_SCOPE)
+set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test_failing.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test_sym_full.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/basic_parsing_test_bypass.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/basic_link_test.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/flatifier.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/get_full_link.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bogus_two_hosts_asymetric.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_gateway.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/bogus_disk_attachment.tesh PARENT_SCOPE)
+set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/four_hosts_Dijkstra_ns3.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/four_hosts_floyd_ns3.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/four_hosts_floyd.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_multi_hop.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/host_attributes.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/link_attributes.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_file.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_multicore.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_fullduplex.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster_router_id.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/one_cluster.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/platform_include.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/properties.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/test_of_is_router.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/three_hosts_non_symmetric_route.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters_one_name.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters_router_id.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/two_clusters.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_src_gateway.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/bogus_missing_dst_gateway.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/bogus_two_hosts_asymetric.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link_fullduplex.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link_symmetrical.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts_one_link.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/clusterA.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/clusterB.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/Dijkstra.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/bogus_disk_attachment.xml PARENT_SCOPE)
+set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/flatifier.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/is_router_test.cpp PARENT_SCOPE)
+set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/carol.fail
+ ${CMAKE_CURRENT_SOURCE_DIR}/bob.trace
+ ${CMAKE_CURRENT_SOURCE_DIR}/erin.avail
+ ${CMAKE_CURRENT_SOURCE_DIR}/link.bw
+ ${CMAKE_CURRENT_SOURCE_DIR}/link.fail
+ ${CMAKE_CURRENT_SOURCE_DIR}/link.lat PARENT_SCOPE)