From 770419b1c566c953b30e90220cec2048ba0c0708 Mon Sep 17 00:00:00 2001 From: Simon Rushton Date: Mon, 15 Feb 2021 14:26:03 +0000 Subject: [PATCH] Set ulimit for sharedclasscache multithread tests Signed-off-by: Simon Rushton --- system/sharedClasses/playlist.xml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/system/sharedClasses/playlist.xml b/system/sharedClasses/playlist.xml index 0258b50e50..d8eda504fd 100644 --- a/system/sharedClasses/playlist.xml +++ b/system/sharedClasses/playlist.xml @@ -28,9 +28,9 @@ Mode110 Mode610 - if [[ ! $(Q)$(PLATFORM)$(Q) == *$(Q)win$(Q)* ]] ; then export original_umask_val=`umask` $(AND_IF_SUCCESS) umask 0002 $(AND_IF_SUCCESS) echo umask set to `umask`; fi; \ + if [ ! $(Q)$(PLATFORM)$(Q) == *$(Q)win$(Q)* ] ; then export original_umask_val=`umask` $(AND_IF_SUCCESS) umask 0002 $(AND_IF_SUCCESS) echo umask set to `umask`; fi; \ $(SYSTEMTEST_CMD_TEMPLATE) -test=SharedClassesAPI; \ - if [[ ! $(Q)$(PLATFORM)$(Q) == *$(Q)win$(Q)* ]] ; then umask $$original_umask_val $(AND_IF_SUCCESS) echo umask set to `umask`; fi; \ + if [ ! $(Q)$(PLATFORM)$(Q) == *$(Q)win$(Q)* ] ; then umask $$original_umask_val $(AND_IF_SUCCESS) echo umask set to `umask`; fi; \ $(TEST_STATUS) extended @@ -185,7 +185,10 @@ Mode110 Mode610 - $(SYSTEMTEST_CMD_TEMPLATE) -test=SharedClasses -test-args=$(Q)sharedClassMode=SCM01,sharedClassTest=MultiThread$(Q); \ + + test $$(echo $(Q)$(PLATFORM)$(Q) | grep $(Q)win$(Q)) $(AND_IF_SUCCESS) test -f /bin/bash $(AND_IF_SUCCESS) /bin/bash -c 'test $$(ulimit -u) -lt 2048 $(AND_IF_SUCCESS) echo Attempting to increase max user processes from `ulimit -u` to 2048 $(AND_IF_SUCCESS) ulimit -u 2048 $(AND_IF_SUCCESS) echo ulimit -u now `ulimit -u`'; \ + $(SYSTEMTEST_CMD_TEMPLATE) -test=SharedClasses -test-args=$(Q)sharedClassMode=SCM01,sharedClassTest=MultiThread$(Q); \ $(TEST_STATUS) extended @@ -261,7 +264,10 @@ Mode110 Mode610 - $(SYSTEMTEST_CMD_TEMPLATE) -test=SharedClasses -test-args=$(Q)sharedClassMode=SCM23,sharedClassTest=MultiThread$(Q); \ + + test $$(echo $(Q)$(PLATFORM)$(Q) | grep $(Q)win$(Q)) $(AND_IF_SUCCESS) test -f /bin/bash $(AND_IF_SUCCESS) /bin/bash -c 'test $$(ulimit -u) -lt 2048 $(AND_IF_SUCCESS) echo Attempting to increase max user processes from `ulimit -u` to 2048 $(AND_IF_SUCCESS) ulimit -u 2048 $(AND_IF_SUCCESS) echo ulimit -u now `ulimit -u`'; \ + $(SYSTEMTEST_CMD_TEMPLATE) -test=SharedClasses -test-args=$(Q)sharedClassMode=SCM23,sharedClassTest=MultiThread$(Q); \ $(TEST_STATUS) extended