Why RebootForDeiceRecovery step fails during HLK , DF - Concurrent Hardware And Operating System (CHAOS) Test (Development and Intergration).

isjung 0 Reputation points
2024-05-29T07:41:31.5+00:00

Hi.

I am currently in the process of HLK certifying the PCIe video capture card driver.

The development environment is as follows.

HLK Server OS: window server 2019 Standard

Taget OS BuildNumber: Win10 1904

Drvier: KMDF 1.11

Connect Slot: PCIe x4

Hardware: FPGA design

I am currently failing at the RebootForDeiceRecovery stage of the WHLK DF - CHAOS process.

I also applied the latest HLK filter.

https://learn.microsoft.com/ko-kr/windows-hardware/test/hlk/user/windows-hardware-lab-kit-filters

Before applying the filter, the run test failed due to the following reasons, but after applying the filter, it is progressing to Passed. Is this related to the current problem?


Summary of Non-passing Tests:

    PNPDTest::PNPDisableAndEnableDevice#metadataSet0 [Failed]

    PNPDTest::PNPRemoveAndRestartDevice#metadataSet0 [Failed]

    PNPDTest::PNPCancelRemoveDevice#metadataSet0 [Failed]

    PNPDTest::PNPCancelStopDevice#metadataSet0 [Failed]

    PNPDTest::PNPTryStopAndRestartDevice#metadataSet0 [Failed]

    PNPDTest::PNPTryStopDeviceRequestNewResourcesAndRestartDevice#metadataSet0 [Failed]

    PNPDTest::PNPTryStopDeviceAndFailRestart#metadataSet0 [Failed]

    PNPDTest::PNPSurpriseRemoveAndRestartDevice#metadataSet0 [Failed]

    PNPDTest::PnpTryStopDeviceRequestForceNewResources#metadataSet0 [Failed]

Summary: Total=9, Passed=0, Failed=9, Blocked=0, Not Run=0, Skipped=0

WDTF_TEST                 : CHAOS test threads have terminated

EndGroup: CHAOS::RunCHAOSTest [Passed]

I passed all 52 out of 54 tests and am only failing the CHAOS test.

I passed the DF-PNP Surprise Remove Device Test, which is a similar test, but I don't know why CHAOS is failing.

"WDTF_TEST: Found a device with a non-zero or ghost trouble code." In the text below, error code: 0x0, error text: error 0x00000000.

I don't know why it failed. A value of 0x0 usually means success. Yes?

I imagine this too. Could it be that the error text value is "Error 0x00000000", making it impossible to compare the character with the constant 0x0 and failing with an error? (See result picture below)

What really confuses me is that when I run it on the target PC using Export Test Run, it passes.

To check if it's a problem with my code, I created a KMDF project in Visual Studio 2022 and ran HLK without modification, but it failed at the same step as mine.

Is there anything I can do in this situation?

I don't know what to do to solve this problem.

If you have any little advice for me, let me know.

Thanks in advance.CHAOS1

CHAOS2

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,626 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
126 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. isjung 0 Reputation points
    2024-07-15T09:07:11.31+00:00

    It seemed to have solved my problem.

    I am leaving this for reference to others.

    I think my problem was caused by WDFREQUEST not being organized during the CHAOS test process.

    I suspected there was a WDFREQUEST that didn't do WdfRequestComplete, so I added WdfRequestMarkCancelableEx, but that didn't solve the problem.

    It was determined that there was one WDFREQUEST that was not received from KMDF, so it was resolved by adding the following function to the EvtDevicePrepareHardware and EvtDeviceReleaseHardware callback functions.

    Code added to EvtDevicePrepareHardware function

     WdfIoQueuePurge(
     ctx->entryQueue,
     WDF_NO_EVENT_CALLBACK,
     WDF_NO_CONTEXT
     );
     WdfIoQueueStart(ctx->entryQueue);
    

    Code added to EvtDeviceReleaseHardware function

     WdfIoQueuePurgeSynchronously(ctx->entryQueue);
    

    ctx->entryQueue was created with WdfIoQueueCreate. Each person must create a CONTEXT according to their code and use it.

    Hope this helps.

    0 comments No comments

  2. isjung 0 Reputation points
    2024-07-15T09:08:32.87+00:00

    Deleted because it is a duplicate.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.