From patchwork Thu Sep 10 18:17:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1361779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BnRvh0TV8z9sSs for ; Fri, 11 Sep 2020 04:18:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 23EED876CC; Thu, 10 Sep 2020 18:18:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c6Fvmpa2ma9w; Thu, 10 Sep 2020 18:18:05 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 4C0B3876B5; Thu, 10 Sep 2020 18:18:05 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 18F62C0859; Thu, 10 Sep 2020 18:18:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 18141C0051 for ; Thu, 10 Sep 2020 18:18:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1126487737 for ; Thu, 10 Sep 2020 18:18:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n6N-IEREnsTc for ; Thu, 10 Sep 2020 18:18:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by hemlock.osuosl.org (Postfix) with ESMTPS id B494B87731 for ; Thu, 10 Sep 2020 18:18:01 +0000 (UTC) X-Originating-IP: 73.241.94.255 Received: from localhost.localdomain.localdomain (unknown [73.241.94.255]) (Authenticated sender: hzhou@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 621FC1C0003; Thu, 10 Sep 2020 18:17:56 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Thu, 10 Sep 2020 11:17:47 -0700 Message-Id: <1599761867-122691-1-git-send-email-hzhou@ovn.org> X-Mailer: git-send-email 2.1.0 Cc: Han Zhou Subject: [ovs-dev] [PATCH ovn] ovn-controller.at: Fix test for debug/delay-nb-cfg-report. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" In the test case for debug/delay-nb-cfg-report, it sets the delay as 2 seconds, and firstly triggered a sync with wait timeout being 1 sec and expects the wait timedout, and then it immediately started another sync with wait timeout being 3 sec, expecting it not timing out. However, since 2 + 2 = 1 + 3, there is a good chance that the second wait would still time out, so the test fails occasionally. This patch fixes it by sleep another 1 sec to let the 1st delay complete before starting the second sync and wait. Reported-by: Ilya Maximets Fixes: a8182e21484 ("ovn-controller: Unix command debug/delay-nb-cfg-report.") Signed-off-by: Han Zhou Tested-by: Ilya Maximets --- tests/ovn-controller.at | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at index 7ed5216..d806134 100644 --- a/tests/ovn-controller.at +++ b/tests/ovn-controller.at @@ -402,6 +402,9 @@ AT_CHECK([ovn-appctl -t ovn-controller debug/delay-nb-cfg-report 2], [0], AT_FAIL_IF([ovn-nbctl --timeout=1 --wait=hv sync]) +# sleep another 1 sec so that the original 2 sec sleep is done in ovn-controller +sleep 1 + AT_CHECK([ovn-nbctl --timeout=3 --wait=hv sync]) AT_CHECK([ovn-appctl -t ovn-controller debug/delay-nb-cfg-report 0], [0],