Skip to content

Commit

Permalink
guess test case
Browse files Browse the repository at this point in the history
  • Loading branch information
osalyk committed Jul 19, 2024
1 parent 5be3af9 commit 94dd778
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/tests/ras/utils/inject_manager/inject_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,18 @@ InjectManager::InjectManager(std::string test_dir, std::string policy) {
test_dir_ = test_dir;
}

bool InjectManager::IsLastShutdownUnsafe(
const std::vector<DimmNamespace> &dimm_namespaces) const {
std::function<bool(int, int)> compare = [](int rec, int cur) -> bool {
return cur > rec;
};

if (!CheckUSCDiff(dimm_namespaces, compare)) {
std::cerr << "Unexpected safe shutdown of NVDIMM" << std::endl;
return false;
}
return true;
}
// bool InjectManager::IsLastShutdownUnsafe(
// const std::vector<DimmNamespace> &dimm_namespaces) const {
// std::function<bool(int, int)> compare = [](int rec, int cur) -> bool {
// return cur > rec;
// };

// if (!CheckUSCDiff(dimm_namespaces, compare)) {
// std::cerr << "Unexpected safe shutdown of NVDIMM" << std::endl;
// return false;
// }
// return true;
// }

bool InjectManager::IsLastShutdownSafe(
const std::vector<DimmNamespace> &dimm_namespaces) const {
Expand Down
4 changes: 2 additions & 2 deletions src/tests/ras/utils/inject_manager/inject_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class InjectManager {

InjectManager(std::string test_dir, std::string policy);

bool IsLastShutdownUnsafe(
const std::vector<DimmNamespace> &dimm_namespaces) const;
// bool IsLastShutdownUnsafe(
// const std::vector<DimmNamespace> &dimm_namespaces) const;
bool IsLastShutdownSafe(
const std::vector<DimmNamespace> &dimm_namespaces) const;
int RecordUSC(const std::vector<DimmNamespace> &dimm_namespaces) const;
Expand Down

0 comments on commit 94dd778

Please sign in to comment.