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 9C66322A4F for ; Mon, 8 Jul 2019 11:52:27 -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 cP33eeEz6aE0 for ; Mon, 8 Jul 2019 11:52:27 -0400 (EDT) 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 turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 0078C22A24 for ; Mon, 8 Jul 2019 11:52:26 -0400 (EDT) Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1hkVwH-0006xN-8X for tarantool-patches@freelists.org; Mon, 08 Jul 2019 18:52:25 +0300 Subject: [tarantool-patches] Re: [PATCH v2] fio: introduce utime function References: <20190705190703.22908-1-olegrok@tarantool.org> <20190708145110.rauvydnpn3c6hhqq@esperanza> From: =?UTF-8?B?0J7Qu9C10LM=?= Message-ID: <0539c600-d652-fa15-3c3f-7e1cd6fb0dee@tarantool.org> Date: Mon, 8 Jul 2019 18:52:24 +0300 MIME-Version: 1.0 In-Reply-To: <20190708145110.rauvydnpn3c6hhqq@esperanza> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: ru Content-Transfer-Encoding: 7bit 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: tarantool-patches@freelists.org Thanks! My bad. I really missed it. Please apply following diff to my patch. diff --git a/src/lua/fio.c b/src/lua/fio.c index 55fa66762..48e2f8eb3 100644 --- a/src/lua/fio.c +++ b/src/lua/fio.c @@ -709,7 +709,7 @@ lbox_fio_utime(struct lua_State *L) const char *pathname = lua_tostring(L, 1); double atime = lua_tonumber(L, 2); double mtime = lua_tonumber(L, 3); - return lbox_fio_pushbool(L, coio_utime(pathname, atime, mtime) == 0); + return lbox_fio_pushbool(L, coio_utime(pathname, mtime, atime) == 0); } void diff --git a/test/app/fio.result b/test/app/fio.result index 3663560ae..34f58d6bc 100644 --- a/test/app/fio.result +++ b/test/app/fio.result @@ -1083,11 +1083,11 @@ fio.utime('newfile', 1, 2) ... fh:stat().atime == 1 --- -- false +- true ... fh:stat().mtime == 2 --- -- false +- true ... fio.utime('newfile', 3) --- 08.07.2019 17:51, Vladimir Davydov wrote: > On Fri, Jul 05, 2019 at 10:07:03PM +0300, Oleg Babin wrote: >> +fio.utime('newfile', 0, 0) >> +--- >> +- true >> +... >> +fh:stat().atime == 0 >> +--- >> +- true >> +... >> +fh:stat().mtime == 0 >> +--- >> +- true >> +... >> +fio.utime('newfile', 1, 2) >> +--- >> +- true >> +... >> +fh:stat().atime == 1 >> +--- >> +- false >> +... >> +fh:stat().mtime == 2 >> +--- >> +- false >> +... > > ??? > > Looks like you mixed atime with mtime. Please fix. >