The following tests must be run at least before releasing a new SRPT version: * Make sure that SRPT compiles and installs without triggering any compiler warning. Use the following command to compile and install SRPT: for d in scst srpt; do make -C $d -s clean && make -C $d -s install; done * Verify the output of run-regression-tests for kernel versions starting at 2.6.23 up to and including the latest released kernel. * Verify that SRPT compiles, installs and works fine when following the instructions in README.ofed for the latest released OFED distribution and at the latest released CentOS, Ubuntu and openSUSE distributions. * Verify that module loading and unloading works fine. * Verify that rejecting logins does not trigger a memory leak, e.g. as follows: * Run the following command on the target system: ${SCST_TRUNK}/scripts/monitor-memory-usage | tee memlog.txt * Run the following command on the initiator system: for ((i=0;i<100000;i++)); do echo 'id_ext=0002c9030003cca2,ioc_guid=0002c9030003cca2,pkey=ffff,dgid=fe800000000000000002c9030003cca3,service_id=0002c9030003cca3' >/sys/class/infiniband_srp/srp-mlx4_0-1/add_target ; done * Verify that an I/O stress test runs fine by running the following command where $dev1 and $dev2 are device nodes created by the SRP initiator and go over different IB connections to the target: for dev in $dev1 $dev2 do fio --bs=4K --buffered=0 --rw=write --ioengine=psync --verify=sha256 \ --verify_fatal=1 --loops=1000 \ --name=partition1 --filename=$dev & done * Verify that the following I/O stress test runs fine: mkfs.ext2 $dev mount $dev /mnt while true; do { sleep 30; killall fio; } & { rm -rf /mnt/test* && fio --verify=md5 -rw=randwrite --size=10m --bs=4k --loops=1000000 --iodepth=64 --group_reporting --sync=1 --direct=1 --norandommap --ioengine=psync --directory=/mnt --name=test --thread --numjobs=80; }; done * Another I/O stress test: (initiator) Write data pattern: lmdd if=internal of=/dev/sdb opat=1 bs=1M count=1000 (target) Verify data: lmdd if=/dev/exported-block of=internal ipat=1 bs=1M count=1000 mismatch=1 (initiator) Verify data: lmdd if=/dev/sdb of=internal ipat=1 bs=1M count=1000 mismatch=1 for ((i=0;i<40;i++)); do lmdd if=/dev/sdb of=internal ipat=1 bs=1M count=1000 mismatch=1 & done * Verify that a SCSI reset works properly by running the following command on an initiator system: sg_reset -d ${initiator_device} * Run the following command on a target system: while true; do /etc/init.d/scst stop; sleep 3; /etc/init.d/scst start; sleep 5; done and the following commands on an initiator system: target_id="id_ext=0002c9030003cca2,ioc_guid=0002c9030003cca2,dgid=fe800000000000000002c9030003cca3,pkey=ffff,service_id=0009030003cca2,ioc_guid=0002c9030003cca2,dgid=fe800000000000000002c9030003cca3,pkey=ffff,service_id=0002c9030003cca2" while true; do date; rmmod ib_srp; modprobe ib_srp; echo "${target_id}" > /sys/class/infiniband_srp/srp-mlx4_0-1/add_target; sleep 2; done and verify that nothing unexpected happens. * Log in twice from an initiator system, and verify that the first session receives a DREQ upon the second login: target_id="id_ext=0002c9030003cca2,ioc_guid=0002c9030003cca2,dgid=fe800000000000000002c9030003cca3,pkey=ffff,service_id=0009030003cca2,ioc_guid=0002c9030003cca2,dgid=fe800000000000000002c9030003cca3,pkey=ffff,service_id=0002c9030003cca2" dmesg -c echo "${target_id}" > /sys/class/infiniband_srp/srp-mlx4_0-1/add_target dmesg -c echo "${target_id}" > /sys/class/infiniband_srp/srp-mlx4_0-1/add_target dmesg -c echo "${target_id}" > /sys/class/infiniband_srp/srp-mlx4_0-1/add_target * Test low memory conditions: load SRPT, reduce the amount of available memory by creating a large file on a tmpfs file system and run a stress test on an initiator system. * Test the state machine for SCST commands in SRPT by using SCST's error injection mechanism. Add the following to scst/src/Makefile, log in from an initiator system and trigger SRP I/O: EXTRA_CFLAGS += -DCONFIG_SCST_DEBUG -g EXTRA_CFLAGS += -DCONFIG_SCST_DEBUG_TM -DCONFIG_SCST_TM_DBG_GO_OFFLINE * Test with multiple values of ib_srp_tablesize in the range 1..128. * Verify that the initiator does not lock up while running the command: fio --bs=512 --buffered=0 --ioengine=sg --rw=read --invalidate=1 --thread --numjobs=8 --loops=10 --gtod_reduce=1 --group_reporting --name=/dev/sdb --filename=/dev/sdb when target processing is delayed by the following command: echo 15 > /sys/module/ib_srpt/parameters/interrupt_processing_delay_in_us