Commit Graph

827 Commits

Author SHA1 Message Date
Ronnie Sahlberg
eb2a586cc4 Merge remote branch 'gonzoleeman/master' 2012-12-26 05:44:36 -08:00
Ronnie Sahlberg
61ad9b1972 TESTS: Create helpers for verify12 and switch all tests to use them 2012-12-25 16:14:45 -08:00
Ronnie Sahlberg
12179de245 TESTS: create helpers for VERIFY10 and switch all tests over to use it. 2012-12-25 15:48:11 -08:00
Ronnie Sahlberg
2afb5accc4 TESTS: Create helpers for PREFETCH16 and switch all tests over to them 2012-12-25 08:57:05 -08:00
Ronnie Sahlberg
047b650151 TEST: Add helpers for PREFETCH10 and convert all tests to use them 2012-12-25 08:31:30 -08:00
Ronnie Sahlberg
4ee24799ed TESTS: Change all remaining uses of testunitready to use the new helper 2012-12-24 15:09:10 -08:00
Lee Duncan
d72e6b3717 Removed custom struct for tracking Persistent Resvn type. 2012-12-23 21:36:46 -08:00
Ronnie Sahlberg
69dbf8c727 TESTS: Convert 0361 and 0362 to use testunitready helpers 2012-12-23 21:02:43 -08:00
Ronnie Sahlberg
b9c516147a TESTS: Add helpers for testunitready. Change 0000 and 0360 to use new testunitready helpers 2012-12-23 20:49:38 -08:00
Lee Duncan
9ea26fbca5 Cleanup to make tests easier to read. 2012-12-22 14:12:10 -08:00
Lee Duncan
474cec5556 Added new 1130* test file for PGR simple reserve testing.
Added infrastructure to support reading, setting, and
clearing reservations.
2012-12-22 13:50:55 -08:00
Lee Duncan
cc4969d167 Updated to be more modular, and added one test. 2012-12-22 11:09:05 -08:00
Ronnie Sahlberg
0338e4edd0 TEST: Change the last test to be a more simple REGISTER/UNREGISTER test for persisntet registrations. 2012-12-18 20:30:03 -08:00
Ronnie Sahlberg
2a74fc00bc Initial support for PERSISTENT_RESERVER_OUT and add a simple test to show the api 2012-12-17 21:25:46 -08:00
Ronnie Sahlberg
d324a94051 Add test for the range of service actions for PERSISTENT_RESERVE_IN 2012-12-17 19:42:30 -08:00
Ronnie Sahlberg
c60093eafe Add support for PERSISTENT_RESERVE_IN and add a simple test for READ_KEYS 2012-12-17 19:01:50 -08:00
Ronnie Sahlberg
f1d5510e9c TESTS: Add test that we can talk to a target with IMMEDIATE_DATA==NO and INITIAL_R2T==NO 2012-12-01 11:40:07 -08:00
Ronnie Sahlberg
04970ef95e TESTS: Add a new test that does a one block write using unsilicited immediate data
As part of the test also validate the PDU that libiscsi generates and verify that
1, the PDU we send has the F flag set
2, that datasegmentlength for the PDU is one block
2012-12-01 10:45:42 -08:00
Peter Lieven
722eb013c8 TESTS really fix T1040
This finally makes T1040 trigger the cmdsn overflow deadlock.
Its a bad idea to mangle on negotiated parameters as this leads
to protocol errors.
We also need to avoid overlapping writes as this leads also
to protocol errors.
Additionally we test with and with (if available) immediate data.

Signed-off-by: Peter Lieven <pl@kamp.de>
2012-11-28 13:55:55 +01:00
Peter Lieven
c09ee1dab8 Fix test 1040 to really trigger cmdsn deadlock
Signed-off-by: Peter Lieven <pl@kamp.de>
2012-11-28 11:37:23 +01:00
Ronnie Sahlberg
efc556e2e9 TESTS: Create a test that tries to overflow the maxcmdsn counter
so that i/o from the initiator stops flowing and are just queued locally
until teh cmdsn window opens up again.

Send a lot of writes that block until we have processed the R2T
back from the target and verify we can still make process when we
have saturated the cmdsn window and are also blocked waiting for R2Ts.
2012-11-27 19:51:22 -08:00
Bernhard Kohl
219533dc7b Returned buffers from poptGetArgs() are free()ed in poptFreeContext()
Calling "free(url);" causes a core dump in glibc-2.15.

