Skip to content

Commit 4cb87a4

Browse files
Arushi-07copybara-github
authored andcommitted
Using sudo for fio prefilling
PiperOrigin-RevId: 823133812
1 parent 849dddf commit 4cb87a4

File tree

1 file changed

+1
-3
lines changed
  • perfkitbenchmarker/linux_benchmarks/fio

1 file changed

+1
-3
lines changed

perfkitbenchmarker/linux_benchmarks/fio/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,14 @@ def FillDevice(vm, disk, fill_size, exec_path, use_directory=False):
185185
dir_or_filename_arg = 'directory'
186186
else:
187187
dir_or_filename_arg = 'filename'
188-
189188
command = (
190-
f'{exec_path} --{dir_or_filename_arg}={disk.GetDevicePath()} '
189+
f'sudo {exec_path} --{dir_or_filename_arg}={disk.GetDevicePath()} '
191190
f'--ioengine={fio_flags.FIO_IOENGINE.value} --name={_FILENAME_PREFIX} '
192191
f'--blocksize={fio_flags.FIO_FILL_BLOCK_SIZE.value} --iodepth=64 '
193192
f'--rw=write --direct=1 --size={fill_size} '
194193
f'--nrfiles={fio_flags.FIO_NR_FILES.value} --fallocate=none '
195194
'--create_on_open=1'
196195
)
197-
198196
vm.RobustRemoteCommand(command)
199197

200198

0 commit comments

Comments
 (0)