summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-03-08 12:06:45 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:36 -0600
commit506315bc33837167a9bfed6eae5ac4c588f4a6a3 (patch)
treee60d594dece7669dfd686167bf3db73b6417bee3
parent7229e0166d63382ea401c631aba859a1b84a7f38 (diff)
downloadhqemu-506315bc33837167a9bfed6eae5ac4c588f4a6a3.zip
hqemu-506315bc33837167a9bfed6eae5ac4c588f4a6a3.tar.gz
io: set correct error object in background reader test thread
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 <pbonzini@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
-rw-r--r--tests/io-channel-helpers.c2
1 files changed, 1 insertions, 1 deletions
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");
break;
} else {
OpenPOWER on IntegriCloud