[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback
From: |
Amit Shah |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN |
Date: |
Tue, 20 Apr 2010 18:09:01 +0530 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On (Tue) Apr 20 2010 [13:28:48], Paul Brook wrote:
>
> It would be useful to have a debugging mode where the chardev layer
> deliberately returns spurious EAGAIN and short writes. Otherwise you've got a
> lot of very poorly tested device fallback code. I have low confidence in
> getting this right first time :-)
Ah, hm, I'll see how I can do that.
BTW I test this a couple of ways:
1. make the guest write till the host blocks because the chardev can't
accept any more data. I ascertain this during development using some
fprintfs. Any more data that gets written fills the guest's vq and then
the write() in the guest starts blocking. Once this happens, my testcase
succeeds.
2. Send a huge file from the guest to the host and compare the sha1sums
at the end of the file transfer. This always results in the chardev
returning -eagain a few times (confirm during testing via fprintfs
again). The testcase passes if the sha1sums match.
The test suite is at
http://fedorapeople.org/gitweb?p=amitshah/public_git/test-virtserial.git
Amit
- [Qemu-devel] [PATCH v3 0/4] char: write callback, virtio-console: flow control, Amit Shah, 2010/04/15
- [Qemu-devel] [PATCH v3 1/4] char: Let writers know how much data was written in case of errors, Amit Shah, 2010/04/15
- [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN, Amit Shah, 2010/04/15
- Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN, Gerd Hoffmann, 2010/04/20
- Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN, Amit Shah, 2010/04/20
- Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN, Paul Brook, 2010/04/20
- Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN,
Amit Shah <=
- Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN, Gerd Hoffmann, 2010/04/20
Re: [Qemu-devel] [PATCH v3 0/4] char: write callback, virtio-console: flow control, Paul Brook, 2010/04/15