Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1 1/1] gitlab-ci: correct OSX limits setup
@ 2020-04-13  9:59 Alexander V. Tikhonov
  0 siblings, 0 replies; only message in thread
From: Alexander V. Tikhonov @ 2020-04-13  9:59 UTC (permalink / raw)
  To: Oleg Piskunov, Sergey Bronnikov; +Cc: tarantool-patches

Limits values can reach the maximum range of the system wide
limits set in kernel (Kernel value >= hard limit >= soft limit):
  MAX_FILES <= `sysctl -n kern.maxfilesperproc`
  MAX_PROC <= `sysctl -n kern.maxprocperuid`

Part of #4883
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/osx_15_catalina-full-ci
Issue: https://github.com/tarantool/tarantool/issues/4883

 .travis.mk | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/.travis.mk b/.travis.mk
index f709a18b6..001752844 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -4,8 +4,13 @@
 
 DOCKER_IMAGE?=packpack/packpack:debian-stretch
 TEST_RUN_EXTRA_PARAMS?=
-MAX_FILES?=65534
-MAX_PROC?=2500
+# limit values can reach the maximum range
+# of the system wide limits set in kernel:
+# Kernel value >= hard limit >= soft limit:
+#   kern.maxfiles >= kern.maxfilesperproc >= ulimit -H -n >= ulimit -n
+#   kern.maxproc >= kern.maxprocperuid >= ulimit -H -n >= ulimit -n
+MAX_FILES?=$(shell sysctl -n kern.maxfilesperproc)
+MAX_PROC?=$(shell sysctl -n kern.maxprocperuid)
 
 all: package
 
@@ -171,22 +176,11 @@ build_osx:
 	make -j
 
 test_osx_no_deps: build_osx
-	# Limits: Increase the maximum number of open file descriptors on macOS:
-	#   Travis-ci needs the "ulimit -n <value>" call
-	#   Gitlab-ci needs the "launchctl limit maxfiles <value>" call
-	# Also gitlib-ci needs the password to change the limits, while
-	# travis-ci runs under root user. Limit setup must be in the same
-	# call as tests runs call.
 	# Tests: Temporary excluded replication/ suite with some tests
 	#        from other suites by issues #4357 and #4370
-	sudo -S launchctl limit maxfiles ${MAX_FILES} || : ; \
-		launchctl limit maxfiles || : ; \
-		ulimit -n ${MAX_FILES} || : ; \
-		ulimit -n ; \
-		sudo -S launchctl limit maxproc ${MAX_PROC} || : ; \
-		launchctl limit maxproc || : ; \
+	ulimit -n ${MAX_FILES} || : ; \
 		ulimit -u ${MAX_PROC} || : ; \
-		ulimit -u ; \
+		ulimit -H -a ; ulimit -a ; \
 		rm -rf /tmp/tnt ; \
 		cd test && ./test-run.py --vardir /tmp/tnt --force $(TEST_RUN_EXTRA_PARAMS) \
 			app/ app-tap/ box/ box-py/ box-tap/ engine/ engine_long/ long_run-py/ luajit-tap/ \
-- 
2.17.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-13  9:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13  9:59 [Tarantool-patches] [PATCH v1 1/1] gitlab-ci: correct OSX limits setup Alexander V. Tikhonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox