Basic Open Operations

During the Basic Open Operations, Device Path Exerciser repeatedly opens (creates) instances of the specified devices or the devices exported by the specified driver by using different methods and options.

Device Path Exerciser always performs the Basic Open Operations. You do not need to select them and you cannot exclude them from a Device Path Exerciser test session.

Device Path Exerciser performs all open operations in user mode by calling system services (ZwXxx Routines) that are appropriate to the device. If an open call returns a handle to the device, Device Path Exerciser uses the handle to perform the other device tests selected for the test session.

There are five types of Basic Open Operations:

  • Standard open. Device Path Exerciser opens the device asynchronously and specifies only the native device name.

  • Open with added backslash. Device Path Exerciser issues an open call for the device name followed by a backslash (\), such as \device\cdrom\, as though the call were to open a root directory within the device.

    This operation determines how the driver or file system manages open requests in its namespace. In particular, if the device does not support open requests in its namespace, the driver must prevent unauthorized access, either by failing the requests, or by setting the FILE_DEVICE_SECURE_OPEN device characteristic when it calls IoCreateDevice or IoCreateDeviceSecure to create the device object.

  • Open as a named pipe. Device Path Exerciser opens the device and establishes a named pipe to the device. The access parameter (ShareAccess) is initially set to read and write, but is adjusted if the request fails. If the device does not support named pipes, it should fail the request.

  • Open as a mailslot. Device Path Exerciser opens the device as a mailslot. If the device does not support this type of connection, it should fail the request.

  • Open as a tree connection. Device Path Exerciser opens the device as a tree connection for use in remote network access. The access parameter (ShareAccess) is initially set to read and write, but is adjusted if the request fails. If the device does not support this type of connection, it should fail the request.

The parameters used in the open calls vary to accommodate the characteristics of the device and make it likely that the calls succeed. For example, if a basic open operation fails because the call did not meet the security requirements of the device, Device Path Exerciser repeats the open operation with a request for lesser access. For example, if an open operation that requested write access returns a security violation error, the open is repeated with a request for read access.

 

 

Send comments about this topic to Microsoft

Build date: 9/28/2012