Read-data, read-data-subset use cases

I personally think it’s useful even in a cloud context. You’re verifying that the cloud service gives you exactly the data back that you’ve sent to it, which is a good thing to very from time to time. After all, the data could have been corrupted at the service, you’ll only discover that when you check it regularly.

We’ve seen bugs in backends (and their respective client implementation) which were only discovered because people tried to read back the data. We’ve also seen middle-boxes mangling data before passing it on, destroying the data in the process. All of this would not have been discovered were it not for --read-data.

By the way, the second parameter of --read-data-subset n/m (the m) only makes sense for m <= 256. We should probably add that to the manual and print an error if m > 256. Here’s the code (pack[0] is a byte):