1 /* Copyright (c) 2014. 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. */
10 #include <simgrid/msg.h>
11 #include <simgrid/modelchecker.h>
13 XBT_LOG_NEW_DEFAULT_CATEGORY(random_bug, "Application");
15 /** An (fake) application with a bug occuring for some random values
17 static int app(int argc, char *argv[])
19 int x = MC_random(0, 5);
20 int y = MC_random(0, 5);
23 MC_assert(x !=3 || y !=4);
26 fprintf(stderr, "Error reached\n");
33 int main(int argc, char *argv[])
35 MSG_init(&argc, argv);
36 MSG_function_register("app", &app);
37 MSG_create_environment(argv[1]);
38 MSG_launch_application(argv[2]);