tests: vsock: Use VMADDR_CID_LOCAL for loopback testing.
[nbdkit/ericb.git] / tests / shebang.py
blob0634589a40ec6aa4f4ee55ad71ae5bf1ab456949
1 #!../nbdkit python
3 disk = bytearray(1024 * 1024)
6 def open(readonly):
7 print("open: readonly=%d" % readonly)
8 return 1
11 def get_size(h):
12 global disk
13 return len(disk)
16 def pread(h, buf, offset):
17 global disk
18 end = offset + len(buf)
19 buf[:] = disk[offset:end]