Solaris 8 Software Developer Supplement

Setting Up the Test Harness

The driver hardening test harness is part of the Solaris Developer Cluster and the Entire Distribution Cluster. If you have not installed either of these Solaris clusters, you must manually install the test harness packages appropriate for your platform.

Installing the Test Harness

To install the test harness packages (SUNWftduu, SUNWftdur, and SUNWftdux), use pkgadd(1M).

As superuser, go to the directory in which the packages are located and type:

# pkgadd -d . SUNWftduu SUNWftdur SUNWftdux

Configuring the Test Harness

After the test harness is installed, edit the /kernel/drv/bofi.conf file to configure the harness to interact with your driver. See the following section for descriptions of the test harness properties.

When the harness configuration is complete, reboot the system to load the harness driver.

Test Harness Properties

The test harness behavior is controlled by boot-time properties that were set in the /kernel/drv/bofi.conf configuration file.

When the harness is first installed, enable the harness to intercept the DDI accesses to your driver by setting these properties:


Bus nexus type, such as the PCI bus


Name of the driver under test

For example, to test a PCI bus network driver called xyznetdrv, set the following property values:


Other properties relate to the use and harness checking of the Solaris DDI data access mechanisms for reading and writing from peripherals that use PIO and transferring data to and from peripherals that use DMA.


When this property is set, the test harness checks the consistency of the arguments that are passed to PIO DAFs.


When this property is set, the test harness verifies that the mapped address that is returned by ddi_map_regs_setup() is not used outside of the context of the DAFs.


When this property is set, the test harness verifies correct usage of DMA functions and ensures that the driver makes compliant use of ddi_dma_sync().