diff options
author | Siri Hansen <[email protected]> | 2019-02-21 15:08:28 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2019-02-21 15:08:28 +0100 |
commit | cb9b1267f2465a129a1f5de5cf812bcfd5a7a9f4 (patch) | |
tree | f41a7bdd013769dd149869e89a8811884d26afca /lib/kernel/test | |
parent | 9e9884640b7d0ee69cd39909842ec5fc8826859f (diff) | |
parent | 884a0706e351caf2b9c905e7dea4e1528efc0a12 (diff) | |
download | otp-cb9b1267f2465a129a1f5de5cf812bcfd5a7a9f4.tar.gz otp-cb9b1267f2465a129a1f5de5cf812bcfd5a7a9f4.tar.bz2 otp-cb9b1267f2465a129a1f5de5cf812bcfd5a7a9f4.zip |
Merge branch 'siri/logger/check-inode-of-log/ERL-850/OTP-15578' into maint
* siri/logger/check-inode-of-log/ERL-850/OTP-15578:
[logger] Keep track of inode for logger_std_h log file
Diffstat (limited to 'lib/kernel/test')
-rw-r--r-- | lib/kernel/test/logger_std_h_SUITE.erl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/kernel/test/logger_std_h_SUITE.erl b/lib/kernel/test/logger_std_h_SUITE.erl index 484d914ec3..b2c2c8ba67 100644 --- a/lib/kernel/test/logger_std_h_SUITE.erl +++ b/lib/kernel/test/logger_std_h_SUITE.erl @@ -141,7 +141,8 @@ all() -> mem_kill_std, restart_after, handler_requests_under_load, - recreate_deleted_log + recreate_deleted_log, + reopen_changed_log ]. add_remove_instance_tty(_Config) -> @@ -1269,6 +1270,21 @@ recreate_deleted_log(Config) -> recreate_deleted_log(cleanup, _Config) -> ok = stop_handler(?MODULE). +reopen_changed_log(Config) -> + {Log,_HConfig,_StdHConfig} = + start_handler(?MODULE, ?FUNCTION_NAME, Config), + logger:notice("first",?domain), + logger_std_h:filesync(?MODULE), + ok = file:rename(Log,Log++".old"), + ok = file:write_file(Log,""), + logger:notice("second",?domain), + logger_std_h:filesync(?MODULE), + {ok,<<"first\n">>} = file:read_file(Log++".old"), + {ok,<<"second\n">>} = file:read_file(Log), + ok. +reopen_changed_log(cleanup, _Config) -> + ok = stop_handler(?MODULE). + %%%----------------------------------------------------------------- %%% send_requests(TO, Reqs = [{Mod,Func,Args,Res}|Rs]) -> |