Commit Graph

90 Commits

Author SHA1 Message Date
Arne Redlich 4d27ecae32 test-tool: fix initiatorname and initiatorname2 issues
gcc-4.6.3 warned about this one on several occasions:
  gcc -DHAVE_CONFIG_H -I.  -I. -I./include "-D_U_=__attribute__((unused))" -I./test-tool  -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -ggdb3 -O0 -MT test-tool/bin_iscsi_test-0000_testunitready_simple.o -MD -MP -MF test-tool/.deps/bin_iscsi_test-0000_testunitready_simple.Tpo -c -o test-tool/bin_iscsi_test-0000_testunitready_simple.o `test -f 'test-tool/0000_testunitready_simple.c' || echo './'`test-tool/0000_testunitready_simple.c
  test-tool/0000_testunitready_simple.c: In function 'T0000_testunitready_simple':
  test-tool/0000_testunitready_simple.c:23:44: warning: declaration of 'initiator' shadows a global declaration [-Wshadow]
  test-tool/iscsi-test.h:20:20: warning: shadowed declaration is here [-Wshadow]

For now the global initiator is renamed to initiatorname1 (and initiator2 is
renamed to initiatorname2, respectively), but ultimately the globals should
probably go away.

While fixing this it also became apparent that initiator-name-2 was parsed
into the "initiator" variable as well.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:32:18 +01:00
Ronnie Sahlberg 6507f4050f Merge pull request #31 from plieven/master
memory leak fixes + suggestion for iscsi context + qemu-kvm bug
2012-10-30 18:54:38 -07:00
Ronnie Sahlberg 9e9c6946c0 TESTS: Add a test that a target handles an unsolicited DATA-OUT correctly.
Send a large number of DATA-OUT PDUs that do not have a matching SCSI-COMMAND
PDU and verify that the target responds correctly. Either by terminating the
session or by just ignoring the data.

