mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-11 07:10:58 +00:00
80162c126b
References #1098.
19 lines
375 B
Python
Executable File
19 lines
375 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sys
|
|
|
|
filename = sys.argv[1]
|
|
data = bytes('a', 'utf-8')
|
|
|
|
fd = os.open(filename, os.O_CREAT | os.O_TRUNC | os.O_WRONLY)
|
|
try:
|
|
os.pwrite(fd, data, 1024)
|
|
os.pwrite(fd, data, 16 * 1024 * 1024)
|
|
os.pwrite(fd, data, 18 * 1024 * 1024)
|
|
finally:
|
|
os.close(fd)
|
|
|
|
stat = os.lstat(filename)
|
|
assert stat.st_size == 18 * 1024 * 1024 + 1
|