Test failure [DF - Fuzz Query and Set File Information Test (Certification)]

Hi,
we are trying to certify our virtual serial port by running WHQL testing.
in this process some test are getting failed(hang) with some error
messages. the test are as follows.

1.DF - Fuzz Query and Set File Information Test (Certification)
WDTF_FUZZTEST : Test thread exceeded timeout limit. Terminating thread
WDTF_FUZZTEST : Last logged operation: ZwSetVolumeInformationFile for
FileFsLabelInformation complete
2. DF-FUZZ Query and Set Security Test (Certification)
WDTF_FUZZTEST : Test thread exceeded timeout limit. Terminating thread
WDTF_FUZZTEST : Last logged operation: ZwSetVolumeInformationFile for
FileFsLabelInformation complete

  1. DF - Concurrent Hardware And Operating System (CHAOS) Test
    (Certification)

All the tests are passed excepts these three tests.i googled for this but
didnt found much.

please do provide some inputs why these tests are failing. do i need to
handle any Irp’s in my driver sources to handle ZwSetVolumeInformationFile
Api.

i am using windows hardware certification kit for 8.1 with latest filter.

Is your driver WDF or wdm? If wdm, are you setting a default dispatch routine for all MJ codes and what is the code for unhandled code?

Bent from my phone


From: xxxxx@lists.osr.com on behalf of johnny basha
Sent: Wednesday, August 16, 2017 7:19:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Test failure [DF - Fuzz Query and Set File Information Test (Certification)]

Hi,
we are trying to certify our virtual serial port by running WHQL testing. in this process some test are getting failed(hang) with some error messages. the test are as follows.

1.DF - Fuzz Query and Set File Information Test (Certification)
WDTF_FUZZTEST : Test thread exceeded timeout limit. Terminating thread
WDTF_FUZZTEST : Last logged operation: ZwSetVolumeInformationFile for FileFsLabelInformation complete

2. DF-FUZZ Query and Set Security Test (Certification)
WDTF_FUZZTEST : Test thread exceeded timeout limit. Terminating thread
WDTF_FUZZTEST : Last logged operation: ZwSetVolumeInformationFile for FileFsLabelInformation complete

3. DF - Concurrent Hardware And Operating System (CHAOS) Test (Certification)

All the tests are passed excepts these three tests.i googled for this but didnt found much.

please do provide some inputs why these tests are failing. do i need to handle any Irp’s in my driver sources to handle ZwSetVolumeInformationFile Api.

i am using windows hardware certification kit for 8.1 with latest filter.
— NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at

our is a WDM driver and yes we are setting default dispatch routine for all MJ codes.
the code default dispatch routine is simply completing the Irp.the code is as follows.

NTSTATUS
DefaultDispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
NTSTATUS status = STATUS_SUCCESS;

DBGPRINT( DBG_COMP_READ, DBG_LEVEL_VERBOSE,
(“\n ********DefaultDispatch : MajorFunction(0x%X)**********\n”,IoGetCurrentIrpStackLocation(Irp)->MajorFunction));

COMPLETE_REQUEST( Irp, status, 0);

return status;
}
and the completion routine
#define COMPLETE_REQUEST( _pIrp, _Status, _Information ) \
{ \
ASSERT( _pIrp != NULL ); \
ASSERT( KeGetCurrentIrql() <= DISPATCH_LEVEL ); \
DBGPRINT( DBG_COMP_WRITE, DBG_LEVEL_VERBOSE, (“COMPLETE_REQUEST: IRQL(0x%X)\n”,KeGetCurrentIrql())); \
_pIrp->IoStatus.Status = _Status; \
_pIrp->IoStatus.Information = _Information; \
IoCompleteRequest( _pIrp, IO_NO_INCREMENT ); \
}

this code was written long back

I don’t think you want to be completing all unhandled MJ codes successfully. IIRC the default handler (as set by the kernel) fails all unhandled io as the default. In your case you are completing io as successful but not setting the expected values/data on the request, which is not what you want.

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@gmail.com xxxxx@lists.osr.com
Sent: Wednesday, August 16, 2017 8:27:23 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Test failure [DF - Fuzz Query and Set File Information Test (Certification)]

our is a WDM driver and yes we are setting default dispatch routine for all MJ codes.
the code default dispatch routine is simply completing the Irp.the code is as follows.

NTSTATUS
DefaultDispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
NTSTATUS status = STATUS_SUCCESS;

DBGPRINT( DBG_COMP_READ, DBG_LEVEL_VERBOSE,
(“\n ********DefaultDispatch : MajorFunction(0x%X)**********\n”,IoGetCurrentIrpStackLocation(Irp)->MajorFunction));

COMPLETE_REQUEST( Irp, status, 0);

return status;
}
and the completion routine
#define COMPLETE_REQUEST( _pIrp, _Status, _Information ) <br> { <br> ASSERT( _pIrp != NULL ); <br> ASSERT( KeGetCurrentIrql() <= DISPATCH_LEVEL ); <br> DBGPRINT( DBG_COMP_WRITE, DBG_LEVEL_VERBOSE, (“COMPLETE_REQUEST: IRQL(0x%X)\n”,KeGetCurrentIrql())); <br> _pIrp->IoStatus.Status = _Status; <br> _pIrp->IoStatus.Information = _Information; <br> IoCompleteRequest( _pIrp, IO_NO_INCREMENT ); <br> }

this code was written long back


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

Yup. With STATUS_INVALID_DEVICE_REQUEST and an Information field of zero.

(Please don’t set a default dispatch routine… just leave the entries you don’t handle as zero. Or, set to whatever is set when the DRIVER_OBJECT is created. But there’s no reason to provide a default handler, and providing one just confuses future maintainers).

Peter
OSR
@OSRDrivers

thank you very much Doron and peter for your valuable inputs. its worked for me.

i have removed the defaultdispatch routine to all MJ codes and set to only those who are required for me. now both above mentioned test are getting passed.

but it leads to some other test fails [DF - Fuzz Misc API test (Certification)] with BSOD BugCheck 44, {fffff9800d41ed80, 346, 0, 0}
i haven’t change any thing except removing defaultdispatch to all MJ codes.
i will check in my sources what leads to this bugcheck.
thank you.

BugCheck 0x44 is multiple IRP completions.

You’re calling IoCompleteRequest more than one for a single IRP.

Should be pretty easy to find. You bug check right where you’re doing the call, and the IRP pointer is in the Bug Check Code.

Peter
OSR
@OSRDrivers