[PULL 07/31] libqtest: fix the order of buffered events

Thomas Huth posted 31 patches 4 years, 10 months ago
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Bandan Das <bsd@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Paul Durrant <paul@xen.org>, Anthony Perard <anthony.perard@citrix.com>, Richard Henderson <rth@twiddle.net>, Thomas Huth <thuth@redhat.com>, Alexander Bulekov <alxndr@bu.edu>
[PULL 07/31] libqtest: fix the order of buffered events
Posted by Thomas Huth 4 years, 10 months ago
From: Maxim Levitsky <mlevitsk@redhat.com>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index b9ff29055b..0e304bdbd1 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -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);
     }
 }
 
-- 
2.18.2