From nobody Fri Feb 14 16:35:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yvd2H0tqrz5nKxD; Fri, 14 Feb 2025 16:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yvd2H0Mnvz3hd4; Fri, 14 Feb 2025 16:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739550919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ifXoR6UyqWUJFkzNiiaCS4r8EIS2gdD1OB0e8mKS2k4=; b=lV3czwIxKhaDt16E6BBy869vXJEXHxc4RhXscp44a+Z51ux2zFi4qnpW6Hu63boeOAoGnu kq/rdagBRH4duwTPJ4GGPjmcfW4v5if2aaKtp3swqltd2GUx2YxOshseK8BI3g8jEkcLVG sht0MnCIuU5VRxOpptWWbhpv5/1PcKr2u9/z154tzPq1AtjKqzpO/rw1nBBq2khSYjM8aC +ivOXMywdYKzLibosSJMD4boQ/EyffiElq3FyksuyUaEX18uspWzvQ7D9jsZ8auvdU0euL 8s1c43tpRqeVNsnNG8mE3kifX/d9zAkp5xSHj95wnn39lak8FXxR35rscfSaDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739550919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ifXoR6UyqWUJFkzNiiaCS4r8EIS2gdD1OB0e8mKS2k4=; b=Qp7Ahh/XkIrTrkQf3QpVr5fM4FMWFBNHPn61fgxxphm+DMhHn2U2Ulz9Tjep+4IxJP/WN4 Ve2+k4Ph/QjHYLh6e3dZuFkCatsR4kqRgql4mHMkYhDYVQjJyUGq4fD6R21dCJqlsBq/2W H0gyDwJM93n2zuPL2e1qkyLwkqfXMVSGdEwl1l3TeleVeZH3uYURhRcmFvKyWNZVwSjaTX 1XJsl13vN36QWeGbg/wpYUbo1xXUp/MG5207o+9+ECCD/J7C0S+IWQTbUBQ5a2ekcM+3T0 OqL0npo4dTsNOSZpvW2lR/oFUT3dKV+tBxNf1Io43clam0px5lpHZEoeagEgnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739550919; a=rsa-sha256; cv=none; b=QLHSh93Q63keGpEiI7ERWyPEQuqG2N/1Ztqthy72QmwVhRI/sELmbdHJq2K0QiKzL+Mh3H 9YSueskvIt6LInvIeLpS29bCvvoh8EZs2qDome7HLXZFhVHMLhlDPKlaSmAxA4SxVWWqOg WJYzGFubFieybYzdq/ap/Fa2Jx//wy+sWz9ddpPffeUx928qDXrgJGRKrYo4EviTAjhFmo eI9KxBspHw84EVAGxm2u8qSgP11GBtXCJCQKoOkJQIjWEBFNtrdi2QcuhrebqymmXaXgiq 9H9ZNCIbQS1jMYvOPkqqTslTbE1L4eCjQpTFLePrfQgkKyZmZXDZYx/rMk09VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yvd2G71l4zfgX; Fri, 14 Feb 2025 16:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51EGZIqr021049; Fri, 14 Feb 2025 16:35:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51EGZIOZ021045; Fri, 14 Feb 2025 16:35:18 GMT (envelope-from git) Date: Fri, 14 Feb 2025 16:35:18 GMT Message-Id: <202502141635.51EGZIOZ021045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0f63c4af5e47 - main - limits tests: Try to fix spurious cputime test failures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f63c4af5e4761680550b0aa08cc96f52076c08c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0f63c4af5e4761680550b0aa08cc96f52076c08c commit 0f63c4af5e4761680550b0aa08cc96f52076c08c Author: Mark Johnston AuthorDate: 2025-02-14 16:26:19 +0000 Commit: Mark Johnston CommitDate: 2025-02-14 16:26:19 +0000 limits tests: Try to fix spurious cputime test failures I very occasionally see test failures caused by the total CPU time being several milliseconds under 3s. The test runs "limits -t 3 time " and verifies that the reported time elapsed is at least 3s (and not too much more). In particular, any time spent executing time(1) itself is counted against the limit but not recorded in the output. I think it makes more sense to reverse the order, so that the CPU time limit is not applied to time(1) itself. This also resolves the test failures I was seeing, which were reproducible only under load (i.e., running many tests in parallel). MFC after: 2 weeks Sponsored by: Klara, Inc. --- usr.bin/limits/tests/limits_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/limits/tests/limits_test.sh b/usr.bin/limits/tests/limits_test.sh index 701886066ff1..fd7b50b0945a 100755 --- a/usr.bin/limits/tests/limits_test.sh +++ b/usr.bin/limits/tests/limits_test.sh @@ -57,7 +57,7 @@ cputime_hard_flag_body() atf_check -o match:'cputime[[:space:]]+3 secs' \ limits -H -t 3 limits -S atf_check -e save:time_output -s signal:sigkill \ - limits -H -t 3 $TIME -p sh -c 'while : ; do : ; done' + $TIME -p limits -H -t 3 sh -c 'while : ; do : ; done' validate_time_output time_output } cputime_hard_flag_cleanup() @@ -76,7 +76,7 @@ cputime_soft_flag_body() atf_check -o match:'cputime-cur[[:space:]]+3 secs' \ limits -S -t 3 limits -S atf_check -e save:time_output -s signal:$SIGXCPU \ - limits -S -t 3 $TIME -p sh -c 'while : ; do : ; done' + $TIME -p limits -S -t 3 sh -c 'while : ; do : ; done' validate_time_output time_output } cputime_soft_flag_cleanup()