nbd-tester-client
Prompted by #350357, I did something I've planned to do a long time already, but had so, so far, failed to do: I wrote an nbd-tester-client. All it does currently is a sequential read of the entire block device, but it's written in such a manner that it should be easy to add additional tests—say, random reads, or write-read-verify cycles.
Not that I actually needed such an application to identify and fix the bug (which boils down to a forgotten return 0 somewhere halfway the code; upload on the way), but it's a good thing none the less. It even pointed out one problem with nbd-server: that it will do write() calls without select, thus allowing for a deadlock if both the client and the server have a full write queue. I'll fix that for NBD 2.9 (might be too intrusive for 2.8, and I'm not sure whether the kernel actually writes without waiting for its write queue to be emptied).
The code is in CVS HEAD, if you want it.