summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Moseley <[email protected]>2023-01-09 13:32:41 -0800
committerGitHub <[email protected]>2023-01-09 13:32:41 -0800
commit921e951006d8cb403d59f9747c5495686a4aaed0 (patch)
tree84f34a7fdd4a474567070f033e6f5de5a2036443
parent995dd623433e1edac83bc80f812ec33d30d967cf (diff)
Update to DV-FailDriver-WDM (#823)
* Removed unsupported install section - This change removes the unsupported install method from the .inf file. * Updated readme with DevGen example - Add section to readme to encourage the usage of DevGen. - Added example of how to use DevGen when installing sample driver. * Update readme - updated README.md based on the given suggestions * More updates to readme - added link to SwDevice - fixed missing back tick
-rw-r--r--tools/dv/samples/DV-FailDriver-WDM/README.md16
-rw-r--r--tools/dv/samples/DV-FailDriver-WDM/driver/defect_toastmon.inf3
2 files changed, 16 insertions, 3 deletions
diff --git a/tools/dv/samples/DV-FailDriver-WDM/README.md b/tools/dv/samples/DV-FailDriver-WDM/README.md
index 532071c7..1272a296 100644
--- a/tools/dv/samples/DV-FailDriver-WDM/README.md
+++ b/tools/dv/samples/DV-FailDriver-WDM/README.md
@@ -25,6 +25,22 @@ The DV-FailDriver-WDM sample driver contains intentional code errors that are de
See [Deploying a Driver to a Test Computer](https://docs.microsoft.com/windows-hardware/drivers/develop/deploying-a-driver-to-a-test-computer) for details on how to deploy the sample.
+#### New
+
+It is highly encouraged when testing a driver to use [DevGen](https://learn.microsoft.com/windows-hardware/drivers/devtest/devgen) to create a [SwDevice](https://learn.microsoft.com/windows/win32/api/_swdevice/).
+
+__DevGen Usage Example__
+
+1. From a terminal (running as admin) on test computer go to the WDK tools path and run `.\devgen /add /bus SWD /hardwareid root\defect_toastmon`. ***If WDK is not available on test computer, simply copy over `devgen.exe`***
+
+2. There is now a `Generic software device` available in the system. ***Use Device Manager as a simple means to inspect or from a terminal run `pnputil /enum-devices /deviceid "root\defect_toastmon"`.***
+
+3. Now that there is a device with the appropriate hardware ID, deploy/install driver sample accordingly.
+
+> Note: Use `.\devgen /remove "<Device instance path>"` to remove SW device (the path can be copied from output of `.\devgen /add` or from Device Manager).
+>
+> Device instance path example `"SWD\DEVGEN\{D0299946-2EC2-C146-B00B-E01144166F8B}"`
+
## Test the sample
See [How to test a driver at runtime](https://docs.microsoft.com/windows-hardware/drivers/develop/how-to-test-a-driver-at-runtime-from-a-command-prompt) for details on how to run tests on the Toastmon driver.
diff --git a/tools/dv/samples/DV-FailDriver-WDM/driver/defect_toastmon.inf b/tools/dv/samples/DV-FailDriver-WDM/driver/defect_toastmon.inf
index 44975b91..d1342b4c 100644
--- a/tools/dv/samples/DV-FailDriver-WDM/driver/defect_toastmon.inf
+++ b/tools/dv/samples/DV-FailDriver-WDM/driver/defect_toastmon.inf
@@ -58,9 +58,6 @@ StartType = 1 ; SERVICE_SYSTEM_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\defect_toastmon.sys
-[DeviceInstall32]
-AddDevice=ROOT\Samples\0001,,ToastMonbuggy
-
[ToastMonBuggy]
HardwareIds=root\defect_toastmon