home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / CBMDevKit5.dms / CBMDevKit5.adf / DOCS / tooldocs.lha / io_torture.doc < prev    next >
Encoding:
Text File  |  1993-11-04  |  1.9 KB  |  45 lines

  1. io_torture.doc
  2.  
  3. Io_torture is a tool which can be used to check for improper use
  4. or reuse of device IO requests.
  5.  
  6. IO_torture should be part of the standard test suite for all products.
  7.  
  8. Exec device IO usage is tracked by io_torture.  If an IORequest is reused
  9. while still active, io_torture will print a warning message on the serial
  10. port (parallel for io_torture.par).
  11.  
  12. Current plan of io_torture:
  13.  
  14.         SendIO() - Check that message is free.  Check for ReplyPort.
  15.         Be sure request is not linked into a list.
  16.  
  17.         BeginIO() - Check that message is free.  Check for ReplyPort.
  18.         Be sure request is not linked into a list.
  19.  
  20.         OpenDevice() - Mark message as free.  If error, trash IO_DEVICE,
  21.         IO_UNIT and LN_TYPE.
  22.         Be sure request is not linked into a list.
  23.  
  24.         CloseDevice() - Check that message is free.  Trash IO_DEVICE,
  25.         IO_UNIT.
  26.  
  27.  
  28. Io_torture does not currently check for another common mistake:
  29. After virtually all uses of AbortIO(IORequest), there should be a
  30. call to WaitIO(IORequest).  AbortIO() asks the device to finish
  31. the I/O as soon as possible; this may or may not happen instantly.
  32. AbortIO() does not wait for or remove the replied message.
  33.  
  34. Note regarding NT_MESSAGE:  NT_MESSAGE would seem to be the correct node
  35. type for an IO request which is newly initialized.  However, part of
  36. how io_torture works is that it makes sure in-use requests are marked as
  37. NT_MESSAGE, and would normally complain if such an NT_MESSAGE came
  38. through BeginIO or SendIO (as it would signify reuse before ReplyMsg).
  39. So that io_torture will not complain about a freshly initialized
  40. MT_MESSAGE IO request, io_torture also checks to see if the message
  41. has ever been linked into a list.  If it has not, io_torture will
  42. let the NT_MESSAAHE marked request by without complaining.  This
  43. is necessary because the amiga.lib CreateExtIO and CreateStdIO
  44. historically set a newly created IO request node type to NT_MESSAGE.
  45.