From patchwork Thu Jul 25 13:15:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1964750 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MPz7XPjo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WVBGD00xCz1yXx for ; Thu, 25 Jul 2024 23:15:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5EDD64073E; Thu, 25 Jul 2024 13:15:44 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zAkuCwCaqOYf; Thu, 25 Jul 2024 13:15:43 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D2F334076B Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MPz7XPjo Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id D2F334076B; Thu, 25 Jul 2024 13:15:42 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2EC04C002B; Thu, 25 Jul 2024 13:15:42 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 03C17C002A for ; Thu, 25 Jul 2024 13:15:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E806F6064F for ; Thu, 25 Jul 2024 13:15:40 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id wccAPVpxgKu7 for ; Thu, 25 Jul 2024 13:15:40 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=xsimonar@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org CA948605FD Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org CA948605FD Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MPz7XPjo Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id CA948605FD for ; Thu, 25 Jul 2024 13:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721913338; 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=lR5g3zSnHhfJSH5C6jqGmrvpIvjuO4Pc10NcUjOmkU4=; b=MPz7XPjowqZzD85uS7F9qB8L/LMbi5vjh2R3sOG8wbQr+/j5dM/rdzTmdIHU8/Dw5+iv8E S2CfA9ZW9Bi/nWIKgChGUBW18azc4KAWUzclCE19ZXRCldk4A+5fHjBzWewj5rTsXMZF+A NQteCKMf+VgDbHJyzzFSymPhNuBuuec= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-IbAUG4cdNIGmmuR23FE-vA-1; Thu, 25 Jul 2024 09:15:36 -0400 X-MC-Unique: IbAUG4cdNIGmmuR23FE-vA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0F56B1955F66 for ; Thu, 25 Jul 2024 13:15:36 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.anl.eng.rdu2.dc.redhat.com [10.6.38.135]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7679B1955F29; Thu, 25 Jul 2024 13:15:35 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Thu, 25 Jul 2024 15:15:34 +0200 Message-Id: <20240725131534.914412-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn] tests: Cleanup more on_exit commands. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Avoid unnecessary errors trying to stop or restart already stopped processes. Tests were not failing due to this, but potentially confusing errors were logged. Fixes: c0ef76883406 ("tests: Cleanup on_exit commands.") Signed-off-by: Xavier Simonart Acked-by: Ales Musil --- tests/ofproto-macros.at | 2 +- tests/ovn-macros.at | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 5bc162cae..030fe0fa0 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -196,7 +196,7 @@ m4_define([_OVS_VSWITCHD_START], dnl Start ovsdb-server. AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock], [0], [], [stderr]) - on_exit "test -e `cat ovsdb-server.pid` && kill `cat ovsdb-server.pid`" + on_exit "test -e ovsdb-server.pid && kill `cat ovsdb-server.pid`" AT_CHECK([[sed < stderr ' /vlog|INFO|opened log file/d /ovsdb_server|INFO|ovsdb-server (Open vSwitch)/d']]) diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at index 47ada5c70..624e91faf 100644 --- a/tests/ovn-macros.at +++ b/tests/ovn-macros.at @@ -971,7 +971,7 @@ start_scapy_server() { sleep_northd() { echo Northd going to sleep AT_CHECK([kill -STOP $(cat northd/ovn-northd.pid)]) - on_exit "kill -CONT $(cat northd/ovn-northd.pid)" + on_exit "test -e northd/ovn-northd.pid && kill -CONT $(cat northd/ovn-northd.pid)" } wake_up_northd() { @@ -982,7 +982,7 @@ wake_up_northd() { sleep_sb() { echo SB going to sleep AT_CHECK([kill -STOP $(cat ovn-sb/ovsdb-server.pid)]) - on_exit "kill -CONT $(cat ovn-sb/ovsdb-server.pid)" + on_exit "test -e ovn-sb/ovsdb-server.pid && kill -CONT $(cat ovn-sb/ovsdb-server.pid)" } wake_up_sb() { echo SB waking up @@ -1006,7 +1006,7 @@ sleep_ovs() { hv=$1 echo ovs $hv going to sleep AT_CHECK([kill -STOP $(cat $hv/ovs-vswitchd.pid)]) - on_exit "kill -CONT $(cat $hv/ovs-vswitchd.pid)" + on_exit "test -e $hv/ovs-vswitchd.pid && kill -CONT $(cat $hv/ovs-vswitchd.pid)" } wake_up_ovs() { @@ -1018,7 +1018,7 @@ wake_up_ovs() { sleep_ovsdb() { echo OVSDB $1 going to sleep AT_CHECK([kill -STOP $(cat $1/ovsdb-server.pid)]) - on_exit "kill -CONT $(cat $1/ovsdb-server.pid)" + on_exit "test -e $1/ovsdb-server.pid && kill -CONT $(cat $1/ovsdb-server.pid)" } wake_up_ovsdb() { echo OVSDB $1 waking up