Skip to content

A SCSI Testing Library layered on Ronnie Sahlberg's libiscsi

Notifications You must be signed in to change notification settings

RichardSharpe/SCSITest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCSITest is a software library that allows you to create SCSI tests.

It currently layers on top of the libiscsi package. It is written in C++.

It could also wrap other facilities, like SCSI passthrough on Linux or Windows.
(SCSI Passthrough using sg devices on Linux. There are examples of how to do
SCSI Passthrough on Windows out there.)

libiscsi was written by Ronnie Sahlberg.

The current structure is:

Top Level

  README   -- This document
  INSTALL  -- Simple installation document
  TODO     -- A list of things to possibly do
  Makefile -- a simple non-recursive Makefile
  patches  -- Any patches that might be needed
  examples -- The location of example programs
  src      -- The source
    iSCSI  -- The iSCSI Transport. Other transports could be added
    SCSI   -- The SCSI Classes. Currently implements:
      SCSIRequest -- Everything else derives from this class
      SCSITestUnitReady
      SCSIInquiry
      SCSIReportLuns
      SCSIReserve
      SCSIRelease
      SCSIPersistentReserveIn
      SCSIPersistentReserveOut
      SCSIRead
      SCSIReadCapacity

So, you can see that there are plenty of SCSI requests yet to write, but 
most are easy.

Also, a note on the use of boost::thread and the iSCSIBackground task. This is
required if you plan on not sending requests on an iSCSI transport for long
periods of time (in particular, longer than the target's NOP_IN timeout)
because libiscis is syncrhrounous and does not get to handle NOP_IN requests
until we call back into it. One reason you might not get a chance to call
into libiscsi is that you have used ssh to shell into the system under test and
shut the file system down to check its effect on the target and are waiting for
that to complete.

NOTE! You might need to apply the patch in patches to libiscsi until Ronnie
Sahlberg has applied the changes I supplied him with.

The following show what the simple_example.cpp program does:

[(master): iSCSILibWrapper] $ ./examples/simple_example 10.200.3.116
Connecting to iqn.2011-07.com.example:testtarget1:10.200.3.116
Target "iqn.2008-09.com.scalecomputing:10.200.3.116.test" is at address "10.200.3.116:3260,1"
Target "iqn.2008-09.com.scalecomputing:10.200.3.116.target2" is at address "10.200.3.116:3260,1"
Target "iqn.2008-09.com.scalecomputing:10.200.3.116.target1" is at address "10.200.3.116:3260,1"

Connecting to target iqn.2008-09.com.scalecomputing:10.200.3.116.target2 at address 10.200.3.116:3260,1

Sending REPORT LUNS request
Number of LUNs reported: 2

About to issue TEST UNIT READY for lun 0
Received expected BUS RESET
T10 Vendor ID for LUN 0 is "SCALE   "
Product ID for LUN 0 is "Storage Node"
Product Rev for LUN 0 is "56  "
Lun 0 supports VPD Page 0, checking page 0x80
LUN 0 Unit Serial Num is "dd979cf0"

About to issue TEST UNIT READY for lun 1
Received expected BUS RESET
T10 Vendor ID for LUN 1 is "SCALE   "
Product ID for LUN 1 is "Storage Node"
Product Rev for LUN 1 is "56  "
Lun 1 supports VPD Page 0, checking page 0x80
LUN 1 Unit Serial Num is "F573619C2BF78001"

Logging out and disconnecting

Test done!

About

A SCSI Testing Library layered on Ronnie Sahlberg's libiscsi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages