summaryrefslogtreecommitdiff
path: root/tests/io-channel-helpers.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-03-08 12:06:45 +0000
committerDaniel P. Berrange <berrange@redhat.com>2016-03-10 17:10:18 +0000
commit256920eb94f4de9430122b7618b9c2a16cb2df32 (patch)
tree7d6bff9d00d9219259be8937397b446431e85297 /tests/io-channel-helpers.c
parenta9d5aed12d0cf067e87eda14e794cda022381e1b (diff)
downloadqemu-256920eb94f4de9430122b7618b9c2a16cb2df32.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>
Diffstat (limited to 'tests/io-channel-helpers.c')
-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 844066904b..d513792068 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 {