Skip to content

Commit

Permalink
stdlib: Fix zip_SUITE atime on some OSs
Browse files Browse the repository at this point in the history
This issue has so far only been seen on Ubuntu 22.04.
  • Loading branch information
garazdawi committed Oct 14, 2024
1 parent fea5cec commit 2e326d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/stdlib/test/zip_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1470,9 +1470,9 @@ basic_timestamp(Config) ->
if UnzipMode =/= unemzip ->
?assertEqual(ZMtime, UnZMtime),

%% When using unzip, the atime is sometimes set to ctime for unknown reasons... so we cannot test it
%% ?assertEqual(UnZAtime, UnZMtime),
?assert(UnZAtime =:= UnZMtime orelse UnZAtime =:= UnZCtime),
%% both atime and ctime behave very differently on different platforms, so it is rather hard to test.
%% atime is sometimes set to ctime for unknown reasons, and sometimes set to 1970...
?assert(UnZAtime =:= UnZMtime orelse UnZAtime =:= UnZCtime orelse UnZAtime =:= {1970,1,1},{1,0,0}),

%% On windows the ctime and mtime are the same so
%% we cannot compare them.
Expand Down

0 comments on commit 2e326d7

Please sign in to comment.