From 060e0bdc7886419adfb33371cebf7e858b5b4b9f Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 24 Nov 2014 17:19:26 +0100 Subject: kernel: Do not check unsync:ed file size --- lib/kernel/test/file_SUITE.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl index f97bc3baf4..56c35678b6 100644 --- a/lib/kernel/test/file_SUITE.erl +++ b/lib/kernel/test/file_SUITE.erl @@ -1349,8 +1349,15 @@ file_info_int(Config) -> %% check that the file got a modify date max a few seconds away from now {ok,FileInfo1} = ?FILE_MODULE:read_file_info(Name), - {ok,FileInfo1} = ?FILE_MODULE:read_file_info(Name, [raw]), + {ok,FileInfo1Raw} = ?FILE_MODULE:read_file_info(Name, [raw]), + + %% We assert that everything but the size is the same, on some OSs the + %% size may not have been flushed to disc and we do not want to do a + %% sync to force it. + FileInfo1Raw = FileInfo1#file_info{ size = FileInfo1Raw#file_info.size }, + #file_info{type=regular,atime=AccTime1,mtime=ModTime1} = FileInfo1, + ?line Now = erlang:localtime(), %??? ?line io:format("Now ~p",[Now]), ?line io:format("Open file Acc ~p Mod ~p",[AccTime1,ModTime1]), -- cgit v1.2.3