diff --git a/test-tool/0420_reserve6_simple.c b/test-tool/0420_reserve6_simple.c index 3f8a2ba..5213adc 100644 --- a/test-tool/0420_reserve6_simple.c +++ b/test-tool/0420_reserve6_simple.c @@ -51,7 +51,7 @@ int T0420_reserve6_simple(const char *initiator, const char *url, int data_loss, return -1; } - iscsi2 = iscsi_context_login(initiator, url, &lun); + iscsi2 = iscsi_context_login(initiator2, url, &lun); if (iscsi2 == NULL) { printf("Failed to login to target\n"); return -1; diff --git a/test-tool/iscsi-test.c b/test-tool/iscsi-test.c index b70e440..fad2af0 100644 --- a/test-tool/iscsi-test.c +++ b/test-tool/iscsi-test.c @@ -35,6 +35,8 @@ #include "iscsi-test.h" const char *initiator = "iqn.2007-10.com.github:sahlberg:libiscsi:iscsi-test"; +const char *initiator2 = "iqn.2007-10.com.github:sahlberg:libiscsi:iscsi-test-2"; + static int data_loss = 0; static int show_info = 0; @@ -242,6 +244,7 @@ void print_help(void) { fprintf(stderr, "Usage: iscsi-test [OPTION...] \n"); fprintf(stderr, " -i, --initiator-name=iqn-name Initiatorname to use\n"); + fprintf(stderr, " -I, --initiator-name-2=iqn-name Second initiatorname to use\n"); fprintf(stderr, " -t, --test=test-name Which test to run. Default is to run all tests.\n"); fprintf(stderr, " -l, --list List all tests.\n"); fprintf(stderr, " --info, Print extra info about a test.\n"); @@ -372,6 +375,7 @@ int main(int argc, const char *argv[]) { "usage", 0, POPT_ARG_NONE, &show_usage, 0, "Display brief usage message", NULL }, { "list", 'l', POPT_ARG_NONE, &list_tests, 0, "List all tests", NULL }, { "initiator-name", 'i', POPT_ARG_STRING, &initiator, 0, "Initiatorname to use", "iqn-name" }, + { "initiator-name-2", 'I', POPT_ARG_STRING, &initiator, 0, "Second initiatorname to use for tests using more two sessions", "iqn-name" }, { "test", 't', POPT_ARG_STRING, &testname, 0, "Which test to run", "testname" }, { "info", 0, POPT_ARG_NONE, &show_info, 0, "Show information about the test", "testname" }, { "dataloss", 0, POPT_ARG_NONE, &data_loss, 0, "Allow destructuve tests", NULL },