From: Nick Sanders Date: Mon, 11 Dec 2017 19:59:16 +0000 (-0800) Subject: Fix CRC error reporting X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=0f05a3e13a382eda453166789f49b144a55f4b10;p=stressapptest Fix CRC error reporting In the situation where CRC calculation fails, but no data miscompares were found, we print out an error, but don't increment the error count. This leads stressapptest to report "PASS" incorrectly. We'll add an error count increment to fix the issue. BUG=https://github.com/stressapptest/stressapptest/issues/56 TEST=add code to corrupt CRC, see "FAIL" as expected. Signed-off-by: Nick Sanders --- diff --git a/src/worker.cc b/src/worker.cc index 5b0fe59..922d2c1 100644 --- a/src/worker.cc +++ b/src/worker.cc @@ -1238,9 +1238,11 @@ int WorkerThread::CrcCopyPage(struct page_entry *dstpe, expectedcrc->ToHexString().c_str()); struct ErrorRecord er; er.actual = sourcemem[0]; - er.expected = 0x0; + er.expected = 0xbad00000ull << 32; er.vaddr = sourcemem; ProcessError(&er, 0, "Hardware Error"); + errors += 1; + errorcount_ ++; } } } @@ -1385,6 +1387,8 @@ int WorkerThread::CrcWarmCopyPage(struct page_entry *dstpe, er.expected = 0xbad; er.vaddr = sourcemem; ProcessError(&er, 0, "Hardware Error"); + errors ++; + errorcount_ ++; } } }