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>
* 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>
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>
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>
0410 is the first test for the MMC commandset.
This commandset is in hindsight a bit more complex than other commandsets
in that we have to handle quite a lot of cases :
1, if it is not a MMC device, we should check we get INVALID_OPCODE and then
bail.
Then if it is a MMC device, there are at least three different cases we have to
handle:
2.a If there is no medium in the device
2.b there is media, but the medium is blank
2.c there is readable medium
this makes MMC tests a lot more complex than other commandsets
so we have to try to get this one as nice and simple as possible so we can
reuse this test as the framework when adding other MMC tests.
(even the 2.b test is not 100% right, since if the medium is BR, then a blank disk will fail with sense, but blank pre-BD mediums will not fail the READTOC command)