[tarantool-patches] Re: [PATCH v2] fio: introduce utime function
Олег
olegrok at tarantool.org
Mon Jul 8 18:52:24 MSK 2019
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.
>
More information about the Tarantool-patches
mailing list