diff options
author | Lukas Larsson <[email protected]> | 2014-11-24 17:19:26 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-11-25 11:34:21 +0100 |
commit | 060e0bdc7886419adfb33371cebf7e858b5b4b9f (patch) | |
tree | 67391b528fc4886adf7f18d9ce80fc1a29fde028 | |
parent | 8df13a37331f2efaaf2348ae1f8a06983058e4da (diff) | |
download | otp-060e0bdc7886419adfb33371cebf7e858b5b4b9f.tar.gz otp-060e0bdc7886419adfb33371cebf7e858b5b4b9f.tar.bz2 otp-060e0bdc7886419adfb33371cebf7e858b5b4b9f.zip |
kernel: Do not check unsync:ed file size
-rw-r--r-- | lib/kernel/test/file_SUITE.erl | 9 |
1 files changed, 8 insertions, 1 deletions
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]), |