From e22626cb3d391526c7d0a61d1bb5d799fa293fcf Mon Sep 17 00:00:00 2001 From: hjnapiat Date: Wed, 16 Jan 2019 15:21:00 +0100 Subject: [PATCH] Enhance AUB testing Change-Id: I45dafca34064ff824c197658051d8ba5c89265f6 --- .../command_stream/aub_command_stream_fixture.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h b/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h index 8c50c187ec..9618a43be6 100644 --- a/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h +++ b/unit_tests/aub_tests/command_stream/aub_command_stream_fixture.h @@ -65,6 +65,17 @@ class AUBCommandStreamFixture : public CommandStreamFixture { aubCsr->expectMemoryEqual(gfxAddress, srcAddress, length); } + template + void expectMemoryNotEqual(void *gfxAddress, const void *srcAddress, size_t length) { + CommandStreamReceiver *csr = pCommandStreamReceiver; + if (testMode == TestMode::AubTestsWithTbx) { + csr = reinterpret_cast> *>(pCommandStreamReceiver)->aubCSR; + } + + auto aubCsr = reinterpret_cast *>(csr); + aubCsr->expectMemoryNotEqual(gfxAddress, srcAddress, length); + } + template void pollForCompletion() { CommandStreamReceiver *csr = pCommandStreamReceiver;