test-tool: remove unused iscsi_queue_pdu() symbol overload

All users have now been changed to overload via the iscsi_ctx transport
callback, so the dlsym based overloading can now be dropped.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2019-09-16 16:02:36 +02:00
parent 2ae45ac15d
commit dd17293bcc
3 changed files with 0 additions and 27 deletions

View File

@@ -119,8 +119,6 @@ int readonly;
int sbc3_support; int sbc3_support;
int maximum_transfer_length; int maximum_transfer_length;
int (*real_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
static const unsigned char zeroBlock[4096]; static const unsigned char zeroBlock[4096];
/** /**
@@ -569,15 +567,6 @@ wait_until_test_finished(struct iscsi_context *iscsi, struct iscsi_async_state *
} }
} }
int
iscsi_queue_pdu(struct iscsi_context *iscsi, struct iscsi_pdu *pdu)
{
if (local_iscsi_queue_pdu != NULL) {
local_iscsi_queue_pdu(iscsi, pdu);
}
return real_iscsi_queue_pdu(iscsi, pdu);
}
int int
orwrite(struct scsi_device *sdev, uint64_t lba, orwrite(struct scsi_device *sdev, uint64_t lba,
uint32_t datalen, int blocksize, int wrprotect, uint32_t datalen, int blocksize, int wrprotect,

View File

@@ -782,7 +782,6 @@ struct iscsi_async_state {
void wait_until_test_finished(struct iscsi_context *iscsi, struct iscsi_async_state *test_state); void wait_until_test_finished(struct iscsi_context *iscsi, struct iscsi_async_state *test_state);
struct iscsi_pdu; struct iscsi_pdu;
int (*local_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
struct scsi_command_descriptor *get_command_descriptor(int opcode, int sa); struct scsi_command_descriptor *get_command_descriptor(int opcode, int sa);

View File

@@ -59,12 +59,6 @@ int loglevel = LOG_NORMAL;
struct scsi_device *sd = NULL; /* mp_sds[0] alias */ struct scsi_device *sd = NULL; /* mp_sds[0] alias */
static unsigned int maxsectors; static unsigned int maxsectors;
/*
* this allows us to redefine how PDU are queued, at times, for
* testing purposes
*/
int (*real_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
/***************************************************************** /*****************************************************************
* *
* list of tests and test suites * list of tests and test suites
@@ -805,7 +799,6 @@ test_setup(void)
{ {
task = NULL; task = NULL;
read_write_buf = NULL; read_write_buf = NULL;
local_iscsi_queue_pdu = NULL;
} }
void void
@@ -1214,14 +1207,6 @@ main(int argc, char *argv[])
mp_num_sds++; mp_num_sds++;
} }
/* So that we can override iscsi_queue_pdu in tests
* and replace or mutate the blob that we are about to write to the
* wire.
* This allows such tests to do their mutates and then call out
* to the real queueing function once they have modified the data.
*/
real_iscsi_queue_pdu = dlsym(RTLD_NEXT, "iscsi_queue_pdu");
if ((mp_num_sds == 0) || (mp_sds[0]->iscsi_url == NULL if ((mp_num_sds == 0) || (mp_sds[0]->iscsi_url == NULL
&& mp_sds[0]->sgio_dev == NULL)) { && mp_sds[0]->sgio_dev == NULL)) {
#ifdef HAVE_SG_IO #ifdef HAVE_SG_IO