File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040
4141output=" ${build_dir} " /$( basename " ${expected_output} " )
4242
43- LIBNVME_SYSFS_PATH=" ${sysfs_path} " \
44- LIBNVME_HOSTNQN=nqn.2014-08.org.nvmexpress:uuid:ce4fee3e-c02c-11ee-8442-830d068a36c6 \
45- LIBNVME_HOSTID=ce4fee3e-c02c-11ee-8442-830d068a36c6 \
46- " ${test_binary} " " ${config_json} " > " ${output} " || echo " test failed"
43+ cmd=(
44+ env
45+ LIBNVME_SYSFS_PATH=" $sysfs_path "
46+ LIBNVME_HOSTNQN=" nqn.2014-08.org.nvmexpress:uuid:ce4fee3e-c02c-11ee-8442-830d068a36c6"
47+ LIBNVME_HOSTID=" ce4fee3e-c02c-11ee-8442-830d068a36c6"
48+ " $test_binary "
49+ " $config_json "
50+ )
51+
52+ echo " Running command:"
53+ printf ' %q ' " ${cmd[@]} "
54+ printf ' > %q\n' " $output "
55+
56+ if ! " ${cmd[@]} " > " $output " ; then
57+ rc=$?
58+ echo " test failed (exit code $rc )"
59+ exit $rc
60+ fi
4761
4862diff -u " ${expected_output} " " ${output} "
Original file line number Diff line number Diff line change 88diff = find_program (' diff' , required : false )
99if diff.found()
1010 tree_dump = executable (
11- ' libnvme - test-tree-dump' ,
11+ ' test-tree-dump' ,
1212 [' tree-dump.c' ],
1313 dependencies : libnvme_dep,
1414 )
Original file line number Diff line number Diff line change @@ -14,9 +14,22 @@ rm -rf "${TEST_DIR}"
1414mkdir " ${TEST_DIR} "
1515tar -x -f " ${SYSFS_INPUT} " -C " ${TEST_DIR} "
1616
17- LIBNVME_SYSFS_PATH=" ${TEST_DIR} " \
18- LIBNVME_HOSTNQN=nqn.2014-08.org.nvmexpress:uuid:ce4fee3e-c02c-11ee-8442-830d068a36c6 \
19- LIBNVME_HOSTID=ce4fee3e-c02c-11ee-8442-830d068a36c6 \
20- " ${TREE_DUMP} " > " ${ACTUAL_OUTPUT} " || echo " test failed"
17+ cmd=(
18+ env
19+ LIBNVME_SYSFS_PATH=" $TEST_DIR "
20+ LIBNVME_HOSTNQN=" nqn.2014-08.org.nvmexpress:uuid:ce4fee3e-c02c-11ee-8442-830d068a36c6"
21+ LIBNVME_HOSTID=" ce4fee3e-c02c-11ee-8442-830d068a36c6"
22+ " $TREE_DUMP "
23+ )
24+
25+ echo " Running command:"
26+ printf ' %q ' " ${cmd[@]} "
27+ printf ' > %q\n' " $ACTUAL_OUTPUT "
28+
29+ if ! " ${cmd[@]} " > " $ACTUAL_OUTPUT " ; then
30+ rc=$?
31+ echo " test failed (exit code $rc )"
32+ exit $rc
33+ fi
2134
2235diff -u " ${EXPECTED_OUTPUT} " " ${ACTUAL_OUTPUT} "
You can’t perform that action at this time.
0 commit comments