64b27d5fd2c9166d728675c4679f79076f8578f3
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 */
12 #include <ndk/ntndk.h>
18 static VOID
KeStallExecutionProcessorTest(VOID
)
21 LARGE_INTEGER TimeStart
, TimeFinish
;
23 DPRINT1("Waiting for 30 secs with 50us stalls...\n");
24 KeQuerySystemTime(&TimeStart
);
25 for (i
= 0; i
< (30*1000*20); i
++)
27 KeStallExecutionProcessor(50);
29 KeQuerySystemTime(&TimeFinish
);
30 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 30
32 DPRINT1("Waiting for 30 secs with 1000us stalls...\n");
33 KeQuerySystemTime(&TimeStart
);
34 for (i
= 0; i
< (30*1000); i
++)
36 KeStallExecutionProcessor(1000);
38 KeQuerySystemTime(&TimeFinish
);
39 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 30
41 DPRINT1("Waiting for 30 secs with 1us stalls...\n");
42 KeQuerySystemTime(&TimeStart
);
43 for (i
= 0; i
< (30*1000*1000); i
++)
45 KeStallExecutionProcessor(1);
47 KeQuerySystemTime(&TimeFinish
);
48 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 43
50 DPRINT1("Waiting for 30 secs with one huge stall...\n");
51 KeQuerySystemTime(&TimeStart
);
52 KeStallExecutionProcessor(30*1000000);
53 KeQuerySystemTime(&TimeFinish
);
54 DPRINT1("Time elapsed: %d secs\n", (TimeFinish
.QuadPart
- TimeStart
.QuadPart
) / 10000000); // 30
57 START_TEST(KeProcessor
)
59 KeStallExecutionProcessorTest();