qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

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