aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test/z_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-05-23 21:14:50 +0200
committerSverker Eriksson <[email protected]>2013-05-23 21:14:50 +0200
commitd68c8177e7893e2a2f37cd8ecd17b0ff6f2acd57 (patch)
tree6b686756554fcc7b50db5c0f3679e19dac2395dd /erts/test/z_SUITE.erl
parent01eb20066918e107811d01f43b97e3925f894dbd (diff)
downloadotp-d68c8177e7893e2a2f37cd8ecd17b0ff6f2acd57.tar.gz
otp-d68c8177e7893e2a2f37cd8ecd17b0ff6f2acd57.tar.bz2
otp-d68c8177e7893e2a2f37cd8ecd17b0ff6f2acd57.zip
system: Prevent z_SUITE from changing the timestamp on core files
Diffstat (limited to 'erts/test/z_SUITE.erl')
-rw-r--r--erts/test/z_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl
index 78968ed405..9abc73c081 100644
--- a/erts/test/z_SUITE.erl
+++ b/erts/test/z_SUITE.erl
@@ -190,8 +190,13 @@ file_inspect(#core_search_conf{file = File}, Core) ->
probably_a_core
end.
-mk_readable(F) ->
- catch file:write_file_info(F, #file_info{mode = 8#00444}).
+mk_readable(F) ->
+ try
+ {ok, Old} = file:read_file_info(F),
+ file:write_file_info(F, Old#file_info{mode = 8#00444})
+ catch
+ _:_ -> io:format("Failed to \"chmod\" core file ~p\n", [F])
+ end.
ignore_core(C) ->
filelib:is_regular(filename:join([filename:dirname(C),