From 0f05a3e13a382eda453166789f49b144a55f4b10 Mon Sep 17 00:00:00 2001 From: Nick Sanders Date: Mon, 11 Dec 2017 11:59:16 -0800 Subject: [PATCH] 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 --- src/worker.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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_ ++; } } } -- 2.30.2