2 * PROJECT: ReactOS kernel-mode tests
3 * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory
4 * PURPOSE: Kernel-Mode Test Suite Executive Regressions KM-Test
5 * PROGRAMMER: Aleksey Bragin <aleksey@reactos.org>
8 /* TODO: this test doesn't process any test results; it also takes very long */
15 static VOID
KeStallExecutionProcessorTest(VOID
)
18 LARGE_INTEGER TimeStart
, TimeFinish
;
20 DPRINT1("Waiting for 30 secs with 50us stalls...\n");
21 KeQuerySystemTime(&TimeStart
);
22 for (i
= 0; i
< (30*1000*20); i
++)
24 KeStallExecutionProcessor(50);
26 KeQuerySystemTime(&TimeFinish
);
27 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 30
29 DPRINT1("Waiting for 30 secs with 1000us stalls...\n");
30 KeQuerySystemTime(&TimeStart
);
31 for (i
= 0; i
< (30*1000); i
++)
33 KeStallExecutionProcessor(1000);
35 KeQuerySystemTime(&TimeFinish
);
36 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 30
38 DPRINT1("Waiting for 30 secs with 1us stalls...\n");
39 KeQuerySystemTime(&TimeStart
);
40 for (i
= 0; i
< (30*1000*1000); i
++)
42 KeStallExecutionProcessor(1);
44 KeQuerySystemTime(&TimeFinish
);
45 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 43
47 DPRINT1("Waiting for 30 secs with one huge stall...\n");
48 KeQuerySystemTime(&TimeStart
);
49 KeStallExecutionProcessor(30*1000000);
50 KeQuerySystemTime(&TimeFinish
);
51 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 30
54 START_TEST(KeProcessor
)
56 KeStallExecutionProcessorTest();