#include "simgrid/sg_config.h"
-#include "ModelChecker.hpp"
-#include "PageStore.hpp"
-#include "ModelChecker.hpp"
-#include "mc_protocol.h"
-#include "mc_private.h"
-#include "mc_ignore.h"
-#include "mc_exit.h"
+#include "src/mc/ModelChecker.hpp"
+#include "src/mc/PageStore.hpp"
+#include "src/mc/ModelChecker.hpp"
+#include "src/mc/mc_protocol.h"
+#include "src/mc/mc_private.h"
+#include "src/mc/mc_ignore.h"
+#include "src/mc/mc_exit.h"
#include "src/mc/mc_liveness.h"
extern "C" {
page_store_(500),
parent_snapshot_(nullptr)
{
+
}
ModelChecker::~ModelChecker()
return elt->key;
}
+// HACK, for the unit test only
+void ModelChecker::init_process()
+{
+ // TODO, avoid direct dependency on sg_cfg
+ process_ = std::unique_ptr<Process>(new Process(pid_, socket_));
+ process_->privatized(sg_cfg_get_boolean("smpi/privatize_global_variables"));
+}
+
void ModelChecker::start()
{
// Block SIGCHLD (this will be handled with accept/signalfd):
if (res < 0 || !WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP)
xbt_die("Could not wait model-checked process");
- assert(process_ == nullptr);
- process_ = std::unique_ptr<Process>(new Process(pid_, socket_));
- // TODO, avoid direct dependency on sg_cfg
- process_->privatized(sg_cfg_get_boolean("smpi/privatize_global_variables"));
+ this->init_process();
/* Initialize statistics */
mc_stats = xbt_new0(s_mc_stats_t, 1);