Commit 83d6948a authored by wanghailiangx's avatar wanghailiangx Committed by Tomasz Zawadzki
Browse files

test/external_code: modify some remaining parts for switching to json

parent 06b537bf
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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 <conffile> e.g. -c bdev.conf\n");
		SPDK_ERRLOG("configfile must be specified using --json <conffile> e.g. --json bdev.json\n");
		exit(1);
	}
	hello_context.bdev_name = g_bdev_name;
+6 −6
Original line number Diff line number Diff line
@@ -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