Verify also that the target is not "surprised" and crashes.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-10-30 18:44:35 -07:00
Peter Lieven 774ede1f46 ISCSI_URL change strings from dynamic to static 2012-10-30 11:41:51 +01:00
Peter Lieven d989474a36 ISCSI-TEST free strings malloc'ed by libpopt 2012-10-29 22:07:58 +01:00
Jon Grimm b81bdd3932 Merge with upstream 2012-10-25 12:56:26 -05:00
Jon Grimm 1eaca70a52 Add MaintenanceIn: Report Supported Opcodes (all) and testcase. 2012-10-25 12:48:37 -05:00
Peter Lieven 03528f3965 TEST: add skip command to skip individual tests
This patch adds a command to skip individual tests. It additionally accepts
more than one test separated by comma.
2012-10-25 10:27:09 +02:00
Ronnie Sahlberg b700d44f03 TESTS: Add a simple test to check that a target survives huge imemdiate data
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-10-24 21:19:27 -07:00
Ronnie Sahlberg 676bf2372c TEST: Add test that target reset will release a RESERVE6 2012-10-04 21:37:41 -07:00
Ronnie Sahlberg 06e925f2fd TEST: Add a test to verify that reservation are dropped on session termination 2012-10-01 18:41:08 -07:00
Ronnie Sahlberg 30a32b4335 TESTS: Add two tests that RESERVE6 is dropped on LUN-reset as well as session logout 2012-09-30 09:25:39 -07:00
Ronnie Sahlberg b160b95060 TESTS: Add 'initiator2' variable so we can run tests with two different initiatir names
Update the 0420 test to use different initiator names for the two sessions to the target.
2012-09-30 08:25:23 -07:00
Jon Grimm 26d090e191 Add testcase for RESERVE6/RELEASE6 2012-09-27 14:17:24 -05:00
Jon Grimm d6bea3db52 merge fixup 2012-09-24 10:22:58 -05:00
Jon Grimm e55ec72f36 Add Read TOC (0x43) Command Support (and basic testcase). 2012-09-24 10:15:00 -05:00
Ronnie Sahlberg ba14452dc2 TEST: Add a test that reads all reported VPD pages and validates qualifier, type and page-code in the returned data 2012-09-21 20:15:04 -07:00
Ronnie Sahlberg be4f2fdf66 TESTS: Add a test that all mandatory SPC pages are supported by the target 2012-09-21 18:52:51 -07:00
Ronnie Sahlberg 703d9120bc TEST: Add test for TESTUNITREADY
Add an explicit test for this opcode. We already have plenty of implicit tests via the normal iscsi login functions.
2012-09-20 19:38:30 -07:00
Ronnie Sahlberg 6e2f04455f TEST: Add a test that INQUIRY where EVPD==0 but PAGE_CODE!=0 is an error 2012-09-20 18:27:04 -07:00
Ronnie Sahlberg 641027283b TESTS: Add a new test to check standard INQ alloclen
Add a test for the standard INQUIRY data. The iscsi/scsi target should complete
the request successfully for all values of buffersize/allocation_length
of 1 to 255 bytes.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-09-18 19:45:42 -07:00
Ronnie Sahlberg 6b28465a46 TESTS: Add basic test of standard INQUIRY data 2012-09-12 06:55:51 -07:00
Ronnie Sahlberg ed70ced748 TEST: Add test for the flags in STARTSTOPUNIT
Implement a test similar to the SSU flags tests from the Microsoft scsi
compliance test suite.
2012-09-10 21:24:35 -07:00
Ronnie Sahlberg 9fdb2b16b4 TESTS: Add a test for READCAPACITY16 with allocation-length == 0
Add a READCAPACITY16 testcase from the Microsoft scsi compliance test suite.
2012-09-10 20:35:09 -07:00
Ronnie Sahlberg 3af45a0677 TEST: add test for prefetching 0 blocks from a device 2012-09-05 20:17:50 -07:00
Ronnie Sahlberg 8f11b127fe TEST: Add test for PREFETCH10/16 beyond eol 2012-09-05 19:42:14 -07:00
Ronnie Sahlberg ca6875e69d TESTS: Add tests for the flags for PREFETCH10/16 2012-09-05 19:17:16 -07:00
Ronnie Sahlberg 6a24b283f8 TEST: If we timeout a test, drop all wait/out pdus from the list
we dont want the callbacks anymore.
2012-08-31 16:12:21 -07:00
Paolo Bonzini c7b519524c iscsi-test: prepare to return exit status 77 for skipped tests
Teach the test harness to distinguish skipped tests from failed tests.
Return -2 from a skipped test and, if no test was failed but some were
skipped, return 77 from the main program.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-30 17:38:12 +02:00
Ronnie Sahlberg d1c7b17cf5 TEST: Start adding tests for invalid BUFFEROFFSET in DATA-IN 2012-08-12 12:51:37 +10:00
Ronnie Sahlberg 6412834754 TEST: Add test that invalid DATASN for DATAIN is detected as an error
Send a write containing two DATA-IN PDUs in a sequence but both PDUs have DATASN==0
This is an error and the target should react to this as an invalid command

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-08-10 16:08:55 +10:00
Ronnie Sahlberg 0cf42c3662 TESTS: Add a test for ISCSI CMDSN out of range
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-08-10 15:36:10 +10:00
Ronnie Sahlberg 1a387632a9 TEST: Use better default iscsi name for the test tool 2012-08-10 11:27:10 +10:00
Ronnie Sahlberg fbc4f3584b TEST: Add initial test for "test that all mandatory SBC commands are there"
Some tests are just stubs since we underlying vommands have not been
implemented in libiscsi yet.
2012-07-22 08:52:25 +10:00
Ronnie Sahlberg 94cd6bf3b1 TEST: Add test that PREVENTs on different IT_Nexuses do not interfere 2012-07-21 15:04:53 +10:00
Ronnie Sahlberg 313d579464 TEST: Add a test that a LUN reset will clear PREVENTALLOW 2012-07-21 12:05:25 +10:00
Ronnie Sahlberg ca046ab342 TEST: add a test that a Cold Reset will clear PREVENTALLOW 2012-07-21 11:59:34 +10:00
Ronnie Sahlberg 7d0393452c TEST: Add a test that PREVENTALLOW is cleared byb a warm reset 2012-07-21 11:53:26 +10:00
Ronnie Sahlberg 44bf8a5a3a TEST: Add a test that a I_T_Nexus loss clears the PREVENTALLOW on that nexus 2012-07-21 11:17:09 +10:00
Ronnie Sahlberg 5953607743 TEST: add test that we can not eject media when PREVENTALLOW is set on the I_T_nexus 2012-07-21 10:43:33 +10:00
Ronnie Sahlberg 5cf3ccca75 TEST: Add simple test for PREVENTYALLLOWMEDIUMREMOVAL 2012-07-21 10:04:37 +10:00
Ronnie Sahlberg b8e08a355d TESTS: Add test for all media access commands that they fail correctly on ejected media 2012-07-18 08:03:29 +10:00
Ronnie Sahlberg 4a3935770d TEST Add test for powercondition and eject 2012-07-16 21:43:27 +10:00
Ronnie Sahlberg db68e68f6d TEST: add simple test for STARTSTOPUNIT 2012-07-16 21:06:52 +10:00
Ronnie Sahlberg e6ca1451b0 TEST add test for wrprotect field in ORWRITE 2012-07-14 18:38:48 +10:00
Ronnie Sahlberg 030cb9134a Add lba-out-of-range tests for ORWRITE 2012-07-14 17:45:43 +10:00
Ronnie Sahlberg 1ce5d97e57 TEST: Add test for ORWRITE command 2012-07-14 17:29:58 +10:00
Ronnie Sahlberg 17e3355dc2 TEST: Add tests for COMPAREANDWRITE 2012-07-14 13:06:24 +10:00
Ronnie Sahlberg f6705d4691 TESTS: Add tests for writing beyond the end of the LUN for WRITEVERIFY10/12/16 2012-07-14 10:54:15 +10:00
Ronnie Sahlberg 477ee0f6f6 TEST: Add wrprotect tests for WRITEVERIFY10/12/16 2012-07-14 08:54:00 +10:00