[KMTESTS:FSRTL] Add a few more tests matching MS FastFAT.

CORE-11819
This commit is contained in:
Pierre Schweitzer 2018-02-21 22:50:23 +01:00
parent 182a31074f
commit 22037684e4
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -687,9 +687,38 @@ static VOID FsRtlLargeMcbTestsExt2()
FsRtlUninitializeLargeMcb(&FirstMcb);
}
static VOID FsRtlLargeMcbTestsFastFat()
{
LARGE_MCB FirstMcb;
LONGLONG Lbn, Vbn, SectorCount;
ULONG Index;
BOOLEAN Result;
FsRtlInitializeLargeMcb(&FirstMcb, PagedPool);
Lbn = -1;
SectorCount = -1;
Result = FsRtlLookupLargeMcbEntry(&FirstMcb, 8388607LL, &Lbn, &SectorCount, NULL, NULL, NULL);
ok(Result = TRUE, "Expected TRUE, got FALSE\n");
ok(Lbn == -1, "Expected Lbn 44, got: %I64d\n", Lbn);
ok(SectorCount == -1, "Expected SectorCount 44, got: %I64d\n", SectorCount);
Vbn = -1;
Lbn = -1;
Index = -1;
Result = FsRtlLookupLastLargeMcbEntryAndIndex(&FirstMcb, &Vbn, &Lbn, &Index);
ok(Result = TRUE, "Expected TRUE, got FALSE\n");
ok(Vbn == -1, "Expected Vbn 0, got: %I64d\n", Vbn);
ok(Lbn == -1, "Expected Lbn 0, got: %I64d\n", Lbn);
ok(Index == -1, "Expected Index 0, got: %d\n", Index);
FsRtlUninitializeLargeMcb(&FirstMcb);
}
START_TEST(FsRtlMcb)
{
FsRtlMcbTest();
FsRtlLargeMcbTest();
FsRtlLargeMcbTestsExt2();
FsRtlLargeMcbTestsFastFat();
}