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 E17F524742 for ; Tue, 17 Jul 2018 23:43:43 -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 NZXruJaj58LM for ; Tue, 17 Jul 2018 23:43:43 -0400 (EDT) Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 41D592285A for ; Tue, 17 Jul 2018 23:43:43 -0400 (EDT) Date: Wed, 18 Jul 2018 06:43:44 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH] lua: fix fio.rmtree to work with non empty dirs Message-ID: <20180718034344.tolxqd4nb3o5bafq@tkn_work_nb> References: <20180716161543.14753-1-k.belyavskiy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180716161543.14753-1-k.belyavskiy@tarantool.org> 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 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()).