Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
0126-os_SUITE-Fix-failed-error_info-1-test-case...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0126-os_SUITE-Fix-failed-error_info-1-test-case-on-FreeBS.patch of Package erlang
From 896416cd96c9931368fc644280fbb5e5e7537a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Tue, 14 Mar 2023 14:57:25 +0100 Subject: [PATCH 2/2] os_SUITE: Fix failed error_info/1 test case on FreeBSD At least some FreeBSD systems support about one million open files. On those systems we will run out of Erlang processes before we reach the open file limit. --- lib/kernel/test/os_SUITE.erl | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/kernel/test/os_SUITE.erl b/lib/kernel/test/os_SUITE.erl index 01b76d83df..45a3908d69 100644 --- a/lib/kernel/test/os_SUITE.erl +++ b/lib/kernel/test/os_SUITE.erl @@ -401,8 +401,8 @@ error_info(Config) -> ExhaustFDs = fun(M,F,A) -> - case os:type() of - {unix, _} -> + case no_limit_for_opened_files() of + false -> {ok, Peer, Node} = ?CT_PEER(), FN = filename:join( proplists:get_value(priv_dir, Config), @@ -426,7 +426,7 @@ error_info(Config) -> after peer:stop(Peer) end; - _ -> + true -> apply(M,F,A) end end, @@ -437,7 +437,7 @@ error_info(Config) -> {cmd, [{no, string}, no_map]}, {cmd, ["echo 1"], [{general, "too many open files \\(emfile\\)"}, {wrapper, ExhaustFDs}] ++ - [no_fail || win32 =:= element(1, os:type())]}, + [no_fail || no_limit_for_opened_files()]}, {find_executable, 1}, %Not a BIF. {find_executable, 2}, %Not a BIF. @@ -469,6 +469,19 @@ error_info(Config) -> ], error_info_lib:test_error_info(os, L). +no_limit_for_opened_files() -> + case os:type() of + {unix, freebsd} -> + %% At least some FreeBSD systems support about one million open + %% files, which means that we run out of Erlang processes before we + %% reach the open file limit. + true; + {unix, _} -> + false; + _ -> + true + end. + %% Util functions comp(Expected, Got) -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor