Unit testing and code coverage questions

Unit testing and code coverage by hand aren’t the greatest joys in life. Anybody care to suggest their favorite tools for getting code coverage (branch, line, etc.)? How about reaching those corner cases? Have you better ways than forcing conditions with WinDbg?

I’ve been using CCover from http://www.bullseye.com/ for over a dozen
years. It works well in the kernel.

What we are missing is good fault injection into the kernel. Microsoft
has a little but it basically is failing allocations once for a
location, and little else. I’ve seen a few macro’s and wrappers used
by firms to do better than Microsoft but what we are missing is a
comprehensive fault injection package, and a good toolkit for writing
device simulations.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@hotmail.com” wrote in message
news:xxxxx@ntdev:

> Unit testing and code coverage by hand aren’t the greatest joys in life. Anybody care to suggest their favorite tools for getting code coverage (branch, line, etc.)? How about reaching those corner cases? Have you better ways than forcing conditions with WinDbg?

Well;

There is a guy at MSFT that created a pretty awesome fault injection framework that we put to good use in my previous job. If I can remember the name of the tool or the name of the creator I will forward it on to the list. I don’t think it was ARM specific, but I don’t know for sure.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Monday, March 04, 2013 2:08 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Unit testing and code coverage questions

I’ve been using CCover from http://www.bullseye.com/ for over a dozen years. It works well in the kernel.

What we are missing is good fault injection into the kernel. Microsoft has a little but it basically is failing allocations once for a
location, and little else. I’ve seen a few macro’s and wrappers used
by firms to do better than Microsoft but what we are missing is a comprehensive fault injection package, and a good toolkit for writing device simulations.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@hotmail.com” wrote in message
news:xxxxx@ntdev:

> Unit testing and code coverage by hand aren’t the greatest joys in life. Anybody care to suggest their favorite tools for getting code coverage (branch, line, etc.)? How about reaching those corner cases? Have you better ways than forcing conditions with WinDbg?


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

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

I use a COVERAGE_HIT macro after each closing brace and the static array of flags.

If you dump this array to the Windows event log later, this allows testing without the QA automated framework using WinDbg, coverage tools or manual analyzis. Also, the QA people can be disallowed from source access.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Unit testing and code coverage by hand aren’t the greatest joys in life. Anybody care to suggest their favorite tools for getting code coverage (branch, line, etc.)? How about reaching those corner cases? Have you better ways than forcing conditions with WinDbg?
>