aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/init_SUITE.erl18
-rw-r--r--lib/kernel/test/prim_file_SUITE.erl7
2 files changed, 20 insertions, 5 deletions
diff --git a/lib/kernel/test/init_SUITE.erl b/lib/kernel/test/init_SUITE.erl
index e7b44a714c..a332e7966b 100644
--- a/lib/kernel/test/init_SUITE.erl
+++ b/lib/kernel/test/init_SUITE.erl
@@ -27,7 +27,7 @@
-export([get_arguments/1, get_argument/1, boot_var/1, restart/1,
many_restarts/0, many_restarts/1,
get_plain_arguments/1,
- reboot/1, stop/1, get_status/1, script_id/1]).
+ reboot/1, stop_status/1, stop/1, get_status/1, script_id/1]).
-export([boot1/1, boot2/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -48,7 +48,7 @@ suite() ->
all() ->
[get_arguments, get_argument, boot_var,
many_restarts,
- get_plain_arguments, restart, get_status, script_id,
+ get_plain_arguments, restart, stop_status, get_status, script_id,
{group, boot}].
groups() ->
@@ -465,6 +465,20 @@ reboot(Config) when is_list(Config) ->
%% ------------------------------------------------
%%
%% ------------------------------------------------
+stop_status(Config) when is_list(Config) ->
+ badarg = catch_stop([65,[66],67]), % flat strings only
+ badarg = catch_stop([65, 666, 67]), % only bytes in string
+ badarg = catch_stop(abort), % 'abort' not allowed
+ badarg = catch_stop(true), % other atoms not allowed
+ badarg = catch_stop(-1), % no negative statuses
+ ok.
+
+catch_stop(Status) ->
+ try init:stop(Status) catch error:badarg -> badarg end.
+
+%% ------------------------------------------------
+%%
+%% ------------------------------------------------
stop(Config) when is_list(Config) ->
Args = args(),
{ok, Node} = start_node(init_test, Args),
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl
index cc7f2f6713..8be94f1e57 100644
--- a/lib/kernel/test/prim_file_SUITE.erl
+++ b/lib/kernel/test/prim_file_SUITE.erl
@@ -1023,7 +1023,7 @@ file_write_file_info_opts(Config) when is_list(Config) ->
Time <- [ 0,1,-1,100,-100,1000,-1000,10000,-10000 ]
]),
- %% REM: determine date range dependent on time_t = Uint32 | Sint32 | Sint64
+ %% REM: determine date range dependent on time_t = Uint32 | Sint32 | Sint64 | Uint64
%% Determine time_t on os:type()?
lists:foreach(fun ({FI, Opts}) ->
ok = ?PRIM_FILE_call(write_file_info, Handle, [Name, FI, Opts])
@@ -1072,9 +1072,10 @@ file_write_read_file_info_opts(Config) when is_list(Config) ->
%ok = file_write_read_file_info_opts(Handle, Name, {{1930, 04, 28}, {19,30,22}}, [{time, local}]),
%ok = file_write_read_file_info_opts(Handle, Name, {{1930, 04, 28}, {19,30,22}}, [{time, universal}]),
ok = file_write_read_file_info_opts(Handle, Name, 1, [{time, posix}]),
- ok = file_write_read_file_info_opts(Handle, Name, -1, [{time, posix}]),
+ %% will not work on platforms with unsigned time_t
+ %ok = file_write_read_file_info_opts(Handle, Name, -1, [{time, posix}]),
+ %ok = file_write_read_file_info_opts(Handle, Name, -300000, [{time, posix}]),
ok = file_write_read_file_info_opts(Handle, Name, 300000, [{time, posix}]),
- ok = file_write_read_file_info_opts(Handle, Name, -300000, [{time, posix}]),
ok = file_write_read_file_info_opts(Handle, Name, 0, [{time, posix}]),
ok = ?PRIM_FILE:stop(Handle),