GCC Code Coverage Report


Directory: src/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 0.0% 0 / 0 / 12
Functions: 0.0% 0 / 0 / 1
Branches: 0.0% 0 / 0 / 20

memory/pm_command.cc
Line Branch Exec Source
1 #include "memory/shm_file.h"
2
3 #include "base/init.h"
4 #include "base/string.h"
5
6 DEFINE_string(command, "----", "reinit");
7 DEFINE_int32(numa_id, 0, "");
8
9 int main(int argc, char** argv) {
10 base::Init(&argc, &argv);
11 if (FLAGS_command == "reinit") {
12 base::PMMmapRegisterCenter::GetConfig().backend =
13 base::PMMmapRegisterCenter::Backend::kDevDax;
14 base::PMMmapRegisterCenter::GetConfig().numa_id = FLAGS_numa_id;
15 base::PMMmapRegisterCenter::GetInstance()->ReInitialize();
16 auto command = base::SFormat("rm -rf /media/aep0/*;"
17 "rm -rf /media/aep1/*;");
18 LOG(WARNING) << command;
19 system(command.c_str());
20 } else {
21 LOG(FATAL) << "false command";
22 }
23 return 0;
24 }
25