bdevio: parse all available cmdline options
The config now has to be provided with '-c' or '--config' param. Change-Id: I999c84d899b1e15cd4f34120016f6a18fc0e84c9 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/421734 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ff0f97cf4d
commit
f727997fd8
@ -38,6 +38,7 @@
|
|||||||
#include "spdk/env.h"
|
#include "spdk/env.h"
|
||||||
#include "spdk/log.h"
|
#include "spdk/log.h"
|
||||||
#include "spdk/thread.h"
|
#include "spdk/thread.h"
|
||||||
|
#include "spdk/event.h"
|
||||||
|
|
||||||
#include "CUnit/Basic.h"
|
#include "CUnit/Basic.h"
|
||||||
|
|
||||||
@ -45,8 +46,6 @@
|
|||||||
#define BUFFER_SIZE 260 * 1024
|
#define BUFFER_SIZE 260 * 1024
|
||||||
#define BDEV_TASK_ARRAY_SIZE 2048
|
#define BDEV_TASK_ARRAY_SIZE 2048
|
||||||
|
|
||||||
#include "../common.c"
|
|
||||||
|
|
||||||
pthread_mutex_t g_test_mutex;
|
pthread_mutex_t g_test_mutex;
|
||||||
pthread_cond_t g_test_cond;
|
pthread_cond_t g_test_cond;
|
||||||
|
|
||||||
@ -940,21 +939,31 @@ test_main(void *arg1, void *arg2)
|
|||||||
spdk_event_call(event);
|
spdk_event_call(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
bdevio_usage(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
bdevio_parse_arg(int ch, char *arg)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
const char *config_file;
|
|
||||||
int num_failures;
|
int num_failures;
|
||||||
struct spdk_app_opts opts = {};
|
struct spdk_app_opts opts = {};
|
||||||
|
|
||||||
if (argc == 1) {
|
spdk_app_opts_init(&opts);
|
||||||
config_file = "/usr/local/etc/spdk/iscsi.conf";
|
opts.name = "bdevtest";
|
||||||
} else {
|
opts.config_file = "/usr/local/etc/spdk/iscsi.conf";
|
||||||
config_file = argv[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
bdevtest_init(config_file, "0x7", &opts);
|
|
||||||
opts.rpc_addr = NULL;
|
opts.rpc_addr = NULL;
|
||||||
|
opts.reactor_mask = "0x7";
|
||||||
|
opts.mem_size = 1024;
|
||||||
|
|
||||||
|
spdk_app_parse_args(argc, argv, &opts, "", NULL,
|
||||||
|
bdevio_parse_arg, bdevio_usage);
|
||||||
|
|
||||||
num_failures = spdk_app_start(&opts, test_main, NULL, NULL);
|
num_failures = spdk_app_start(&opts, test_main, NULL, NULL);
|
||||||
spdk_app_fini();
|
spdk_app_fini();
|
||||||
|
@ -81,7 +81,7 @@ fi
|
|||||||
timing_exit hello_bdev
|
timing_exit hello_bdev
|
||||||
|
|
||||||
timing_enter bounds
|
timing_enter bounds
|
||||||
$testdir/bdevio/bdevio $testdir/bdev.conf
|
$testdir/bdevio/bdevio -c $testdir/bdev.conf
|
||||||
timing_exit bounds
|
timing_exit bounds
|
||||||
|
|
||||||
# RAID module doesn't support multi-iov yet, so bdevio test
|
# RAID module doesn't support multi-iov yet, so bdevio test
|
||||||
|
Loading…
Reference in New Issue
Block a user