From 5eca632542fc3f9e5898aadee64203ac21d53e94 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 3 Jun 2012 09:15:09 +1000 Subject: [PATCH] TEST-TOOL: Allow wildcards for the test name. So that you can run for example all read10 tests using ./bin/iscsi-test --test='*read10*' iscsi://127.0.0.1/iqn.ronnie.test/1 Signed-off-by: Ronnie Sahlberg --- test-tool/iscsi-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test-tool/iscsi-test.c b/test-tool/iscsi-test.c index c9e1fd8..dd2b9f7 100644 --- a/test-tool/iscsi-test.c +++ b/test-tool/iscsi-test.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "iscsi.h" #include "scsi-lowlevel.h" #include "iscsi.h" @@ -252,7 +253,7 @@ int main(int argc, const char *argv[]) } for (test = &tests[0]; test->name; test++) { - if (testname != NULL && strcmp(testname, test->name)) { + if (testname != NULL && fnmatch(testname, test->name, 0)) { continue; }