page_store_(500),
parent_snapshot_(nullptr)
{
- process_ = std::unique_ptr<Process>(new Process(pid_, socket_));
+
}
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");
-
- // 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);
xbt_assert(xbt_pagesize == getpagesize());
xbt_assert(1 << xbt_pagebits == xbt_pagesize);
mc_model_checker = new ::simgrid::mc::ModelChecker(getpid(), -1);
+ mc_model_checker->init_process();
for(int n=1; n!=256; ++n) {