diff --git a/src/tests/ras/us_remote_agent/main.cc b/src/tests/ras/us_remote_agent/main.cc index f550af0..30e45bf 100644 --- a/src/tests/ras/us_remote_agent/main.cc +++ b/src/tests/ras/us_remote_agent/main.cc @@ -72,8 +72,8 @@ int main(int argc, char **argv) { } else if (std::string{"record"}.compare(action) == 0) { return inject_mgmt.RecordUSC(dimm_colls); - } else if (std::string{"check-safe"}.compare(action) == 0) { - return inject_mgmt.IsLastShutdownSafe(dimm_colls) ? 0 : 1; +// } else if (std::string{"check-safe"}.compare(action) == 0) { +// return inject_mgmt.IsLastShutdownSafe(dimm_colls) ? 0 : 1; } else if (std::string{"check-unsafe"}.compare(action) == 0) { return inject_mgmt.IsLastShutdownUnsafe(dimm_colls) ? 0 : 1; diff --git a/src/tests/ras/utils/inject_manager/inject_manager.cc b/src/tests/ras/utils/inject_manager/inject_manager.cc index 86dafcd..2d145d9 100644 --- a/src/tests/ras/utils/inject_manager/inject_manager.cc +++ b/src/tests/ras/utils/inject_manager/inject_manager.cc @@ -158,15 +158,15 @@ bool InjectManager::IsLastShutdownUnsafe( return true; } -bool InjectManager::IsLastShutdownSafe( - const std::vector &dimm_namespaces) const { - std::function compare = [](int rec, int cur) -> bool { - return cur == rec; - }; - - if (!CheckUSCDiff(dimm_namespaces, compare)) { - std::cerr << "Unexpected unsafe shutdown of NVDIMM" << std::endl; - return false; - } - return true; -} +// bool InjectManager::IsLastShutdownSafe( +// const std::vector &dimm_namespaces) const { +// std::function compare = [](int rec, int cur) -> bool { +// return cur == rec; +// }; + +// if (!CheckUSCDiff(dimm_namespaces, compare)) { +// std::cerr << "Unexpected unsafe shutdown of NVDIMM" << std::endl; +// return false; +// } +// return true; +// } diff --git a/src/tests/ras/utils/inject_manager/inject_manager.h b/src/tests/ras/utils/inject_manager/inject_manager.h index 820f5ae..012c27c 100644 --- a/src/tests/ras/utils/inject_manager/inject_manager.h +++ b/src/tests/ras/utils/inject_manager/inject_manager.h @@ -50,8 +50,8 @@ class InjectManager { bool IsLastShutdownUnsafe( const std::vector &dimm_namespaces) const; - bool IsLastShutdownSafe( - const std::vector &dimm_namespaces) const; +// bool IsLastShutdownSafe( +// const std::vector &dimm_namespaces) const; int RecordUSC(const std::vector &dimm_namespaces) const; int Inject(const std::vector &us_namespaces) const; diff --git a/src/tests/ras/utils/test_phase/local_test_phase.cc b/src/tests/ras/utils/test_phase/local_test_phase.cc index db99e81..7d8e59a 100644 --- a/src/tests/ras/utils/test_phase/local_test_phase.cc +++ b/src/tests/ras/utils/test_phase/local_test_phase.cc @@ -72,8 +72,7 @@ int LocalTestPhase::Inject() const { int LocalTestPhase::CheckUSC() const { InjectManager inject_mgmt{config_.GetTestDir(), policy_}; - if (inject_mgmt.IsLastShutdownSafe(safe_namespaces) && - inject_mgmt.IsLastShutdownUnsafe(unsafe_namespaces)) { + if (inject_mgmt.IsLastShutdownUnsafe(safe_namespaces)) { return 0; } return -1;