summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2019-09-19 09:45:07 +0200
committerJohn Högberg <john@erlang.org>2019-09-19 09:55:22 +0200
commitf8a09b16abe083f4686405b07318cb7b41a1cf44 (patch)
tree00c8c0f8e46b575a3f139149a18f813f5b5acabc
parent7f4add8cf73c7bfaae9ee9dcf2af00c963036de7 (diff)
downloaderlang-f8a09b16abe083f4686405b07318cb7b41a1cf44.tar.gz
file_SUITE: Only test allocate/3 size updates on known ok platforms
Support is spotty in our test platform, especially on the rigs that run the tests on funny file systems like NFS. We therefore limit the test to the rigs where we know it will work under normal circumstances. That the call works at all is tested in allocate/1, this commit only skips the size assertion test.
-rw-r--r--lib/kernel/test/file_SUITE.erl16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index 7686aeee7d..1c1b35abc1 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -2041,13 +2041,7 @@ allocate_and_assert(Fd, Offset, Length) ->
%% Tests that asserts that file:allocate/3 changes file size
allocate_file_size(Config) when is_list(Config) ->
case os:type() of
- {win32, _} ->
- {skip, "Windows does not support file:allocate/3"};
-
- {unix, linux} ->
- {skip, "file:allocate/3 on Linux does not change file size"};
-
- _ ->
+ {unix, darwin} ->
PrivDir = proplists:get_value(priv_dir, Config),
Allocate = filename:join(PrivDir, atom_to_list(?MODULE)++"_allocate_file"),
@@ -2057,7 +2051,13 @@ allocate_file_size(Config) when is_list(Config) ->
ok = ?FILE_MODULE:close(Fd),
[] = flush(),
- ok
+ ok;
+ {unix, linux} ->
+ {skip, "file:allocate/3 on Linux does not change file size"};
+ {win32, _} ->
+ {skip, "Windows does not support file:allocate/3"};
+ _ ->
+ {skip, "Support for allocate/3 is spotty in our test platform at the moment."}
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%