From patchwork Tue Feb 26 02:35:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10829347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4E4B17EF for ; Tue, 26 Feb 2019 02:35:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 911372C2C7 for ; Tue, 26 Feb 2019 02:35:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 859A42C2CC; Tue, 26 Feb 2019 02:35:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2130C2C2C7 for ; Tue, 26 Feb 2019 02:35:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbfBZCfj (ORCPT ); Mon, 25 Feb 2019 21:35:39 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:51314 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbfBZCfj (ORCPT ); Mon, 25 Feb 2019 21:35:39 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1Q2ZAPv149439; Tue, 26 Feb 2019 02:35:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=hKnQmLwqdABW0jfIom66bSzcXIOwfktLfGE9rK6tzik=; b=jLEaqiQES6rO8c3vVvJx6LwQENH0Z+MwvCxg/ry5LX/TrDEPIHe44IC0d3T1/pQO7B5Q vq30VeF5H/Pi2Uvk1zTvfnp3QDCGKrCPJYD46BRnwdwPSk7xUOV4ogtFFU/U55tMzCVp BdUFmmV4cSFzwW3vVp0PyLXigbXJu1ZzYUo20+NN/eZDxp9lIiAbxr0t8dVjohZK2Z1x tnCZ+ku8TWjjIGzH65M27y5RmK/C/FcWm+t+WiHCRdW9/RGI2aygOCG1vPAPDut2d5Q6 t+tb2wP+4mkRtdVMks3i3U/GffTVoxy6lMyE8f7q2+UK7YTmLdWBb5evfHDX3PWF1Y+0 yQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2qtupe24ux-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Feb 2019 02:35:36 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1Q2ZUBl029247 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Feb 2019 02:35:31 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1Q2ZUOl017535; Tue, 26 Feb 2019 02:35:30 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Feb 2019 18:35:30 -0800 Subject: [PATCH 1/2] misc: don't oom the box opening tmpfiles From: "Darrick J. Wong" To: guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 25 Feb 2019 18:35:29 -0800 Message-ID: <155114852926.9683.4048206997940455508.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9178 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902260017 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong For the t_open_tmpfiles tests, limit ourselves to half of file-max so that we don't OOM the test machine. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson --- tests/generic/530 | 2 +- tests/generic/531 | 2 +- tests/xfs/501 | 2 +- tests/xfs/502 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/generic/530 b/tests/generic/530 index a2968d25..2bc4a992 100755 --- a/tests/generic/530 +++ b/tests/generic/530 @@ -42,7 +42,7 @@ _scratch_mount # Set ULIMIT_NOFILE to min(file-max, 50000 files per LOAD_FACTOR) # so that this test doesn't take forever or OOM the box max_files=$((50000 * LOAD_FACTOR)) -max_allowable_files=$(( $(cat /proc/sys/fs/file-max) )) +max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 )) test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \ max_files=$max_allowable_files ulimit -n $max_files diff --git a/tests/generic/531 b/tests/generic/531 index f3eb5cde..5d60e4b6 100755 --- a/tests/generic/531 +++ b/tests/generic/531 @@ -44,7 +44,7 @@ nr_cpus=$(( $(getconf _NPROCESSORS_ONLN) * 2 )) # Set ULIMIT_NOFILE to min(file-max, 50000 files per LOAD_FACTOR) # so that this test doesn't take forever or OOM the box max_files=$((50000 * LOAD_FACTOR)) -max_allowable_files=$(( $(cat /proc/sys/fs/file-max) )) +max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 )) test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \ max_files=$max_allowable_files ulimit -n $max_files diff --git a/tests/xfs/501 b/tests/xfs/501 index 51cdb020..d689145f 100755 --- a/tests/xfs/501 +++ b/tests/xfs/501 @@ -47,7 +47,7 @@ _scratch_mount # Set ULIMIT_NOFILE to min(file-max, 30000 files per LOAD_FACTOR) # so that this test doesn't take forever or OOM the box max_files=$((30000 * LOAD_FACTOR)) -max_allowable_files=$(( $(cat /proc/sys/fs/file-max) )) +max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 )) test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \ max_files=$max_allowable_files ulimit -n $max_files diff --git a/tests/xfs/502 b/tests/xfs/502 index bfb063f4..5ad10316 100755 --- a/tests/xfs/502 +++ b/tests/xfs/502 @@ -46,7 +46,7 @@ nr_cpus=$(( $(getconf _NPROCESSORS_ONLN) * 2 )) # Set ULIMIT_NOFILE to min(file-max, 30000 files per cpu per LOAD_FACTOR) # so that this test doesn't take forever or OOM the box max_files=$((30000 * LOAD_FACTOR)) -max_allowable_files=$(( $(cat /proc/sys/fs/file-max) )) +max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 )) test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \ max_files=$max_allowable_files ulimit -n $max_files