[Tarantool-patches] [PATCH 0/2] fio.tempdir() improvements

Igor Munkin imun at tarantool.org
Mon Mar 2 02:14:49 MSK 2020


Vlad,

Thanks, the patchset LGTM. I dumped below some points we discussed:

1. It worth to discuss whether to use all 'X' wildcards at the template
end, since as you mentioned the behaviour differs on several POSIX
compatible platforms. Yes, you've already documented the current
implementation, but this bullet is more about usability.

2. You also proposed an additional parameter for suffix length (a fixed
length substring that can be appended to 'X' wild cards). Let's discuss
it in public space, since it looks like a great enhancement to the
existing API.

And small nit regarging the second patch: it would be great to mention
that tempname algorithm originates to the glibc one[1].

On 01.03.20, Vladislav Shpilevoy wrote:
> fio.tempdir() improvements to make it closer to POSIX.
> 
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4794-tmpdir
> Issue: https://github.com/tarantool/tarantool/issues/4794
> 
> @ChangeLog
> - fio.tempdir() uses TMPDIR as a path to a place where to create
>   temporary directories. Also it accepts a template name argument,
>   like mkdtemp().
> 
> Vladislav Shpilevoy (2):
>   fio: respect $TMPDIR in fio.tempdir(), when it is set
>   fio: allow to pass a template to fio.tempdir()
> 
>  src/lib/core/coio_file.c |  76 ++++++++++++++++++++----
>  src/lib/core/coio_file.h |   2 +-
>  src/lua/fio.c            |   3 +-
>  test/app/fio.result      | 121 +++++++++++++++++++++++++++++++++++++++
>  test/app/fio.test.lua    |  44 ++++++++++++++
>  5 files changed, 234 insertions(+), 12 deletions(-)
> 
> -- 
> 2.21.1 (Apple Git-122.3)
> 

[1]: https://code.woboq.org/userspace/glibc/sysdeps/posix/tempname.c.html#__gen_tempname

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list