test/vhost: remove unnecessary lines from JSON result file
There is a lot of extra lines at top of the output file in case fio is used in client-server mode and with json output mode. These lines make it resulting JSON file not possible to parse. Remove this lines so that the JSON file is ready to be used in any later parsing functions. Change-Id: Ie575941310f0d17b0285969f6b247f2fa653168c Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3237 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
e90d35578a
commit
782681e018
@ -1142,6 +1142,14 @@ function run_fio() {
|
||||
$fio_start_cmd
|
||||
sleep 1
|
||||
|
||||
if [[ "$fio_output_format" == "json" ]]; then
|
||||
# Fio in client-server mode produces a lot of "trash" output
|
||||
# preceding JSON structure, making it not possible to parse.
|
||||
# Remove these lines from file.
|
||||
# shellcheck disable=SC2005
|
||||
echo "$(grep -vP '^[<\w]' "$out/$log_fname")" > "$out/$log_fname"
|
||||
fi
|
||||
|
||||
if [[ ! $hide_results ]]; then
|
||||
cat $out/$log_fname
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user