File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
benchmark/nixlbench/src/utils Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -659,6 +659,7 @@ void xferBenchUtils::checkConsistency(std::vector<std::vector<xferBenchIOV>> &io
659659 xferBenchConfig::num_initiator_dev);
660660 gusli_devmap_init = true ;
661661 }
662+ bool pass_check_consistency = true ;
662663 for (const auto &iov_list: iov_lists) {
663664 for (const auto &iov: iov_list) {
664665 void *addr = NULL ;
@@ -793,6 +794,7 @@ void xferBenchUtils::checkConsistency(std::vector<std::vector<xferBenchIOV>> &io
793794 rc = allBytesAre (addr, len, check_val);
794795 if (true != rc) {
795796 std::cerr << " Consistency check failed for iov " << i << " :" << j << std::endl;
797+ pass_check_consistency = false ;
796798 }
797799 // Free the addr only if is allocated here
798800 if (is_allocated) {
@@ -802,6 +804,10 @@ void xferBenchUtils::checkConsistency(std::vector<std::vector<xferBenchIOV>> &io
802804 }
803805 i++;
804806 }
807+ if (!pass_check_consistency) {
808+ std::cerr << " Consistency check failed" << std::endl;
809+ exit (EXIT_FAILURE);
810+ }
805811}
806812
807813void
You can’t perform that action at this time.
0 commit comments