From 83d6948ac755f7084414d3c09c16a0913884270d Mon Sep 17 00:00:00 2001 From: wanghailiangx Date: Wed, 30 Sep 2020 10:41:11 -0400 Subject: [PATCH] test/external_code: modify some remaining parts for switching to json Change-Id: Ic79366a527e5aa23e4821ec88533b66e70eafde5 signed-off-by: wanghailiangx Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4475 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Aleksey Marchuk Reviewed-by: Changpeng Liu --- .../hello_world/{bdev.conf => bdev.json} | 0 .../{bdev_external.conf => bdev_external.json} | 0 test/external_code/hello_world/hello_bdev.c | 8 ++++---- test/external_code/test_make.sh | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) rename test/external_code/hello_world/{bdev.conf => bdev.json} (100%) rename test/external_code/hello_world/{bdev_external.conf => bdev_external.json} (100%) diff --git a/test/external_code/hello_world/bdev.conf b/test/external_code/hello_world/bdev.json similarity index 100% rename from test/external_code/hello_world/bdev.conf rename to test/external_code/hello_world/bdev.json diff --git a/test/external_code/hello_world/bdev_external.conf b/test/external_code/hello_world/bdev_external.json similarity index 100% rename from test/external_code/hello_world/bdev_external.conf rename to test/external_code/hello_world/bdev_external.json diff --git a/test/external_code/hello_world/hello_bdev.c b/test/external_code/hello_world/hello_bdev.c index 0a0195df4..cd62571e8 100644 --- a/test/external_code/hello_world/hello_bdev.c +++ b/test/external_code/hello_world/hello_bdev.c @@ -263,10 +263,10 @@ main(int argc, char **argv) /* * The user can provide the config file and bdev name at run time. - * For example, to use Malloc0 in file bdev.conf run with params - * ./hello_bdev -c bdev.conf -b Malloc0 + * For example, to use Malloc0 in file bdev.json run with params + * ./hello_bdev --json bdev.json -b Malloc0 * To use passthru bdev PT0 run with params - * ./hello_bdev -c bdev.conf -b PT0 + * ./hello_bdev --json bdev.json -b PT0 * If the bdev name is not specified, * then Malloc0 is used by default */ @@ -275,7 +275,7 @@ main(int argc, char **argv) exit(rc); } if (opts.json_config_file == NULL) { - SPDK_ERRLOG("configfile must be specified using --json e.g. -c bdev.conf\n"); + SPDK_ERRLOG("configfile must be specified using --json e.g. --json bdev.json\n"); exit(1); } hello_context.bdev_name = g_bdev_name; diff --git a/test/external_code/test_make.sh b/test/external_code/test_make.sh index c5ca70c51..58f17773d 100755 --- a/test/external_code/test_make.sh +++ b/test/external_code/test_make.sh @@ -21,25 +21,25 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/ # The default target is to make both the app and bdev and link them against the combined SPDK shared library libspdk.so. run_test "external_make_tc1" make -C $test_root hello_world_bdev_shared_combo -run_test "external_run_tc1" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT +run_test "external_run_tc1" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.json -b TestPT make -C $test_root clean # Make just the application linked against the combined SPDK shared library libspdk.so. run_test "external_make_tc2" make -C $test_root hello_world_no_bdev_shared_combo -run_test "external_run_tc2" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0 +run_test "external_run_tc2" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.json -b Malloc0 make -C $test_root clean # Make both the application and bdev against individual SPDK shared libraries. run_test "external_make_tc3" make -C $test_root hello_world_bdev_shared_iso -run_test "external_run_tc3" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT +run_test "external_run_tc3" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.json -b TestPT make -C $test_root clean # Make just the application linked against individual SPDK shared libraries. run_test "external_make_tc4" make -C $test_root hello_world_no_bdev_shared_iso -run_test "external_run_tc4" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0 +run_test "external_run_tc4" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.json -b Malloc0 make -C $test_root clean @@ -49,13 +49,13 @@ make -C $SPDK_DIR -j$(nproc) # Make both the application and bdev against individual SPDK archives. run_test "external_make_tc5" make -C $test_root hello_world_bdev_static -run_test "external_run_tc5" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.conf -b TestPT +run_test "external_run_tc5" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev_external.json -b TestPT make -C $test_root clean # Make just the application linked against individual SPDK archives. run_test "external_make_tc6" make -C $test_root hello_world_no_bdev_static -run_test "external_run_tc6" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.conf -b Malloc0 +run_test "external_run_tc6" $test_root/hello_world/hello_bdev --json $test_root/hello_world/bdev.json -b Malloc0 make -C $test_root clean make -C $SPDK_DIR -j$(nproc) clean