Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lat_fs: get tmpdir from the last input parameter #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmz-zmm
Copy link

@mmz-zmm mmz-zmm commented Sep 1, 2022

The usage of lat_fs is:
lat_fs [-s <file size>] [-n <max files per dir>] [-P <parallelism>] [-W <warmup>] [-N <repetitions>] [<dir>]
, it is clear dir is the last parameter. While handling the state.tmpdir,
current code is reading from the first parameter. If we pass command like,
lat_fs -P 1 /usr/tmp, tmpdir will be -P, which is invalid path and
tempnam() call falls back to /tmp, not the expected dir /usr/tmp.

The usage of lat_fs is:
lat_fs [-s <file size>] [-n <max files per dir>] [-P <parallelism>] [-W <warmup>] [-N <repetitions>] [<dir>]
, it is clear `dir` is the last parameter. While handling the `state.tmpdir`,
current code is reading from the first parameter. If we pass command like,
`lat_fs -P 1 /usr/tmp`, `tmpdir` will be `-P`, which is invalid path and
tempnam() call falls back to /tmp, not the expected dir `/usr/tmp`.

Signed-off-by: Zhao Mengmeng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant