Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-17483

Test_ProcessTimes in ntdll_apitest is flaky

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None

    Description

      Test_ProcessTimes in modules/rostests/apitests/ntdll/NtQueryInformationProcess.c tries to prove that time elapsed between two queries of NtQuerySystemTime by performing some busy-waiting in between.

      However, this test is flaky not just under ReactOS, but also under Windows.
      GeoB99's screenshot confirms that under Windows Server 2003 (https://github.com/reactos/reactos/pull/2906#issuecomment-641274438) and I have just witnessed NtQueryInformationProcess.c:165: Test failed: KernelTime values inconsistent. Expected 156250 > 156250 under Windows 10.

      I see why busy-waiting is used over a simple Sleep call here, but no idea how to fix that reliably. Increasing SPIN_TIME by a factor of 10 emits the following failures for me:

      NtQueryInformationProcess.c:129: Test failed: KernelTime is 0
      NtQueryInformationProcess.c:158: Test failed: KernelTime is 0
      NtQueryInformationProcess.c:165: Test failed: KernelTime values inconsistent. Expected 0 > 0
      

      Attachments

        Activity

          People

            ThFabba ThFabba
            Colin Finck Colin Finck
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: