From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BB6FC2466D for ; Tue, 24 Jul 2018 05:28:48 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6em9OPvHFwc3 for ; Tue, 24 Jul 2018 05:28:48 -0400 (EDT) Received: from smtp44.i.mail.ru (smtp44.i.mail.ru [94.100.177.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 0E4A624512 for ; Tue, 24 Jul 2018 05:28:47 -0400 (EDT) Date: Tue, 24 Jul 2018 12:28:42 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: Re[2]: [PATCH] lua: fix fio.rmtree to work with non empty dirs Message-ID: <20180724092842.5zi37lk7odkkxnro@tkn_work_nb> References: <20180716161543.14753-1-k.belyavskiy@tarantool.org> <20180718034344.tolxqd4nb3o5bafq@tkn_work_nb> <1532366867.279948629@f221.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1532366867.279948629@f221.i.mail.ru> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Konstantin Belyavskiy Cc: tarantool-patches@freelists.org Hi, LGTM. WBR, Alexander Turenko. On Mon, Jul 23, 2018 at 08:27:47PM +0300, Konstantin Belyavskiy wrote: > Thanks for review, now check directory absence with fio.stat() > > Среда, 18 июля 2018, 6:43 +03:00 от Alexander Turenko > : > > Hi Kostya! > The patch looks good for me except one tiny comment. > WBR, Alexander Turenko. > > index 0850413d9..14e0fb72c 100644 > > --- a/test/app/fio.test.lua > > +++ b/test/app/fio.test.lua > > @@ -131,6 +131,13 @@ fio.rmdir(dir2) > > > > { fio.unlink(file1), fio.unlink(file2), fio.unlink(file3), > fio.unlink(file4) } > > { fio.unlink(file1), fio.unlink(file2), fio.unlink(file3), > fio.unlink(file4) } > > + > > +-- gh-3258 rmtree should remove directories with files > > +fio.mktree('tmp2/tmp3/tmp4') > > +fh = fio.open('tmp2/tmp3/tmp4/tmp.txt', {'O_RDWR', 'O_CREAT'}) > > +fh:close() > > +fio.rmtree('tmp2') > > + > I think it would be good to check that the directory really disappears > (via fio.listdir()). > > Best regards, > Konstantin Belyavskiy > k.belyavskiy@tarantool.org