From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 35CBA469719 for ; Mon, 2 Mar 2020 02:20:12 +0300 (MSK) Date: Mon, 2 Mar 2020 02:14:49 +0300 From: Igor Munkin Message-ID: <20200301231449.GV404@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 0/2] fio.tempdir() improvements List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org 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