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(a)redhat.com>
---
tests/qemumonitortestutils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index 46791931b0..4e99c4b54e 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -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';
--
2.38.2