aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorErland Schönbeck <[email protected]>2014-07-11 11:33:42 +0200
committerErland Schönbeck <[email protected]>2014-07-11 11:35:54 +0200
commit6d1303f5c1fd672d7e9ce98ebd04c79ed0417131 (patch)
tree309e11c11fdc80f19e88096f178b725ebb10e2f1 /lib/kernel/test
parent398976f444a47ad019f8493bc6a23626589163f5 (diff)
parent9a1419a7d4325085dc2235a8531d77e1d96ea689 (diff)
downloadotp-6d1303f5c1fd672d7e9ce98ebd04c79ed0417131.tar.gz
otp-6d1303f5c1fd672d7e9ce98ebd04c79ed0417131.tar.bz2
otp-6d1303f5c1fd672d7e9ce98ebd04c79ed0417131.zip
Merge branch 'maint'
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/erl_prim_loader_SUITE.erl26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/kernel/test/erl_prim_loader_SUITE.erl b/lib/kernel/test/erl_prim_loader_SUITE.erl
index b2ca3bdbc2..658c31c14d 100644
--- a/lib/kernel/test/erl_prim_loader_SUITE.erl
+++ b/lib/kernel/test/erl_prim_loader_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -328,6 +328,30 @@ file_requests(Config) when is_list(Config) ->
{ok,Info} = file:read_file_info(code:which(test_server)),
?line {ok,Info} = rpc:call(Node, erl_prim_loader, read_file_info,
[code:which(test_server)]),
+
+ PrivDir = ?config(priv_dir,Config),
+ Dir = filename:join(PrivDir,?MODULE_STRING++"_file_requests"),
+ ok = file:make_dir(Dir),
+ Alias = filename:join(Dir,"symlink"),
+ case file:make_symlink(code:which(test_server), Alias) of
+ {error, enotsup} ->
+ %% Links not supported on this platform
+ ok;
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ %% Windows user not privileged to create symlinks"
+ ok;
+ ok ->
+ %% Reading file info for link should return file info for
+ %% link target
+ {ok,Info} = rpc:call(Node, erl_prim_loader, read_file_info,
+ [Alias]),
+ #file_info{type=regular} = Info,
+ {ok,#file_info{type=symlink}} =
+ rpc:call(Node, erl_prim_loader, read_link_info,
+ [Alias])
+ end,
+
{ok,Cwd} = file:get_cwd(),
?line {ok,Cwd} = rpc:call(Node, erl_prim_loader, get_cwd, []),
case file:get_cwd("C:") of