Edit job in ndistest 6.5

Hi All

I am trying to use the edit job action in the ndistest 6.5. So, when I click on “edit job” it opens a CPP file, which is formatted in XML. Looks more like a template that has to be processed to generate an actual source CPP file. Nevertheless I tried to edit and save this CPP-XML file. This results in an error saying

“Either the test binary is not present or the test source file has been changed since the last time the test binary is built”

Ok, How do I build this to generate the new test binary. Any insight will greatly help me.

Thanks
Arun

Hi All

Ok. Its a cpp file. It just has a commented header with xml tags inside the comment. I missed this the first time I looked. How could I?! And I see that there has been a dll created for every test case (CPP file). So If I build this file and create the dll I should get the modified test case. So I went around searching for a src file with dllmain(…) but there is none.

I havent got any replies for this question. That means I am either dumb and every one knows how to use “edit job” in ndistest. Or “edit job” is not what I think it is and it is more like “view job”.

Thanks
Arun

Actually, it more than likely has nothing to do with your intelligence quota, but more to do with why you are asking a non-device driver related question in a forum that specializes in developing device drivers. Personally I know exactly zip about NDISTEST any version and would only answer the most basic questions about NDIS such as building, or maybe a query concerning the new WFP. NDISTEST I would touch.

Gary G. Little

----- Original Message -----
From: “arunkumar sundaram”
To: “Windows System Software Devs Interest List”
Sent: Monday, December 6, 2010 1:32:29 PM
Subject: RE:[ntdev] Edit job in ndistest 6.5

Hi All

Ok. Its a cpp file. It just has a commented header with xml tags inside the comment. I missed this the first time I looked. How could I?! And I see that there has been a dll created for every test case (CPP file). So If I build this file and create the dll I should get the modified test case. So I went around searching for a src file with dllmain(…) but there is none.

I havent got any replies for this question. That means I am either dumb and every one knows how to use “edit job” in ndistest. Or “edit job” is not what I think it is and it is more like “view job”.

Thanks
Arun


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Gary

NdisTest is a must know & must use tool for any one developing ndis drivers. In my opinion it is more like a secondary driver verifier for ndis drivers. It is a very extensive test tool that tests all corner cases boundary conditions etc., I have seen ndis Gurus saying start running ndis test the moment a new driver under development starts handling traffic. So in this test we tweak some hot parameters which I have tried and works wonderfully. There is an option called edit job which opens up source file for the test case. Thats what I am interested in.

Thanks
Arun

> NdisTest is a must know & must use tool for any one developing ndis drivers. In my opinion it is more like a secondary driver verifier for ndis drivers.

I agree :slight_smile: NDISTest has some great stuff, even if you’re not developing an NDIS miniport from scratch. For example MPE (the Multi-Path Exerciser) is a genius at finding race conditions and stress bugs all over the NDIS stack.

I am trying to use the edit job action in the ndistest 6.5. … Ok, How do I build this to generate the new test binary.

The very short answer: you cannot.

The way that NDISTest.NET works is that you have these .CPP files that implement the test, and (as you’ve noticed) there’s a big comment at the top that contains test parameters wrapped up in some XML-like structure. You can, for example, use the test parameters to configure the test to work on your NIC with a custom media type.

There are two confusing aspects to this:

  1. Although the menu option says “Edit Job” and shows you the whole test’s source code in notepad, it really means “Edit the XML parameters, or view the test’s source code”. In other words, you can party on the XML parameters, but the actual managed C++ code is effectively read-only. (I mean, you can change the C++ code if you want, but it won’t have any effect on the test, since the test runs out of a pre-compiled .DLL [aka CLR assembly]). On the other hand, NDISTest.NET will open the .CPP file and reparse the XML comment each time the test is run. So changes to the test XML parameter block WILL have an effect on the test.
  2. There is a, er, “feature” in the current version of the WLK (version 1.5) that will warn you if you changed the .CPP file but forgot to recompile the .DLL. This feature is useful for our hard-working testers who *create* the tests here at Microsoft, but it doesn’t do *you* much good since you can’t actually recompile any .DLLs. It’s painful, in fact, because you might want to update the XML parameters without changing the C++ code (a perfectly fine thing to do), but that tricks the timestamp comparison code into thinking you need to recompile a .DLL. The workaround is to edit the XML, then manually update the timestamp on the .DLL. (Incidentally, although Windows lacks a builtin ‘touch’ command, you can get the same effect by running “copy foo.dll+”. The + character is important.) I’ve asked the testers to remove this feature.

The historical perspective is this. Once upon a time, there was only NDISTest. Each test was written in VBScript. This is great, because it’s easy for you (the third-party developer) to crack open a test script and see what it’s trying to do. Even better, you can open the .VBS file in notepad and tweak the test to repro a specific bug, or to really exercise a new feature.

But VBScript has its limits, and we wanted to take advantage of the massive developer productivity of this new-fangled .NET stuff. So NDISTest.NET was created using managed C++. (The original NDISTest is not dead – we still suggest you run it since it tests things that NDISTest.NET does not. All new tests and most attention goes into NDISTest.NET.) However, one problem with .NET is that you can’t just pop the .DLL into notepad to tweak the script anymore. We still ship the .CPP source code so at least you can see what the test is trying to do. And of course, the classic NDISTest with editable VBScript files is still available for you.

BTW, as you have noticed, in addition to the XML parameters at the top of each script, some tests have something called “hot parameters”. These are a newer invention and probably easier to edit since the GUI supports them. But the XML blob is still there for infrequently-edited (not-so-hot) parameters.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Monday, December 06, 2010 12:25 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Edit job in ndistest 6.5

Hi Gary

NdisTest is a must know & must use tool for any one developing ndis drivers. In my opinion it is more like a secondary driver verifier for ndis drivers. It is a very extensive test tool that tests all corner cases boundary conditions etc., I have seen ndis Gurus saying start running ndis test the moment a new driver under development starts handling traffic. So in this test we tweak some hot parameters which I have tried and works wonderfully. There is an option called edit job which opens up source file for the test case. Thats what I am interested in.

Thanks
Arun


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks Jeff for such detailed answer. This clarifies a lot for me. One tiny gripe though :slight_smile: wish that ndistest. Net’s test case codes were modifiable like ndistest.

Thanks again for the support
Arun