From nobody Sat Mar 08 08:13:54 2025 X-Original-To: dev-commits-src-all@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 4Z8wsb1rnYz5qcfH; Sat, 08 Mar 2025 08:13:55 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z8wsb0D3Hz3kyP; Sat, 08 Mar 2025 08:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741421635; 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=6oLuYczwagcrsFCU7XrQVAXRlXAgAwjlt5YRLxkHUlw=; b=n6VC9zKrHYBq8mDlbiTboSuKZeBVD6jyFCtAE6UF2UtJ4QSO9JSXNZ0kC+IsZ1sS+d5tu/ VsWnm5d0KGjB3wKHfHcKnI8gZZDJjJ7AqzAfq6o4GoCN43i/y5vZa7LtlP16dyMV4JkHkz Fm0QSGDrMb0SYxg+yqTkHDlYgw+QXQds5jgTK7ZIYzeEuDE6IXqowjTZZWQnAfSLTgOMvB Lqhktc/Yn58/Beock7wMdZVW6//XEIrgrmTRMEIHAzx/QEP196/P3gTnS5FiQ6RFOqeyzQ HJO1gd5WHleZ3y+NHInZaqQPI4A81Dl+EoqYp1vkhYraNGEHHBNyLCMs+SpBCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741421635; a=rsa-sha256; cv=none; b=EAMOB3Va52Q1KprsnjBW+3/xY9aDKzoK7KNh/3Y49Qa+LgHodgnP5g3Y7jUXuYo2+tELFE RLzXNve4cjlSOT/Re7eH13cUS0gIzjnyl4zBb8JRJvJo8g3bogKcEc5P7ci1zYJhjvVk14 1TFasRA8T2oJFB5GN9Ko1X/Ps4ARqe5rQxC7xaF3lmdeZH4bz7zOHyVao+o4zq0gWDtKwg 1QYQ5FIt81Wndj4VDJ+C/QiyBP3ogfp+vgb8P8Zoemn0X7/TifMFa90PaftK73aX8Gp150 g8ZHJhl50XLVfvWa0YZmpJu53HX3KURWH9EozLbYO7Nt3MUgQ8I3+9kVLswK5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741421635; 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=6oLuYczwagcrsFCU7XrQVAXRlXAgAwjlt5YRLxkHUlw=; b=e59EeZlV0ZYlSNuNqNxIpIuW7nLlDyHn5FG9BTvl4q/+FqIM21TFo2tvCOger84qSG+K/+ w1hcyp9WVjbU9g55OMt8eByxeW74zBWwJVS4nyBdHOpQZDtmb7MlwLC6uDCbpYOapMvomz BVz2DqYiJQ3puX4BiCgFEcNmz6ku0TPwg04Ev2MR6MeVVqhUOYBLY6LGLrxulVZ5X5vgLe UQZnQj3Pyf4YyOyxf83Hgd9yKtMTjSF5wH5oxufUwcyaF7WUzgATfwcuR5uKygRq9KW73T oIn8C27oKRmVaO436+e44OYktD/0EttV1LE3Wxj5NZ9fQvrA6g0vaMCL7Ok2vg== 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 4Z8wsZ6Vtvzjp; Sat, 08 Mar 2025 08:13:54 +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 5288DskS097574; Sat, 8 Mar 2025 08:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5288Dsk4097571; Sat, 8 Mar 2025 08:13:54 GMT (envelope-from git) Date: Sat, 8 Mar 2025 08:13:54 GMT Message-Id: <202503080813.5288Dsk4097571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0599d2a1c599 - stable/14 - limits tests: Try to fix spurious cputime test failures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0599d2a1c5996cef4d79a3fbe753d863cdd2359b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0599d2a1c5996cef4d79a3fbe753d863cdd2359b commit 0599d2a1c5996cef4d79a3fbe753d863cdd2359b Author: Mark Johnston AuthorDate: 2025-02-14 16:26:19 +0000 Commit: Mark Johnston CommitDate: 2025-03-07 22:51:48 +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. (cherry picked from commit 0f63c4af5e4761680550b0aa08cc96f52076c08c) --- 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()