anchor.diff:    await raf.setPosition(0);
     await raf.lock(FileLock.BLOCKING_EXCLUSIVE, 0, length);
     Process peer = await runPeer(file.path, length, FileLock.BLOCKING_EXCLUSIVE);
  -
  -  // Wait a bit for the other process to get started. We'll synchronize on
  -  // the file lock.
  -  await new Future.delayed(const Duration(seconds: 1));
   
     int nextToWrite = 1;
     int at = 0;
  
positive.code:     // other process was able to take the lock and write some bytes.
      iWrote[nextToWrite-1] = nextToWrite;
      nextToWrite++;
      await raf.unlock(0, length);
      try {
        await raf.lock(FileLock.EXCLUSIVE, 0, length);
      } catch(e) {
        // Check that at some point the non-blocking lock fails.
        nonBlockingFailed = true;
        await raf.lock(FileLock.BLOCKING_EXCLUSIVE, 0, length);
      }
      while (true) {
        p = await raf.position();
  
negative.code: 
    Expect.equals(true, nonBlockingFailed);
  
    await peer.exitCode.then((v) async {
      Expect.equals(0, v);
      await raf.close();
      await directory.delete(recursive: true);
    });
  }
  
  main() async {
    asyncStart();
    await testLockWholeFile();
    asyncEnd();
  }
  