Am 14.08.2018 um 00:37 schrieb Jeff King:
And then you can do something like:

   for size in 4097 8193 16385 32769 65537 131073 262145 524289 1048577; do
     >out ;# clean up from last run
     echo "Trying $size..."
     timeout 5 ./write $size out
     if ! ./check $size <out; then
       echo "$size failed"
       break
     fi
   done

On my Linux system, each of those seems to write several gigabytes
without overlapping. I did manage to hit some failing cases, but they
were never sheared writes, but rather cases where there was an
incomplete write at the end-of-file.

I used your programs with necessary adjustments (as fork() is not available), and did similar tests with concurrent processes. With packet sizes 1025, 4093, 7531 (just to include some odd number), and 8193 I did not observe any overlapping or short writes.

I'm now very confident that we are on the safe side for our purposes.

-- Hannes

Reply via email to