1 /* Copyright (c) 2014-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include <simgrid/msg.h>
8 #include <simgrid/modelchecker.h>
10 XBT_LOG_NEW_DEFAULT_CATEGORY(random_bug, "Application");
12 /** An (fake) application with a bug occuring for some random values */
13 static int app(int argc, char *argv[])
15 int x = MC_random(0, 5);
16 int y = MC_random(0, 5);
19 MC_assert(x !=3 || y !=4);
22 fprintf(stderr, "Error reached\n");
29 int main(int argc, char *argv[])
31 MSG_init(&argc, argv);
32 MSG_function_register("app", &app);
33 MSG_create_environment(argv[1]);
34 MSG_process_create("app", app, NULL, MSG_get_host_by_name("Tremblay"));