[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v1 06/18] io: set correct error object in background

From: Daniel P. Berrange
Subject: [Qemu-devel] [PULL v1 06/18] io: set correct error object in background reader test thread
Date: Fri, 11 Mar 2016 10:03:56 +0000

The reader thread was accidentally setting the error pointer
intended for the writer thread. If both threads set errors
this would result in QEMU abort'ing due to the error already
being set.

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
 tests/io-channel-helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/io-channel-helpers.c b/tests/io-channel-helpers.c
index 8440669..d513792 100644
--- a/tests/io-channel-helpers.c
+++ b/tests/io-channel-helpers.c
@@ -132,7 +132,7 @@ static gpointer test_io_thread_reader(gpointer opaque)
         if (ret == QIO_CHANNEL_ERR_BLOCK) {
             if (data->blocking) {
-                error_setg(&data->writeerr,
+                error_setg(&data->readerr,
                            "Unexpected I/O blocking");
             } else {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]