Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

Detect NDIS WHQL Test

ronakdoshironakdoshi Member Posts: 26

Hello,

I wanted to know if there is any way or macro that can be used in miniport drivers to detect if WHQL NDISTest 6.x is being run or not?

Reason: Certain times when WHQL test is being run, I need to change the ring size of the miniport driver to pass the test. However, the defaults work fine on regular setups.

So, I wanted to know if I can use any macro to detect that WHQL test is being run and my driver can change the default to larger ring size when the driver is loaded. Any pointer to any documentation is appreciated.

Thanks

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,907

    That's called "cheating". If you can't pass the test, then there's something wrong.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • ronakdoshironakdoshi Member Posts: 26

    That's called "cheating". If you can't pass the test, then there's something wrong.

    Ummm...I don't think so. The example I gave is of receive ring size which will have Minimum value, Maximum value and a default value.

    For e.g. Min = 128, Max = 2048, Default = 512
    The default value chosen can be for many reasons based on the driver and real world setups (memory usage, microbenchmark performance, buffers configuration, etc). Now, for WHQL test, for certain tests 512 is enough but for some tests I need to set more than 512 as ring size to pass the test because the packets get dropped for the default ring size (512).

    This does not mean I will choose higher defaults for the driver because WHQL is saying so, because real world setups have different requirements. We cannot use max value as the ring size default to avoid packet drops in WHQL test. So, I thought to use a different default (within the ring size range) for WHQL tests. Here, I am not bypassing the test, but using different valid value within the range (what we usually see the users set based on their requirements).

    Thanks

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,399

    There is indeed a fine line between “cheating” and having a “compliance” mode in which your product can usefully run that also allows it to pass the WHQL tests. The key, in my opinion, is that the “compliance” mode has to result in a useful, if not optimum or even maximally functional, product. But it needs to be a configuration that a customer could realistically choose to run your product, if they wanted to run it “just exactly like it was to pass WHQL” and still do useful work.

    Having said that, you don’t need to “detect” anything. Just set the specific parameter values you want to use, and load them from the registry. Or setup the Paramus manually. You can configure as much as you want before running the tests.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • ronakdoshironakdoshi Member Posts: 26

    Having said that, you don’t need to “detect” anything. Just set the specific parameter values you want to use, and load them from the registry. Or setup the Paramus manually. You can configure as much as you want before running the tests.

    Thank you Peter. That is exactly what I do currently. I manually change the value of ring size (within valid limits what a user could configure as and when required) and then run the tests. However, I was looking for a way to avoid this manual intervention of changing configurations before running the tests and simply load the tests and run them all. I run these tests on variety of different Windows Oses and need to change the config on each of those machines.

    hmm...seems we do not have a way to identify if NDIS tests have been loaded.

  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,426
    via Email
    And WHQL mode test settings are done routinely in many organizations. The
    WHQL tests are fine for some purposes, but are frequently
    inadequate/inappropriate for special purpose devices/device stacks.

    Mark Roddy
  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,399

    WHQL tests... are frequently inadequate/inappropriate

    Full stop right there.

    Discretion truly is the better part of valor.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Developing Minifilters 24 May 2021 Live, Online
Writing WDF Drivers 14 June 2021 Live, Online
Internals & Software Drivers 2 August 2021 Live, Online
Kernel Debugging 27 Sept 2021 Live, Online