diff options
author | Raimo Niskanen <[email protected]> | 2011-11-10 17:08:56 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2011-11-15 11:57:39 +0100 |
commit | e95b8b3fa7f9afac4c91eb41017ef094add43124 (patch) | |
tree | 7280806689db4f0a3598ed02ce4ad2ab69645a45 /lib/kernel/test/inet_res_SUITE.erl | |
parent | 15a0f41dd37c2147d2dd5da14eb3707fdeb22855 (diff) | |
download | otp-e95b8b3fa7f9afac4c91eb41017ef094add43124.tar.gz otp-e95b8b3fa7f9afac4c91eb41017ef094add43124.tar.bz2 otp-e95b8b3fa7f9afac4c91eb41017ef094add43124.zip |
Skip inet_res_SUITE tests when external resolver does not start
E.g OpenBSD's (5.0) patched named does not allow itself to be
started without privilige separation, which is only allowed
for the superuser so test suites can not use that named.
Fix the shell script that starts named to detect early exit
from named and inform the Erlang code test suite what happened.
Diffstat (limited to 'lib/kernel/test/inet_res_SUITE.erl')
-rw-r--r-- | lib/kernel/test/inet_res_SUITE.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl index 8a3d220e46..15b0ed5718 100644 --- a/lib/kernel/test/inet_res_SUITE.erl +++ b/lib/kernel/test/inet_res_SUITE.erl @@ -136,21 +136,22 @@ ns_init(ZoneDir, PrivDir, DataDir) -> atom_to_list(ZoneDir)]}, stderr_to_stdout, eof]), - ns_start(ZoneDir, NS, P); + ns_start(ZoneDir, PrivDir, NS, P); _ -> throw("Only run on Unix") end. -ns_start(ZoneDir, NS, P) -> +ns_start(ZoneDir, PrivDir, NS, P) -> case ns_collect(P) of eof -> erlang:error(eof); "Running: "++_ -> {ZoneDir,NS,P}; "Error: "++Error -> + ns_printlog(filename:join([PrivDir,ZoneDir,"named.log"])), throw(Error); _ -> - ns_start(ZoneDir, NS, P) + ns_start(ZoneDir, PrivDir, NS, P) end. ns_end(undefined, _PrivDir) -> undefined; |