https://git.reactos.org/?p=reactos.git;a=commitdiff;h=22037684e42e29abc99a9a280278b16305eaa2e2

commit 22037684e42e29abc99a9a280278b16305eaa2e2
Author:     Pierre Schweitzer <[email protected]>
AuthorDate: Wed Feb 21 22:50:23 2018 +0100
Commit:     Pierre Schweitzer <[email protected]>
CommitDate: Wed Feb 21 22:53:30 2018 +0100

    [KMTESTS:FSRTL] Add a few more tests matching MS FastFAT.
    
    CORE-11819
---
 modules/rostests/kmtests/ntos_fsrtl/FsRtlMcb.c | 29 ++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/modules/rostests/kmtests/ntos_fsrtl/FsRtlMcb.c 
b/modules/rostests/kmtests/ntos_fsrtl/FsRtlMcb.c
index 54ead1c989..8f833d6208 100644
--- a/modules/rostests/kmtests/ntos_fsrtl/FsRtlMcb.c
+++ b/modules/rostests/kmtests/ntos_fsrtl/FsRtlMcb.c
@@ -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();
 }

Reply via email to