From patchwork Sun Dec 16 16:27:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1014162 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.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 mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43HqSs4HGcz9s2P for ; Mon, 17 Dec 2018 03:27:39 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 75134BAA; Sun, 16 Dec 2018 16:27:35 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 41311BA2 for ; Sun, 16 Dec 2018 16:27:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 68BE77A4 for ; Sun, 16 Dec 2018 16:27:33 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigabrt.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id CB53920007; Sun, 16 Dec 2018 16:27:29 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Sun, 16 Dec 2018 08:27:25 -0800 Message-Id: <20181216162725.2722-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] tests: Strip "lt-" prefix when checking daemon process names. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org When libtool is in the picture to deal with shared libraries, processes end up with an "lt-" prefix in their process names. This caused the process name check in daemon.at to fail. This commit fixes the problem by stripping off that prefix. Fixes: d8c6955a03ea ("tests: Simplify and improve the daemon tests.") Reported-by: Timothy Redaelli Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-December/354574.html Signed-off-by: Ben Pfaff Acked-By: Timothy Redaelli Tested-By: Timothy Redaelli --- tests/daemon.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/daemon.at b/tests/daemon.at index 6382d856bd95..bdc8910f90da 100644 --- a/tests/daemon.at +++ b/tests/daemon.at @@ -7,7 +7,9 @@ OVS_START_SHELL_HELPERS # (On other systems, don't bother.) if test -e /proc/$$/comm; then check_process_name() { - AT_CHECK_UNQUOTED([cat /proc/$1/comm], [0], [$2 + # In case we're building with shared libraries enabled, strip + # off libtool's lt- prefix. + AT_CHECK_UNQUOTED([sed 's/lt-//' /proc/$1/comm], [0], [$2 ]) } else