From 95d763d9f9a334897d5e65857b02605f1b282141 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 1 Jun 2015 21:16:39 -0700 Subject: [PATCH] TESTS: Add comment to describe why we keep a pointer around for iscsi_queue_pdu Signed-off-by: Ronnie Sahlberg --- test-tool/iscsi-test-cu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test-tool/iscsi-test-cu.c b/test-tool/iscsi-test-cu.c index 11dd7a7..c5b9e19 100644 --- a/test-tool/iscsi-test-cu.c +++ b/test-tool/iscsi-test-cu.c @@ -1077,7 +1077,12 @@ main(int argc, char *argv[]) mp_num_sds++; } - /* XXX why is this done? */ + /* 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