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 <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2012-06-03 09:15:09 +10:00
parent 288fd5e9fe
commit 5eca632542

View File

@@ -23,6 +23,7 @@
#include <string.h>
#include <poll.h>
#include <popt.h>
#include <fnmatch.h>
#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;
}