From patchwork Thu Sep 1 16:09:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962858 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E5FFC64991 for ; Thu, 1 Sep 2022 16:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048638; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Nm1gAVaqZ64LoMz8rauyipEM4euh6awYN2tNraik9Yw=; b=WKO5cCxYXNKhUX2kVSaq1teUklTMaEHlqufsdDx8i9HHfM13mHwWtEzWwQYcBgWVhk+Acd 1aBw7dPS5ssfel1gT5I4R3WC5mcTBX1ilbD69Aj3hMgFcglB/7ekfIdUxw9OhHiWT0bUhq thqbtPAx3w9NryxEK9u3NMZDthslh6c= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-530-KMUoALO4OqebcbBW831Wbg-1; Thu, 01 Sep 2022 12:10:34 -0400 X-MC-Unique: KMUoALO4OqebcbBW831Wbg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C9F7B29324AA; Thu, 1 Sep 2022 16:10:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B894B492C3B; Thu, 1 Sep 2022 16:10:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 76CB71943214; Thu, 1 Sep 2022 16:10:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2350B1946A5E for ; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0FCD7C15BBD; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B7E9C15BBA for ; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E47428037AE for ; Thu, 1 Sep 2022 16:10:10 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-231-xKAOoefCMVu2GIbQuyiv5g-1; Thu, 01 Sep 2022 12:10:09 -0400 X-MC-Unique: xKAOoefCMVu2GIbQuyiv5g-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 82AFB22B35; Thu, 1 Sep 2022 16:10:06 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4E19513A79; Thu, 1 Sep 2022 16:10:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iAKCEV7ZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:06 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:37 +0200 Message-Id: <20220901160952.2167-2-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Subject: [dm-devel] [PATCH 01/16] multipath-tools: Makefile: remove useless .PHONY targets X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck .PHONY is only necessary for targets that may match actually existing files. Signed-off-by: Martin Wilck --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5851149..74ab648 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ BUILDDIRS := $(LIB_BUILDDIRS) \ BUILDDIRS.clean := $(BUILDDIRS:=.clean) tests.clean -.PHONY: $(BUILDDIRS) $(BUILDDIRS:=.uninstall) $(BUILDDIRS:=.install) $(BUILDDIRS:=.clean) $(LIB_BUILDDIRS:=.abi) +.PHONY: $(BUILDDIRS) all: $(BUILDDIRS) From patchwork Thu Sep 1 16:09:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962849 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6480FC67868 for ; Thu, 1 Sep 2022 16:10:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048621; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Cifet2sf1PWgE83zgJDOzAaSAHS4g4qpPcLL/JnLhiw=; b=Yqf2pc26eJYVeY9riE11h1wxzH9oNvpc3SENZmvj/0/TPiBnL6mtulR5do66iJM9uxgDxn tiQpxyvm/BattSCzxpmKLOh6ion9rTiXR5Wxi9rBBp1AtT1AabeGZ++h6atYEYXgJ/sM4U KIE6uF9WAbBMa4iWbRpcvbt+YIawyZ8= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-179-vP-3L1NIMb6EV3ydqSx9lA-1; Thu, 01 Sep 2022 12:10:18 -0400 X-MC-Unique: vP-3L1NIMb6EV3ydqSx9lA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 430AB3C10696; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E9F2C15BB3; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id ED2D71943214; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 722E71946A5E for ; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 585CEC15BBD; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54C47C15BBA for ; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E41E85A589 for ; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-220-rfKjU12mPMuKHO4aPwCaxA-1; Thu, 01 Sep 2022 12:10:09 -0400 X-MC-Unique: rfKjU12mPMuKHO4aPwCaxA-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C3FE02021B; Thu, 1 Sep 2022 16:10:06 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8E4CD13A79; Thu, 1 Sep 2022 16:10:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UMhIIV7ZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:06 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:38 +0200 Message-Id: <20220901160952.2167-3-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Subject: [dm-devel] [PATCH 02/16] multipath-tools: Makefile: fix install->all dependency X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck Rather than enforcing a "make all; make install" in the top directory, make sure that the $DIR.install correctly depends on $DIR for all subdirs. This speeds up compilation without breaking dependencies. Signed-off-by: Martin Wilck --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 74ab648..6ebd030 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,7 @@ libmultipath/checkers.install \ $(BUILDDIRS.clean): $(MAKE) -C ${@:.clean=} clean -$(BUILDDIRS:=.install): $(BUILDDIRS) +%.install: % $(MAKE) -C ${@:.install=} install $(BUILDDIRS:=.uninstall): From patchwork Thu Sep 1 16:09:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962853 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5293ECAAD8 for ; Thu, 1 Sep 2022 16:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048626; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=gt7FTRm4kWLedTdytA2XAGqNGB9ijQhfzZiwD/mvw7A=; b=Mz58cF/MjtDApBsBVkeecYmjeUNJhs1X67F+HtU/+kAyc4oTiYp+8BkxwImo+lIVUZyJIK lNg1LtJBxsB4ir5UEQyJEixYHvXJU3esD9QvpI2VxDPn/Fx0LTHPSEhKtXwtFEt8lcQpMl PCw6Jdeii/OBJzGSiKTs8w72+1lC4CU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-204-osS-fqVePze41XH8pYUA7Q-1; Thu, 01 Sep 2022 12:10:23 -0400 X-MC-Unique: osS-fqVePze41XH8pYUA7Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4A508032F1; Thu, 1 Sep 2022 16:10:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9253B2166B2B; Thu, 1 Sep 2022 16:10:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7F7EB1943214; Thu, 1 Sep 2022 16:10:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 31916194B977 for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 21CBC2166B2A; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E1A42166B26 for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 018791C04B4E for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-85-JtiAQtB8O1a9wx7z_6PWjA-1; Thu, 01 Sep 2022 12:10:09 -0400 X-MC-Unique: JtiAQtB8O1a9wx7z_6PWjA-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 10AE22021C; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D026F13A79; Thu, 1 Sep 2022 16:10:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WBA+MV7ZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:06 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:39 +0200 Message-Id: <20220901160952.2167-4-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Subject: [dm-devel] [PATCH 03/16] multipath-tools: Makefile: remove dependency test -> test-progs X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck This dependency is already established in tests/Makefile. "test" must depend on "all" though. Signed-off-by: Martin Wilck --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6ebd030..1537cfd 100644 --- a/Makefile +++ b/Makefile @@ -101,7 +101,7 @@ uninstall: $(BUILDDIRS:=.uninstall) test-progs: all $(MAKE) -C tests progs -test: test-progs +test: all $(MAKE) -C tests all valgrind-test: all From patchwork Thu Sep 1 16:09:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962850 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D905ECAAD8 for ; Thu, 1 Sep 2022 16:10:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048621; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1zji9cpNf8x133SLQhjZibv8Y/I2CrutpLTUMTyDRMI=; b=ZTZtsYDa/E+0QSlt/Bwqumvry5MB6n77veaJsxOe0C2SGiv6YLTm1ETLmhz502vBLv/TqI /BHntSqNDf6c+6lMxlfkmsLcGaPc5n5/+LkjKbYOxZq/cHUD/pFCsQlyRpRe65o0a2qwOR mReTQXDf8tGc8fe+Lj9NjfK0bHlZ6vw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-369-z2e4-CAaPW2Ejz7i_qXb6A-1; Thu, 01 Sep 2022 12:10:19 -0400 X-MC-Unique: z2e4-CAaPW2Ejz7i_qXb6A-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 42ED41809629; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A439E40334F; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 358C2194B940; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 057BE1946A5E for ; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E9FF9945D0; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E65F318ECC for ; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CA2B81C04B55 for ; Thu, 1 Sep 2022 16:10:11 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-403-zbKKdxGcNaeWTmN63Z8erw-1; Thu, 01 Sep 2022 12:10:10 -0400 X-MC-Unique: zbKKdxGcNaeWTmN63Z8erw-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 50D302021D; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1DC2313A79; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OGWZBV/ZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:07 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:40 +0200 Message-Id: <20220901160952.2167-5-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Subject: [dm-devel] [PATCH 04/16] multipath-tools: Makefile: run abidiff with --redundant flag X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck With --redundant, abidiff lists all changed functions, which may be handy. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1537cfd..27b4641 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ abi.tar.gz: abi abi-test: abi reference-abi $(wildcard abi/*.abi) @err=0; \ for lib in abi/*.abi; do \ - diff=$$(abidiff "reference-$$lib" "$$lib") || { \ + diff=$$(abidiff --redundant "reference-$$lib" "$$lib") || { \ err=1; \ echo "==== ABI differences in for $$lib ===="; \ echo "$$diff"; \ From patchwork Thu Sep 1 16:09:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962859 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59CCAC64991 for ; Thu, 1 Sep 2022 16:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048648; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Mex6s3AGTH0P82t3cqvjcyXmYVxtDN58jcUVndhvfEg=; b=LoxpSGz+cnnnB56xezlkneUNLf8IWuXQXlDrVpziKCi0Qyiz/MOZWyMIk8tZcyFseErDBv lvt3JYshusXbgnstZMLUCmFBFApBO48Fby5vy105+ZCoGs7b6v4M0QvqICKc1wSwV6RSFH DmPaks1wGogB8jRMLHNW/OYZ9HPaz3A= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-474--V_gO5JNOqiISeFST7DBLA-1; Thu, 01 Sep 2022 12:10:45 -0400 X-MC-Unique: -V_gO5JNOqiISeFST7DBLA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D9DE85A597; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CF0B401473; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3C1B6194B97C; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D950C194B97A for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C6AF9492CA4; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3248492CA2 for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ABE48101E9BA for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-648-XvjW8UBhMQmkxWi8G89Yaw-1; Thu, 01 Sep 2022 12:10:10 -0400 X-MC-Unique: XvjW8UBhMQmkxWi8G89Yaw-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8FAB422B32; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5B8AD13A79; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MLH1FF/ZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:07 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:41 +0200 Message-Id: <20220901160952.2167-6-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Subject: [dm-devel] [PATCH 05/16] libdmmp: Makefile: create man3dir X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck Without this "make install" may fail. Signed-off-by: Martin Wilck --- libdmmp/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libdmmp/Makefile b/libdmmp/Makefile index 2e99b3e..e458925 100644 --- a/libdmmp/Makefile +++ b/libdmmp/Makefile @@ -45,6 +45,7 @@ install: $(DESTDIR)$(pkgconfdir)/$(PKGFILE) perl -i -pe 's|__INCLUDEDIR__|$(includedir)|g' \ $(DESTDIR)$(pkgconfdir)/$(PKGFILE) + $(INSTALL_PROGRAM) -d 755 $(DESTDIR)$(man3dir) $(INSTALL_PROGRAM) -m 644 -t $(DESTDIR)$(man3dir) docs/man/*.3 uninstall: From patchwork Thu Sep 1 16:09:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962860 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF07DECAAD8 for ; Thu, 1 Sep 2022 16:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048648; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=38N0ZT3jfZ9GiHJJeGuB+TEQj7v+ezgTVS0jRlbG/cQ=; b=HNkclM5xiFHEdZ7FKe3RfiBJlYFE2nzIka61naTwrK485Z8mvKiRaIELDIytmT8X7IJU4V S/1vvH3TH21+AsFB7yr0kfhShMZrY1BwdpB125FCU4fCDjrk8pl8pyYBT6guWmWjWyfAWv SyV8wFLKE0Si1vSZK5YTg88OJYbhXkc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-435-oqIH7B38NMSB4KYu_m6DrQ-1; Thu, 01 Sep 2022 12:10:45 -0400 X-MC-Unique: oqIH7B38NMSB4KYu_m6DrQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 54E483C10698; Thu, 1 Sep 2022 16:10:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 435BC2026D4C; Thu, 1 Sep 2022 16:10:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 14DFB1942685; Thu, 1 Sep 2022 16:10:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0F5561940346 for ; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E7D4C40D2831; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E404B40D2830 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CBAF0180A2FE for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-195-zwHa6P7qOlOHte1EhULVwg-1; Thu, 01 Sep 2022 12:10:10 -0400 X-MC-Unique: zwHa6P7qOlOHte1EhULVwg-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C4CB320219; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 99ABE13A79; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WF/tI1/ZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:07 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:42 +0200 Message-Id: <20220901160952.2167-7-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Subject: [dm-devel] [PATCH 06/16] tests/Makefile: use $(multipathdir) X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck .. instead of hard-coded ../libmultipath. Signed-off-by: Martin Wilck --- tests/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 9866962..e2793d5 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -48,30 +48,30 @@ mpathvalid-test_FLAGS := -I$(mpathvaliddir) # unit test file, e.g. "config-test.o", in XYZ-test_OBJDEPS # XYZ-test_LIBDEPS: Additional libs to link for this test -dmevents-test_OBJDEPS = ../libmultipath/devmapper.o +dmevents-test_OBJDEPS = $(multipathdir)/devmapper.o dmevents-test_LIBDEPS = -lpthread -ldevmapper -lurcu hwtable-test_TESTDEPS := test-lib.o -hwtable-test_OBJDEPS := ../libmultipath/discovery.o ../libmultipath/blacklist.o \ - ../libmultipath/structs.o ../libmultipath/propsel.o +hwtable-test_OBJDEPS := $(multipathdir)/discovery.o $(multipathdir)/blacklist.o \ + $(multipathdir)/structs.o $(multipathdir)/propsel.o hwtable-test_LIBDEPS := -ludev -lpthread -ldl blacklist-test_TESTDEPS := test-log.o -blacklist-test_OBJDEPS := ../libmultipath/blacklist.o +blacklist-test_OBJDEPS := $(multipathdir)/blacklist.o blacklist-test_LIBDEPS := -ludev -vpd-test_OBJDEPS := ../libmultipath/discovery.o +vpd-test_OBJDEPS := $(multipathdir)/discovery.o vpd-test_LIBDEPS := -ludev -lpthread -ldl alias-test_TESTDEPS := test-log.o alias-test_LIBDEPS := -lpthread -ldl -valid-test_OBJDEPS := ../libmultipath/valid.o ../libmultipath/discovery.o +valid-test_OBJDEPS := $(multipathdir)/valid.o $(multipathdir)/discovery.o valid-test_LIBDEPS := -ludev -lpthread -ldl devt-test_LIBDEPS := -ludev mpathvalid-test_LIBDEPS := -ludev -lpthread -ldl -mpathvalid-test_OBJDEPS := ../libmpathvalid/mpath_valid.o +mpathvalid-test_OBJDEPS := $(mpathvaliddir)/mpath_valid.o ifneq ($(DIO_TEST_DEV),) directio-test_LIBDEPS := -laio endif -strbuf-test_OBJDEPS := ../libmpathutil/strbuf.o +strbuf-test_OBJDEPS := $(mpathutildir)/strbuf.o sysfs-test_TESTDEPS := test-log.o -sysfs-test_OBJDEPS := ../libmultipath/sysfs.o ../libmpathutil/util.o +sysfs-test_OBJDEPS := $(multipathdir)/sysfs.o $(mpathutildir)/util.o sysfs-test_LIBDEPS := -ludev -lpthread -ldl %.o: %.c @@ -79,7 +79,7 @@ sysfs-test_LIBDEPS := -ludev -lpthread -ldl lib/libchecktur.so: mkdir -p lib - ln ../libmultipath/*/*.so lib + ln $(multipathdir)/*/*.so lib %.out: %-test lib/libchecktur.so @echo == running $< == From patchwork Thu Sep 1 16:09:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962857 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E6E9ECAAD8 for ; Thu, 1 Sep 2022 16:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048638; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=O8uCtdVieN/U8KPFq3g3zThy7aMFUM2lzLziucufWtk=; b=QMItCcjI0kDe1SQ8K+cFmAq49cumWZUJIXOksPl2OJu1+UFpDpmjUkqdMlT+9ZLAHnS7Do p5MBye/CqCzzUku27Sx9thRP7q4LCfhGwsYMYXwMvyGX5NL2CKP75ueixBumbAEDkfRE/X ljwpLEOH0gvNe/00M3LrNYWR9BCwNl4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-396-DAsd5Do1NgidURNb58n8YA-1; Thu, 01 Sep 2022 12:10:35 -0400 X-MC-Unique: DAsd5Do1NgidURNb58n8YA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 13CD480252B; Thu, 1 Sep 2022 16:10:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC9F3492CA4; Thu, 1 Sep 2022 16:10:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AD24D194B977; Thu, 1 Sep 2022 16:10:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 036FF1946A5E for ; Thu, 1 Sep 2022 16:10:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DB040112131E; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D70661121314 for ; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B7F761802E89 for ; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-58-YeFphzUrOsyGUxpomWlwoA-1; Thu, 01 Sep 2022 12:10:12 -0400 X-MC-Unique: YeFphzUrOsyGUxpomWlwoA-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 06ED72021E; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CC96D13A79; Thu, 1 Sep 2022 16:10:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2PJ8MF/ZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:07 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:43 +0200 Message-Id: <20220901160952.2167-8-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Subject: [dm-devel] [PATCH 07/16] tests/Makefile: add library dependencies X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck The tests need to be re-run if changes have been made to libmultipath and other libraries. Add dependencies to take care of that. Also, the libmultipath.so.0 copy under tests must be rebuilt if anything changes under libmultipath. Signed-off-by: Martin Wilck --- tests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index e2793d5..3d3b431 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -113,14 +113,14 @@ dep_clean: @sed -n 's/^.*__wrap_\([a-zA-Z0-9_]*\).*$$/-Wl,--wrap=\1/p' $< | \ sort -u | tr '\n' ' ' >$@ -libmultipath.so.0: +libmultipath.so.0: $(multipathdir)/libmultipath.so.0 make -C $(multipathdir) configdir=$(TESTDIR)/conf.d plugindir=$(TESTDIR)/lib test-lib # COLON will get expanded during second expansion below COLON:=: .SECONDEXPANSION: %-test: %.o %.o.wrap $$($$@_OBJDEPS) $$($$@_TESTDEPS) $$($$@_TESTDEPS$$(COLON).o=.o.wrap) \ - libmultipath.so.0 Makefile + libmultipath.so.0 $(mpathutildir)/libmpathutil.so.0 $(mpathcmddir)/libmpathcmd.so.0 Makefile $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $< $($@_TESTDEPS) $($@_OBJDEPS) \ $(LIBDEPS) $($@_LIBDEPS) \ $(shell cat $<.wrap) $(foreach dep,$($@_TESTDEPS),$(shell cat $(dep).wrap)) From patchwork Thu Sep 1 16:09:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962848 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E913ECAAD3 for ; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048620; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KlPjnUtp+49CKneEBL/wPdQCfTm7gVlvshILajlc3y8=; b=aaixlG0cCMphBpLK7XXEtD+2QL4KEv0Vekz0Axkj4UMCSd7X7+vV8V7yPf/qDxHYkYgsu0 JMIxByPWSd+me+9FVW4LxBhLM/nQ+U3mp+GOjvmbCY/Lec2vpm0Yh5MfPm70wWXisEQt2v tQytDHqQTi0UCgr3AkG/tblHC8lZNWg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-222-F9HcpdNyPJuYG5OC21fd_g-1; Thu, 01 Sep 2022 12:10:18 -0400 X-MC-Unique: F9HcpdNyPJuYG5OC21fd_g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 373D81802E8E; Thu, 1 Sep 2022 16:10:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26855945D0; Thu, 1 Sep 2022 16:10:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1BDDA1946A5E; Thu, 1 Sep 2022 16:10:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C49FE19426AB for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B638E2026985; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFA652026D07 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 95D30101A54E for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-588-GJYr3rWyOdG6NZaKFVO0OA-1; Thu, 01 Sep 2022 12:10:10 -0400 X-MC-Unique: GJYr3rWyOdG6NZaKFVO0OA-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 444B522A8E; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 119E413A79; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uCrUAmDZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:08 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:44 +0200 Message-Id: <20220901160952.2167-9-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Subject: [dm-devel] [PATCH 08/16] tests/Makefile: use symbolic links under tests/lib X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck Hardlinks would not update if the .so files were rebuilt. Symlinks work better for this purpose. Signed-off-by: Martin Wilck --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 3d3b431..7c42d06 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -79,7 +79,7 @@ sysfs-test_LIBDEPS := -ludev -lpthread -ldl lib/libchecktur.so: mkdir -p lib - ln $(multipathdir)/*/*.so lib + cd lib && ln -s ../$(multipathdir)/*/*.so . %.out: %-test lib/libchecktur.so @echo == running $< == From patchwork Thu Sep 1 16:09:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962855 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10323ECAAD1 for ; Thu, 1 Sep 2022 16:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048629; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=i/j8mU7fv1RWAHegEssYd57yXC7ZDRyXfP56vDN2wyQ=; b=CLDsAgqSH3ME1X/2vCN71ocDXUuh29UnWldggp3sc5nndAaeTdlrNbSIrJLkUz8AYiycRe jDiggSgUNORYqcazpIp5htwO8VjXyOUxsLZGA6lrvsxh1Qz3CFvarcjTxVHvJrvB0Gt/bP cGlK8bWprfWjBWDszFv2W0F0PaE97JU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-262-LWlY45ktOJiQaHKW74SPBg-1; Thu, 01 Sep 2022 12:10:24 -0400 X-MC-Unique: LWlY45ktOJiQaHKW74SPBg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EACD5823F01; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8C6218ECC; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BB937194B945; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C72441946A5E for ; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AB6F7403162; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7AC6492C3B for ; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8E66429324A9 for ; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-241-0Q9M8fPyNkmjEjtCJaCwEg-1; Thu, 01 Sep 2022 12:10:10 -0400 X-MC-Unique: 0Q9M8fPyNkmjEjtCJaCwEg-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8236820220; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4EAE513A79; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iJS9EWDZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:08 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:45 +0200 Message-Id: <20220901160952.2167-10-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Subject: [dm-devel] [PATCH 09/16] tests/Makefile: redirect program output into output file X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck The test program output is too verbose to read every time. Signed-off-by: Martin Wilck --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 7c42d06..109ea75 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -83,7 +83,7 @@ lib/libchecktur.so: %.out: %-test lib/libchecktur.so @echo == running $< == - @LD_LIBRARY_PATH=.:$(mpathutildir):$(mpathcmddir) ./$< >$@ + @LD_LIBRARY_PATH=.:$(mpathutildir):$(mpathcmddir) ./$< >$@ 2>&1 %.vgr: %-test lib/libchecktur.so @echo == running valgrind for $< == From patchwork Thu Sep 1 16:09:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962851 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30B72ECAAD1 for ; Thu, 1 Sep 2022 16:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048624; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hN8ylsvld8sWds11Rw+amdJUJUdmE7LHcPWBCqhIWAA=; b=R2CzSXZFeUKGlBR2FbKvn3AcYuowr5LpFN7Zf1MZnTdtgbJF4X4OVeSdNRRjKLAW0eLCS2 KMrXI0g4SDr3ANQb1cjfTVjeELqeQLkhais8gj5G+J0ua6hz0VHxSRJbjTIqMDPkFtg4ly jXpUb2a51c8Kxeq9KUHGkCf0XZ2OGIc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-179-VOvAmD6OPSK0roiR2UEuBQ-1; Thu, 01 Sep 2022 12:10:18 -0400 X-MC-Unique: VOvAmD6OPSK0roiR2UEuBQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 44960858EED; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB5CB2166B2B; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8BA41194322D; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 152C2194B940 for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E992FC15BBA; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E5D10C15BB3 for ; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D03C22932499 for ; Thu, 1 Sep 2022 16:10:12 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-372-f-BW4ut9PWy38K9CC2oBqA-1; Thu, 01 Sep 2022 12:10:11 -0400 X-MC-Unique: f-BW4ut9PWy38K9CC2oBqA-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B8AB222B36; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8D3A213A79; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OITXIGDZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:08 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:46 +0200 Message-Id: <20220901160952.2167-11-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Subject: [dm-devel] [PATCH 10/16] GitHub workflows: package shared objects in artifact X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck As we are now using symlinks under tests/lib, the .so files under checkers, prioritizers, and foreign need to be packaged, too. Signed-off-by: Martin Wilck --- .github/workflows/foreign.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/foreign.yaml b/.github/workflows/foreign.yaml index 8fc6d49..bd4e9c1 100644 --- a/.github/workflows/foreign.yaml +++ b/.github/workflows/foreign.yaml @@ -32,6 +32,8 @@ jobs: tar cfv binaries.tar Makefile* libmpathcmd/*.so* libmultipath/*.so* libmpathutil/*.so* + libmultipath/checkers/*.so libmultipath/prioritizers/*.so + libmultipath/foreign/*.so tests/lib tests/*-test tests/Makefile tests/*.so* - uses: actions/upload-artifact@v1 if: ${{ matrix.arch != '' && matrix.arch != '-i386' }} From patchwork Thu Sep 1 16:09:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962862 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 311A4ECAAD3 for ; Thu, 1 Sep 2022 16:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048671; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=97+kuMhW3f4Xwnjd12B21S9FaLrxiFn6omM8pcoxCQA=; b=VyMyxDJbcV8uMPyT7TeNmNSMPcgVvFmlrnktJeKhdQjjZ+ABvJ/tixNUsyvidgZx0e1LI8 7ZHtKh1s+xQvxNv0lv8u+rp0pS+nKi9IrmdCqaZw/4EdSVPqG4DY+J6mreGsG31rttXIeZ 79d3xZrQ6IRYCGuiJYI5Y+boxixe2GI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-270-6LjFU3nHPjSGby1z2AULDw-1; Thu, 01 Sep 2022 12:11:07 -0400 X-MC-Unique: 6LjFU3nHPjSGby1z2AULDw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D6DCE18E004D; Thu, 1 Sep 2022 16:11:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D7DD4C819; Thu, 1 Sep 2022 16:11:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3D904194322D; Thu, 1 Sep 2022 16:11:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 20FB31946A5E for ; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E99E51121320; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E55CF1121314 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AC4CE180A2E8 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-227-DZ4QyZGcMYmC9Fp6XsNAYA-1; Thu, 01 Sep 2022 12:10:11 -0400 X-MC-Unique: DZ4QyZGcMYmC9Fp6XsNAYA-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 06B5520217; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C1AAC13A79; Thu, 1 Sep 2022 16:10:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mOjJLWDZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:08 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:47 +0200 Message-Id: <20220901160952.2167-12-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Subject: [dm-devel] [PATCH 11/16] libmultipath: replace close_fd() with cleanup_fd_ptr() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck This is a nicer API without ugly casts, and less likely to close valid file descriptors accidentally. Also, it can be used for both pthread_cleanup_push and __attribute__((cleanup)). Signed-off-by: Martin Wilck --- libmpathutil/libmpathutil.version | 6 +++++- libmpathutil/util.c | 15 ++++++++++----- libmpathutil/util.h | 2 +- libmultipath/alias.c | 4 ++-- libmultipath/foreign/nvme.c | 4 ++-- libmultipath/sysfs.c | 12 ++++++------ libmultipath/wwids.c | 8 ++++---- multipath/main.c | 6 +++--- multipathd/fpin_handlers.c | 6 +++--- 9 files changed, 36 insertions(+), 27 deletions(-) diff --git a/libmpathutil/libmpathutil.version b/libmpathutil/libmpathutil.version index f81fb36..95b169d 100644 --- a/libmpathutil/libmpathutil.version +++ b/libmpathutil/libmpathutil.version @@ -39,7 +39,6 @@ global: cleanup_charp; cleanup_mutex; cleanup_ucharp; - close_fd; convert_dev; dlog; fill_strbuf; @@ -121,3 +120,8 @@ LIBMPATHUTIL_1.0 { vector_move_up; vector_sort; }; + +LIBMPATHUTIL_1.1 { +global: + cleanup_fd_ptr; +} LIBMPATHUTIL_1.0; diff --git a/libmpathutil/util.c b/libmpathutil/util.c index 6979e74..1539738 100644 --- a/libmpathutil/util.c +++ b/libmpathutil/util.c @@ -387,11 +387,6 @@ void free_scandir_result(struct scandir_result *res) free(res->di); } -void close_fd(void *arg) -{ - close((long)arg); -} - void cleanup_free_ptr(void *arg) { void **p = arg; @@ -400,6 +395,16 @@ void cleanup_free_ptr(void *arg) free(*p); } +void cleanup_fd_ptr(void *arg) +{ + int *fd = arg; + + if (*fd >= 0) { + close(*fd); + *fd = -1; + } +} + void cleanup_mutex(void *arg) { pthread_mutex_unlock(arg); diff --git a/libmpathutil/util.h b/libmpathutil/util.h index bede49d..7e34c56 100644 --- a/libmpathutil/util.h +++ b/libmpathutil/util.h @@ -46,7 +46,7 @@ int should_exit(void); #define pthread_cleanup_push_cast(f, arg) \ pthread_cleanup_push(((void (*)(void *))&f), (arg)) -void close_fd(void *arg); +void cleanup_fd_ptr(void *arg); void cleanup_free_ptr(void *arg); void cleanup_mutex(void *arg); diff --git a/libmultipath/alias.c b/libmultipath/alias.c index af3e24f..0520122 100644 --- a/libmultipath/alias.c +++ b/libmultipath/alias.c @@ -573,7 +573,7 @@ static int fix_bindings_file(const struct config *conf, const Bindings *bindings) { int rc; - long fd; + int fd = -1; char tempname[PATH_MAX]; mode_t old_umask; @@ -586,7 +586,7 @@ static int fix_bindings_file(const struct config *conf, return -1; } umask(old_umask); - pthread_cleanup_push(close_fd, (void*)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); rc = write_bindings_file(bindings, fd); pthread_cleanup_pop(1); if (rc == -1) { diff --git a/libmultipath/foreign/nvme.c b/libmultipath/foreign/nvme.c index 9a05b33..edc9bd8 100644 --- a/libmultipath/foreign/nvme.c +++ b/libmultipath/foreign/nvme.c @@ -599,7 +599,7 @@ static void test_ana_support(struct nvme_map *map, struct udev_device *ctl) { const char *dev_t; char sys_path[64]; - long fd; + int fd = -1; int rc; if (map->ana_supported != YNU_UNDEF) @@ -615,7 +615,7 @@ static void test_ana_support(struct nvme_map *map, struct udev_device *ctl) return; } - pthread_cleanup_push(close_fd, (void *)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); rc = nvme_id_ctrl_ana(fd, NULL); if (rc < 0) condlog(2, "%s: error in nvme_id_ctrl: %s", __func__, diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c index 6494638..afde849 100644 --- a/libmultipath/sysfs.c +++ b/libmultipath/sysfs.c @@ -49,7 +49,7 @@ static ssize_t __sysfs_attr_get_value(struct udev_device *dev, const char *attr_ { const char *syspath; char devpath[PATH_MAX]; - long fd; + int fd = -1; ssize_t size = -1; if (!dev || !attr_name || !value || !value_len) { @@ -74,7 +74,7 @@ static ssize_t __sysfs_attr_get_value(struct udev_device *dev, const char *attr_ __func__, devpath, strerror(errno)); return -errno; } - pthread_cleanup_push(close_fd, (void *)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); size = read(fd, value, value_len); if (size < 0) { @@ -114,7 +114,7 @@ ssize_t sysfs_attr_set_value(struct udev_device *dev, const char *attr_name, { const char *syspath; char devpath[PATH_MAX]; - long fd; + int fd = -1; ssize_t size = -1; if (!dev || !attr_name || !value || !value_len) { @@ -140,7 +140,7 @@ ssize_t sysfs_attr_set_value(struct udev_device *dev, const char *attr_name, __func__, devpath, strerror(errno)); return -errno; } - pthread_cleanup_push(close_fd, (void *)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); size = write(fd, value, value_len); if (size < 0) { @@ -272,7 +272,7 @@ bool sysfs_is_multipathed(struct path *pp, bool set_wwid) sr.n = r; pthread_cleanup_push_cast(free_scandir_result, &sr); for (i = 0; i < r && !found; i++) { - long fd; + int fd = -1; int nr; char uuid[WWID_SIZE + UUID_PREFIX_LEN]; @@ -286,7 +286,7 @@ bool sysfs_is_multipathed(struct path *pp, bool set_wwid) continue; } - pthread_cleanup_push(close_fd, (void *)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); nr = read(fd, uuid, sizeof(uuid)); if (nr > (int)UUID_PREFIX_LEN && !memcmp(uuid, UUID_PREFIX, UUID_PREFIX_LEN)) { diff --git a/libmultipath/wwids.c b/libmultipath/wwids.c index 61d9c39..89bb60c 100644 --- a/libmultipath/wwids.c +++ b/libmultipath/wwids.c @@ -90,7 +90,7 @@ int replace_wwids(vector mp) { int i, can_write; - long fd; + int fd = -1; struct multipath * mpp; size_t len; int ret = -1; @@ -103,7 +103,7 @@ replace_wwids(vector mp) if (fd < 0) goto out; - pthread_cleanup_push(close_fd, (void*)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); if (!can_write) { condlog(0, "cannot replace wwids. wwids file is read-only"); goto out_file; @@ -196,7 +196,7 @@ do_remove_wwid(int fd, char *str) { int remove_wwid(char *wwid) { - long fd; + int fd = -1; int len, can_write; char *str; int ret = -1; @@ -226,7 +226,7 @@ remove_wwid(char *wwid) { goto out; } - pthread_cleanup_push(close_fd, (void*)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); if (!can_write) { ret = -1; condlog(0, "cannot remove wwid. wwids file is read-only"); diff --git a/multipath/main.c b/multipath/main.c index 8e5154a..fbff6b7 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -321,7 +321,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo, char path[PATH_MAX]; struct timespec now, ftimes[2], tdiff; struct stat st; - long fd; + int fd = -1; int r, retries = 0; clock_gettime(CLOCK_REALTIME, &now); @@ -339,7 +339,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo, retry: fd = open(path, O_RDONLY); if (fd != -1) { - pthread_cleanup_push(close_fd, (void *)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); r = fstat(fd, &st); pthread_cleanup_pop(1); @@ -355,7 +355,7 @@ retry: return FIND_MULTIPATHS_ERROR; }; - pthread_cleanup_push(close_fd, (void *)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); /* * We just created the file. Set st_mtim to our desired * expiry time. diff --git a/multipathd/fpin_handlers.c b/multipathd/fpin_handlers.c index 0019572..a7da2c9 100644 --- a/multipathd/fpin_handlers.c +++ b/multipathd/fpin_handlers.c @@ -488,7 +488,7 @@ static void receiver_cleanup_list(__attribute__((unused)) void *arg) void *fpin_fabric_notification_receiver(__attribute__((unused))void *unused) { int ret; - long fd; + int fd = -1; uint32_t els_cmd; struct fc_nl_event *fc_event = NULL; struct sockaddr_nl fc_local; @@ -501,11 +501,11 @@ void *fpin_fabric_notification_receiver(__attribute__((unused))void *unused) pthread_cleanup_push(receiver_cleanup_list, NULL); fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_SCSITRANSPORT); if (fd < 0) { - condlog(0, "fc socket error %ld", fd); + condlog(0, "fc socket error %d", fd); return NULL; } - pthread_cleanup_push(close_fd, (void *)fd); + pthread_cleanup_push(cleanup_fd_ptr, &fd); memset(&fc_local, 0, sizeof(fc_local)); fc_local.nl_family = AF_NETLINK; fc_local.nl_groups = ~0; From patchwork Thu Sep 1 16:09:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962861 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BC16EECAAD1 for ; Thu, 1 Sep 2022 16:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048670; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Jl8kEOWPuu7JZRgGulwVMsOgy9KNkevBMt4J4PyPobw=; b=ZbuguzUwJLrky3mthRykWTFKRpE1SZQ9oOtHyahIuqJrgpupcIm7qahHYcLoBLEWAeULGM fnNXvg44VNhuwEgRpI44TNDlQynw36tDCIOQc5ZpBYIel3pVzkov0r2ulJBgyf5gmBPlAa vXMox0SW0mB0FEYiwn1IVxDt4bWbMHo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-HcELLncoOQKs0ks7mFApDw-1; Thu, 01 Sep 2022 12:11:07 -0400 X-MC-Unique: HcELLncoOQKs0ks7mFApDw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3BE1985A589; Thu, 1 Sep 2022 16:11:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 295FB945D0; Thu, 1 Sep 2022 16:11:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 058A61943214; Thu, 1 Sep 2022 16:11:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1D621194B945 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0FF37403162; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C705492C3B for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D11DB85A58F for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-452-gabTdKEYOtCMdglu6TS01g-1; Thu, 01 Sep 2022 12:10:12 -0400 X-MC-Unique: gabTdKEYOtCMdglu6TS01g-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4398B22B2B; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0FADA13A79; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4HFRAmHZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:09 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:48 +0200 Message-Id: <20220901160952.2167-13-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Subject: [dm-devel] [PATCH 12/16] libmultipath: cleanup_free_ptr(): avoid double free X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck ... by nullifying the passed pointer after freeing it. Signed-off-by: Martin Wilck --- libmpathutil/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmpathutil/util.c b/libmpathutil/util.c index 1539738..6692ac2 100644 --- a/libmpathutil/util.c +++ b/libmpathutil/util.c @@ -391,8 +391,10 @@ void cleanup_free_ptr(void *arg) { void **p = arg; - if (p && *p) + if (p && *p) { free(*p); + *p = NULL; + } } void cleanup_fd_ptr(void *arg) From patchwork Thu Sep 1 16:09:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962847 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E61B4ECAAD1 for ; Thu, 1 Sep 2022 16:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048619; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eFon/CK3BRwOcxGUkiW8WtiB72Ly9i2W5sv9jR6KKd8=; b=HPCyk/NpwNtOVUJ/F36stXk+zCtl5ObRN+4766BVD2e/hMOaYgEcJyfp8peI2jSDVesHY1 r1/nWxXK3yzA3VPDBjMy7uJK4KpeRfWhXxrVfmaZ2QYVt8NDon2+1TyyeCuHGArTRwHHcX co0gNOl+1CwCwXuKjowJavdBkKbMIpM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-582-VBq41cT2OQm20IDBP3ytsQ-1; Thu, 01 Sep 2022 12:10:18 -0400 X-MC-Unique: VBq41cT2OQm20IDBP3ytsQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 42F5A10111EA; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id F0E9B945D0; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CE9991940342; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 50D67194322D for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2ED9D4C819; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B462945D0 for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1260D80A0AE for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-227-83nMUIsdMNKrUCrg9utZmw-1; Thu, 01 Sep 2022 12:10:11 -0400 X-MC-Unique: 83nMUIsdMNKrUCrg9utZmw-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7A6FA2021F; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4C99F13A79; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uB0UEWHZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:09 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:49 +0200 Message-Id: <20220901160952.2167-14-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Subject: [dm-devel] [PATCH 13/16] multipath: find_multipaths_check_timeout(): no need for pthread cleanup X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck multipath is not a multithreaded program, no pthread-cancel complexity is necesssary here. Signed-off-by: Martin Wilck --- multipath/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/multipath/main.c b/multipath/main.c index fbff6b7..7b69a3c 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -321,7 +321,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo, char path[PATH_MAX]; struct timespec now, ftimes[2], tdiff; struct stat st; - int fd = -1; + int fd; int r, retries = 0; clock_gettime(CLOCK_REALTIME, &now); @@ -339,9 +339,8 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo, retry: fd = open(path, O_RDONLY); if (fd != -1) { - pthread_cleanup_push(cleanup_fd_ptr, &fd); r = fstat(fd, &st); - pthread_cleanup_pop(1); + close(fd); } else if (tmo > 0) { if (errno == ENOENT) @@ -355,7 +354,6 @@ retry: return FIND_MULTIPATHS_ERROR; }; - pthread_cleanup_push(cleanup_fd_ptr, &fd); /* * We just created the file. Set st_mtim to our desired * expiry time. @@ -369,7 +367,7 @@ retry: path, strerror(errno)); } r = fstat(fd, &st); - pthread_cleanup_pop(1); + close(fd); } else return FIND_MULTIPATHS_NEVER; From patchwork Thu Sep 1 16:09:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962854 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DE96ECAAD3 for ; Thu, 1 Sep 2022 16:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=c7W2uFQUVmPnsfa49Mcfpja3ra70Crahx8Ae3teGbIQ=; b=UdSmAsAUdivwC1xARi7BYPflZ0zExLAa0hYzQ9ifoSju7k5tAGT+9jVG0aw5SYcKLA3rca ddRshEunKgeMHZEB3ab/4XW8GDmnQWHXSA4aJtX5AnXSSBH+m4cG0vCRq9cJ2Tmm++uJzD DE2W/LSZLv4ON1tO8RlK6Og8Mv/0VJY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-A6Qiyru8OJ-t6-neme_-zg-1; Thu, 01 Sep 2022 12:10:24 -0400 X-MC-Unique: A6Qiyru8OJ-t6-neme_-zg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AC56185A589; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A0B42166B26; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8A4141943214; Thu, 1 Sep 2022 16:10:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9EB53194B977 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9241A2026D4C; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8DFF92026D64 for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73C428039AE for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-312-caVKIcuAMn2M3KFW-n0uOg-1; Thu, 01 Sep 2022 12:10:11 -0400 X-MC-Unique: caVKIcuAMn2M3KFW-n0uOg-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B9DD822B39; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 822BF13A79; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CM9GHmHZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:09 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:50 +0200 Message-Id: <20220901160952.2167-15-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Subject: [dm-devel] [PATCH 14/16] multipathd: fix segfault in cli_list_map_fmt() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck get_multipath_layout() must be passed an mpvec, not a pathvec. Signed-off-by: Martin Wilck --- multipathd/cli_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c index db4d441..3d39967 100644 --- a/multipathd/cli_handlers.c +++ b/multipathd/cli_handlers.c @@ -420,7 +420,7 @@ cli_list_map_fmt (void *v, struct strbuf *reply, void *data) if ((width = alloc_multipath_layout()) == NULL) return 1; - get_multipath_layout(vecs->pathvec, 1, width); + get_multipath_layout(vecs->mpvec, 1, width); param = convert_dev(param, 0); mpp = find_mp_by_str(vecs->mpvec, param); if (!mpp) From patchwork Thu Sep 1 16:09:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12963668 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC067ECAAA1 for ; Fri, 2 Sep 2022 06:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662100795; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZjOEVRyDZITB1au1QqCQs2ZGEu0tx6thwualdS6J9vo=; b=FI8dSVDjhGCwz/DMlLcOcvSOl78K3aqfBuShe1AnaQahL8ZIAWP7JHfjAeRZ8c9pyAdj4J 248pyxWfbDVGhBg2mdkK7fJChq/Rx7pxmng0R1IwmEk2ld0BDIV4356sggmxQfN3GPRgS+ 1aaWDbgxVfA5uQd/jlpVqc2kFAe2keA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-396-QK-KV2ZrN4WOXkYwfcxzGg-1; Fri, 02 Sep 2022 02:39:52 -0400 X-MC-Unique: QK-KV2ZrN4WOXkYwfcxzGg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A37233810797; Fri, 2 Sep 2022 06:39:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4525140C141D; Fri, 2 Sep 2022 06:39:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 237D819426AB; Fri, 2 Sep 2022 06:39:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D721D194B945 for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A6D9E492C3B; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2798403162 for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8AB8885A58E for ; Thu, 1 Sep 2022 16:10:13 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-73-P43ATInjNgiUbtrNh6RNyw-1; Thu, 01 Sep 2022 12:10:11 -0400 X-MC-Unique: P43ATInjNgiUbtrNh6RNyw-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EEEC422B3A; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C03C813A79; Thu, 1 Sep 2022 16:10:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KKxnLWHZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:09 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:51 +0200 Message-Id: <20220901160952.2167-16-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mailman-Approved-At: Fri, 02 Sep 2022 06:39:47 +0000 Subject: [dm-devel] [PATCH 15/16] multipathd: fix broken pthread cleanup in fpin_fabric_notification_receiver() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck We were returning from a phtread-cancel block. That should be avoided. Signed-off-by: Martin Wilck --- multipathd/fpin_handlers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/multipathd/fpin_handlers.c b/multipathd/fpin_handlers.c index a7da2c9..03b2b9a 100644 --- a/multipathd/fpin_handlers.c +++ b/multipathd/fpin_handlers.c @@ -499,13 +499,14 @@ void *fpin_fabric_notification_receiver(__attribute__((unused))void *unused) rcu_register_thread(); pthread_cleanup_push(receiver_cleanup_list, NULL); + pthread_cleanup_push(cleanup_fd_ptr, &fd); + fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_SCSITRANSPORT); if (fd < 0) { condlog(0, "fc socket error %d", fd); - return NULL; + goto out; } - pthread_cleanup_push(cleanup_fd_ptr, &fd); memset(&fc_local, 0, sizeof(fc_local)); fc_local.nl_family = AF_NETLINK; fc_local.nl_groups = ~0; From patchwork Thu Sep 1 16:09:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 12962856 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65E02ECAAD3 for ; Thu, 1 Sep 2022 16:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662048636; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uz51utgLJnr75yY4jlj53XXo/dWSJ1vENNr+YmLnxTQ=; b=ddcxHAIbBm8TTnp43H1itQsiqmzTk3ODa6OdJmPc8rMxnzbAS0cevfnA/CzJ/5co1bR4Fs BvlHlsVV+l3MFTN2+0TLuJuM30XPDTLMNGawcY9OE09Si4zDwJTxS8Klpo6i27V0ttG9P1 Y4D7WRpiV4miEBshfrfKzLTt0P1p994= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-26-i_t6MTL2MNi6b23Mj9A1mA-1; Thu, 01 Sep 2022 12:10:33 -0400 X-MC-Unique: i_t6MTL2MNi6b23Mj9A1mA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE4883C1068F; Thu, 1 Sep 2022 16:10:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCADAC15BB3; Thu, 1 Sep 2022 16:10:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C4AE21943214; Thu, 1 Sep 2022 16:10:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1B7E31940357 for ; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0CEA9492CA4; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 091CE492C3B for ; Thu, 1 Sep 2022 16:10:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E60CB101E9BE for ; Thu, 1 Sep 2022 16:10:14 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-513-ReQNths8NOKWuD5WeRn9xQ-1; Thu, 01 Sep 2022 12:10:13 -0400 X-MC-Unique: ReQNths8NOKWuD5WeRn9xQ-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 360022021A; Thu, 1 Sep 2022 16:10:10 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 075D713A79; Thu, 1 Sep 2022 16:10:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kGFUAGLZEGMPDQAAMHmgww (envelope-from ); Thu, 01 Sep 2022 16:10:10 +0000 From: mwilck@suse.com To: Christophe Varoqui , Benjamin Marzinski Date: Thu, 1 Sep 2022 18:09:52 +0200 Message-Id: <20220901160952.2167-17-mwilck@suse.com> In-Reply-To: <20220901160952.2167-1-mwilck@suse.com> References: <20220901160952.2167-1-mwilck@suse.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Subject: [dm-devel] [PATCH 16/16] multipathd: Fix command completion in interactive mode X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dm-devel@redhat.com, Martin Wilck Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Martin Wilck The command completion never worked, because the handlers array wasn't initialized in client mode. Signed-off-by: Martin Wilck --- multipathd/cli.c | 2 ++ multipathd/main.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/multipathd/cli.c b/multipathd/cli.c index d1bfeee..5d25ddb 100644 --- a/multipathd/cli.c +++ b/multipathd/cli.c @@ -14,6 +14,7 @@ #include "mpath_cmd.h" #include "cli.h" +#include "cli_handlers.h" #include "debug.h" #include "strbuf.h" @@ -451,6 +452,7 @@ cli_init (void) { if (alloc_handlers()) return 1; + init_handler_callbacks(); return 0; } diff --git a/multipathd/main.c b/multipathd/main.c index 4a65359..ba52d39 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1797,7 +1797,6 @@ uxlsnrloop (void * ap) /* Tell main thread that thread has started */ post_config_state(DAEMON_CONFIGURE); - init_handler_callbacks(); umask(077); /*