libqtest: fix the order of buffered events
authorMaxim Levitsky <mlevitsk@redhat.com>
Mon, 19 Oct 2020 16:37:00 +0000 (19:37 +0300)
committerThomas Huth <thuth@redhat.com>
Sat, 24 Oct 2020 05:36:53 +0000 (07:36 +0200)
By a mistake I added the pending events in a wrong order.
Fix this by using g_list_append.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20201019163702.471239-3-mlevitsk@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/libqtest.c

index b9ff29055b1f20bf6294f3a4084352cd56c028b3..0e304bdbd1512a3d66a7a4f8a67e371ace851f77 100644 (file)
@@ -621,7 +621,7 @@ QDict *qtest_qmp_receive(QTestState *s)
             return response;
         }
         /* Stash the event for a later consumption */
-        s->pending_events = g_list_prepend(s->pending_events, response);
+        s->pending_events = g_list_append(s->pending_events, response);
     }
 }