WHQL test PNPDTest::PNPRemoveAndRestartDevice#metadataSet0 failure

WDTF_SIMPLE_IO : Device Status: Status Flags=0x1802501 (DN_ROOT_ENUMERATED DN_NEED_RESTART DN_HAS_PROBLEM DN_DISABLEABLE DN_NT_ENUMERATOR DN_NT_DRIVER) Problem Code=e (CM_PROB_NEED_RESTART) WexTraceInfo ThreadId=5676 ProcessId=3416 TimeStamp=2806638182 LogSessionId=1

Please help me with some suggestions on how to debug this WHQL failure. I am running driver verifier for all the drivers involved with standard verifier settings.
What might be common suspects in WDF driver for this kind of failure?

CM_PROB_NEED_RESTART means your installation couldn’t finish without restarting the computer. That can mean (a) your driver was already loaded and a handle was open, or (b) you require a newer version of KMDF than what is installed. What kind of driver is it?

Thanks Tim the issue was some what similar to option a.
During RemoveDevice the driver creates a workitem to cleanup the device and the sync was done using a timeout on an event in the unload. But the workitem was taking a lot more time than timeout. So used the event and signaled the event at the end workitem callback, used a wait in unload then the WHQL test passed.
I was able to figure out the problem by putting entry and exit prints in the remove device, unload and workitem callback, ran the WHQL test in the client machine with debugger attached. I could see the logs from the WHQL test coming after unload but before workitem exit.