Re: [Nbd] Testing NBD server implementations for correctness
- To: Wouter Verhelst <w@...112...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>
- Subject: Re: [Nbd] Testing NBD server implementations for correctness
- From: Alex Bligh <alex@...872...>
- Date: Mon, 26 Sep 2016 19:21:23 +0100
- Message-id: <FF7CB53B-8CEE-4190-B3B6-7A9C8E02E4CD@...872...>
- In-reply-to: <20160926181240.voawr55mzoupg4fn@...3...>
- References: <57E74AFB.4070506@...2724...> <5720E25C-93C9-4DDB-B871-93DC5BA9CD5F@...872...> <20160925112411.byjfmv7qotamd7m4@...3...> <EA976193-41B3-4322-AFE5-8E01B1BF1002@...872...> <20160925210518.6dmxvue2bsvi7mag@...3...> <7AF202A4-2702-40F1-8A61-F2807F6D0D91@...872...> <20160926181240.voawr55mzoupg4fn@...3...>
> On 26 Sep 2016, at 19:12, Wouter Verhelst <w@...112...> wrote:
>
> Yes. I understand how most of nbd works, but that is probably the one
> thing I have always had trouble understanding. My usual answer to "how
> do I deal with the integrity test" is "let's not". I obviously
> must've understood it at some point (because I merged it, and I'm not in
> the habit of merging code I don't understand), but it's pretty terrible
> to grok.
If it makes you feel any better, I had precisely the same experience
rereading it, which is why I rewrote it from scratch rather than
doing a 'c to go' transcription!
Even then it wasn't simple (particularly the blocking to ensure no
two inflight commands overlap if one or more are writes). It's here:
https://github.com/abligh/gonbdserver/blob/master/nbd/integrity_test.go
--
Alex Bligh
Reply to: