summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel P. Berrange2016-03-08 13:06:45 +0100
committerDaniel P. Berrange2016-03-10 18:10:18 +0100
commit256920eb94f4de9430122b7618b9c2a16cb2df32 (patch)
tree7d6bff9d00d9219259be8937397b446431e85297 /tests
parentio: wait for incoming client in socket test (diff)
downloadqemu-256920eb94f4de9430122b7618b9c2a16cb2df32.tar.gz
qemu-256920eb94f4de9430122b7618b9c2a16cb2df32.tar.xz
qemu-256920eb94f4de9430122b7618b9c2a16cb2df32.zip
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')
-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 {