qemumonitortestutils: Fix line counting in qemuMonitorTestProcessFileEntries()

It just so happens that our JSON snippets in
qemucapabilitiesdata/*.replies files are separated by an empty
line. These empty lines are then overwritten to make a single
line JSON. Nevertheless, the line counter @line is not
incremented which then leads to a misleading numbers in errors.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2022-12-21 11:08:02 +01:00
parent 9e3cc0ff5e
commit 0f2396751f

View File

@ -1302,6 +1302,9 @@ qemuMonitorTestProcessFileEntries(char *inputstr,
continue;
}
/* We've seen a new line, increment the counter */
line++;
/* Cut off a single reply. */
*(tmp + 1) = '\0';