From nobody Tue Jun 24 22:30:30 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 4bRfm805FCz60M9W; Tue, 24 Jun 2025 22:30:32 +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 4bRfm73f3Wz44D1; Tue, 24 Jun 2025 22:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750804231; 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=w8QqXhmvc/Kw0ViEQjtbQBkTDrVw4CoG9YopoWPp9Xc=; b=US9wXj7wFbH2SfT+0f7bKywZTcPyQSnuwlq9l2RcNgorNvp18Fu8hIbzADxf1QjWuikDej KpOG6dGJ8xt35fAY3FKJUae5/S5CUGSceoVhue/pcdWAzZyM9JSc4vqsi2tWZ+E8/ClX9L DKxLm/0Z+DLb6p1ajvHa5/P32CA1MBCWHTbk+a1fPF/dqk1nWVtj6kqKWkBLqZAZfn1MNc 69GI0vaZmkIuxtRjPiuCQK1FjiIApno5C9/woUF78C+E58Yihz8Ky97VOWdOQVNoyjx3YZ coUZ+zWmyNRke7wZDntvsLkqUsZa3QnepxQfJb4OKSoOf6ecy6wwPTcYnW1xvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750804231; 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=w8QqXhmvc/Kw0ViEQjtbQBkTDrVw4CoG9YopoWPp9Xc=; b=QIYNOkQtCYOAtWiYMQGWodoraOEqcCp0y2fMrkFz0GhN+b4Cjw6/nDxGwSbz+JpsjXgLIy aHMlGGB3l9cWoZsreKyN07MR899YwIZJkXxrw8E1rLXuOpy5VNW1tEeB7VxEz1kEvL9H6x rq2AJ/8nh1jFZWPSeKjkwISUeRJIyZRWFCd2NAG+RbB2Bvz5SJmvAo0s7LbDgFSuxjSj/O xNWlZJp34kzqbpoDWTM9gWLoXm4oqURM+1uVVtO1XumDX7MdfJkye/pDD5jAGgNS0Vhb7p qq6Fddteuy5RQ9kq73rS5Q+8RKp0zJEAQhNyAFH96NXNMLTGDzeKUSm+slZD+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750804231; a=rsa-sha256; cv=none; b=pBoO5f4VUjM+mbZl9FGWXksLWWLctLZEffXl/1O7Pt+waHwry8fPNJ51OzGS8bNpmwnZX0 R/kYqoPs6hBie7LSMG0osL/4cF2ZdJKV6aWl8IgmSkoYlz3zAzc1TpHTLkIvxD/qm7J9Vw 3w9ZbOaj9O19mlkPfsPEhXoG/0sXKVXUcAS4PYH1xaHXxhT+GITQWxRdJCyoH1O5NXbTpD SYgdQL5O0plm9Q8q3/sMviEIoyB3UOFhf2YbsRTXtXhu7LhB2cIe7MiuuIRmDkCywBdfHG dsHgoF2nwroJsvEGXmgjJwps0ek/FHXzC5M7Gh6o1K+xYz8iiddnPEEfH+D5Ng== 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 4bRfm71BCWz15JX; Tue, 24 Jun 2025 22:30:31 +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 55OMUU6U046642; Tue, 24 Jun 2025 22:30:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55OMUUtM046639; Tue, 24 Jun 2025 22:30:30 GMT (envelope-from git) Date: Tue, 24 Jun 2025 22:30:30 GMT Message-Id: <202506242230.55OMUUtM046639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 994bec47ee7f - main - tests/kqueue: repair flaky test 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 994bec47ee7f38bd20366b812313b2ea0714ef19 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=994bec47ee7f38bd20366b812313b2ea0714ef19 commit 994bec47ee7f38bd20366b812313b2ea0714ef19 Author: Gleb Smirnoff AuthorDate: 2025-06-24 22:28:07 +0000 Commit: Gleb Smirnoff CommitDate: 2025-06-24 22:29:03 +0000 tests/kqueue: repair flaky test The test arms timer for 500 msec and then sleeps 1 second and expects that the timer would always fire exactly 2 times. However, it has a chance to legitimately fire only once. This makes the test flaky. Fix the test reducing sleep time down to 495 msec. The problem started to show up recently, and I attribute that to 626ea75ed2e9. Before this revision sleep(3) was almost always sleeping over 1000 msec, now it can sleep exactly 1000 msec. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50996 --- tests/sys/kqueue/libkqueue/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kqueue/libkqueue/timer.c b/tests/sys/kqueue/libkqueue/timer.c index 523dedc7c800..5116aea98b83 100644 --- a/tests/sys/kqueue/libkqueue/timer.c +++ b/tests/sys/kqueue/libkqueue/timer.c @@ -199,7 +199,7 @@ test_periodic_modify(void) kevent_cmp(&kev, kevent_get(kqfd)); /* Check if the event occurs again */ - EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD, 0, 500, NULL); + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD, 0, 495, NULL); if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) err(1, "%s", test_id);