BullseyeCoverage
All files accessed by BullseyeCoverage at run-time are located on the target system in %DriverData%\BullseyeCoverage
,
or if that directory does not exist,
%SystemDrive%\BullseyeCoverage
.
Locating files in %DriverData%\BullseyeCoverage
complies with driver package isolation requirements.
Create the %DriverData%\BullseyeCoverage
directory at the command prompt in administrator mode:
C:\>mkdir %DriverData%\BullseyeCoverage
Copy the coverage file from the host system to this directory whenever you install your driver.
C:\>copy …\test.cov %DriverData%\BullseyeCoverage\test.cov
After testing your kernel code, you can merge the results back with this command:
covmerge -f …\test.cov %DriverData%\BullseyeCoverage\test.cov
The BullseyeCoverage run-time searches for environment variables in the file %DriverData%\BullseyeCoverage\env.txt
,
if it exists.
This ASCII file has the format below.
name1=value1 name2=value2 …
Filenames are relative to the %DriverData%\BullseyeCoverage
directory.
For example,
COVFILE=dir/test.cov
means %DriverData%\BullseyeCoverage\dir\test.cov
.
Do not specify an absolute path for any filename.
The default value for COVFILE is test.cov
which means %DriverData%\BullseyeCoverage\test.cov
.
Run-time error messages are normally displayed in the host debugger
Command window (using the kernel mode support routine DbgPrintEx
).
If no debugger is connected and environment variable
COVERR
is unset, run-time error messages are lost.
Your entry point function name must end with DriverEntry
.
For example, DriverEntry
, FxDriverEntry
, or GsDriverEntry
.
Native mode drivers may run before the \DriverData
symbolic link is established.
Therefore,
if files cannot be found as described above,
the run-time looks for them relative to the root directory of the first volume found by checking
each partition \Device\Harddisk0\Partition
N,
where N is 1 to 9.
For an export driver, you must add a call to the BullseyeCoverage
run-time function cov_term
in your DllUnload
function.
For example:
void __cdecl cov_term(void); NTSTATUS DllUnload() { #if _BullseyeCoverage cov_term(); #endif return STATUS_SUCCESS; }
Updated: 12 Aug 2025
Copyright © Bullseye Testing Technology. All Rights Reserved.