Commit cc20b07a authored by Max Reitz's avatar Max Reitz Committed by Kevin Wolf
Browse files

iotests: _filter_qmp for pretty JSON output



_filter_qmp should be able to correctly filter out the QMP version
object for pretty JSON output.

Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 4821cd4c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -167,7 +167,9 @@ _filter_qmp()
{
    _filter_win32 | \
    sed -e 's#\("\(micro\)\?seconds": \)[0-9]\+#\1 TIMESTAMP#g' \
        -e 's#^{"QMP":.*}$#QMP_VERSION#'
        -e 's#^{"QMP":.*}$#QMP_VERSION#' \
        -e '/^    "QMP": {\s*$/, /^    }\s*$/ c\' \
        -e '    QMP_VERSION'
}

# replace driver-specific options in the "Formatting..." line