Signed-off-by: Bernhard Kohl <bernhard.kohl@gmx.net>
2012-11-18 14:12:30 -08:00
Ronnie Sahlberg
3ccc2f2834 TESTS: Update the VERIFY10/12/16 tests for BYTCHK==0 2012-11-18 10:10:04 -08:00
Ronnie Sahlberg
5a95010b59 Fix some compiler warnings 2012-11-11 10:12:39 -08:00
Ronnie Sahlberg
9eb26a368d Fix compiler warnings related to 'const' 2012-11-11 10:03:45 -08:00
Arne Redlich
f618d08350 T1030_unsolicited_data_overflow: fix uninitialized variable warning
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-11-02 21:28:40 +01:00
Arne Redlich
13b1f49fe5 T1031_unsolicited_data_out: fix uninitialised variable warning
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-11-02 21:23:47 +01:00
Arne Redlich
d2e68d7a25 T0122_read6_invalid: suppress signed/unsigned comparison warnings
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-11-02 21:16:45 +01:00
Arne Redlich
081ae59cdf T0105_read10_invalid: suppress signed/unsigned comparison warnings
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 17:05:47 +01:00
Arne Redlich
5cd48f87ff T0403_inquiry_supported_vpd: fix signed/unsigned comparison warning
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 17:00:46 +01:00
Arne Redlich
b5372272b1 T0422_reserve6_logout: fix compiler warnings
Remove unused labels and mark unused parameter as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:54:29 +01:00
Arne Redlich
578bdae3af T0421_reserve6_lun_reset: fix compiler warnings
Remove unused label and mark unused parameter as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:53:26 +01:00
Arne Redlich
af33ca36ff T1031_unsolicited_data_out: mark unused parameters as such
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:50:38 +01:00
Arne Redlich
17e8b54759 T1030_unsolicited_data_overflow: remove unused variable
old_first_burst_len is set but never used - remove it. Also replace an
  if (!ptr)
    free(ptr)
with
  free(ptr)

as the check is redundant.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:48:48 +01:00
Arne Redlich
e0555555bb T0430_report_all_supported_ops: fix compiler warnings
* remove unused label
* mark unused parameter
* fix signedness warnings

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:46:01 +01:00
Arne Redlich
ea560255a6 T0424_reserve6_target_reset: fix compiler warnings
Remove unused labels and mark unused parameter as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:40:29 +01:00
Arne Redlich
ab411e4401 T0423_reserve6_sessionloss: fix compiler warnings
Remove unused labels and mark unused parameters as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:34:11 +01:00
Arne Redlich
d402a337e3 T0420_reserve6_simple: fix compiler warnings
Mark unused parameter as such and remove unused labels.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:32:12 +01:00
Arne Redlich
88341c0a73 T0410_readtoc_basic: fix compiler warnings
Remove unused labels and mark unused parameter as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:25:47 +01:00
Arne Redlich
13c253f0dc T0404_inquiry_all_reported_vpd: fix compiler warnings
* mark unused parameter as such
* wrap parens around a bitop
* remove unused labels
* fix error messages

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:20:55 +01:00
Arne Redlich
c195348e4d T0403_inquiry_supported_vpd: fix compiler warnings
Remove unused labels and mark unused parameter as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:12:21 +01:00
Arne Redlich
ea20edb513 T0402_inquiry_evpd: fix compiler warnings
Remove unused label and mark unused parameter as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 16:06:25 +01:00
Arne Redlich
6819637ddc T0401_inquiry_alloclen: fix compiler warnings
Remove unused variables and mark unused parameter as such.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:59:42 +01:00
Arne Redlich
e991146902 T0241_prefetch10_flags: remove unused variable
Pointed out by gcc: num_blocks is set but unused

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:58:31 +01:00
Arne Redlich
1be5fe1bda T0251_prefetch16_flags: remove unused variable
gcc points out that num_blocks is set but never used

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:55:52 +01:00
Arne Redlich
d983cdfc2c T0161_readcapacity16_alloclen: remove unused variable
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:54:33 +01:00
Arne Redlich
34b25f94c1 0122_read6_invalid.c: add missing include
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:53:08 +01:00
Arne Redlich
45ce1537f2 T0400_inquiry_basic: fix compiler warnings
gcc complains about an unused parameter (mark it as such) and unused labels
(remove 'em).

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:52:11 +01:00
Arne Redlich
311a63c61d T0401_inquiry_alloclen: remove unused label
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
2012-10-31 15:50:59 +01:00
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