[KMTESTS:MM]

Check the first byte is really null, in spite of the hack writing.

CORE-11819
CORE-12475

svn path=/trunk/; revision=73392
This commit is contained in:
Pierre Schweitzer 2016-11-27 10:49:33 +00:00
parent 22f4acf925
commit 695beeee78
2 changed files with 10 additions and 1 deletions

View file

@ -404,7 +404,8 @@ TestIrpHandler(
{ {
Fcb = IoStack->FileObject->FsContext; Fcb = IoStack->FileObject->FsContext;
ok(Fcb != NULL, "Null pointer!\n"); ok(Fcb != NULL, "Null pointer!\n");
if (IoStack->FileObject->PrivateCacheMap != NULL) if (IoStack->FileObject->SectionObjectPointer != NULL &&
IoStack->FileObject->SectionObjectPointer->SharedCacheMap != NULL)
{ {
CcFlushCache(&Fcb->SectionObjectPointers, NULL, 0, NULL); CcFlushCache(&Fcb->SectionObjectPointers, NULL, 0, NULL);
CcPurgeCacheSection(&Fcb->SectionObjectPointers, NULL, 0, FALSE); CcPurgeCacheSection(&Fcb->SectionObjectPointers, NULL, 0, FALSE);

View file

@ -53,6 +53,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 512); memset(Buffer, 0xBA, 512);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);
@ -78,6 +79,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 4096); memset(Buffer, 0xBA, 4096);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);
@ -103,6 +105,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 512); memset(Buffer, 0xBA, 512);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);
@ -128,6 +131,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 4096); memset(Buffer, 0xBA, 4096);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);
@ -165,6 +169,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 512); memset(Buffer, 0xBA, 512);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);
@ -190,6 +195,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 4096); memset(Buffer, 0xBA, 4096);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);
@ -215,6 +221,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 512); memset(Buffer, 0xBA, 512);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);
@ -240,6 +247,7 @@ START_TEST(NtCreateSection)
ok_eq_hex(Status, STATUS_SUCCESS); ok_eq_hex(Status, STATUS_SUCCESS);
KmtStartSeh(); KmtStartSeh();
ok(((PCHAR)Buffer)[0] == 0, "First byte is not null! %x", ((PCHAR)Buffer)[0]);
memset(Buffer, 0xBA, 4096); memset(Buffer, 0xBA, 4096);
KmtEndSeh(STATUS_SUCCESS); KmtEndSeh(STATUS_SUCCESS);