All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: dm-devel@redhat.com, Xose Vazquez Perez <xose.vazquez@gmail.com>,
	Martin Wilck <mwilck@suse.com>
Subject: [PATCH 30/30] fixup "libmultipath: merge hwentries inside a conf file"
Date: Mon, 18 Jun 2018 11:54:36 +0200	[thread overview]
Message-ID: <20180618095436.22352-2-mwilck@suse.com> (raw)
In-Reply-To: <20180618095436.22352-1-mwilck@suse.com>

The previous patch "libmultipath: merge hwentries inside a conf file"
meant to enable checking for duplicate entries not only between different
"sections" of the configuration (i.e. built-in hwtable, multipath.conf,
config dir files), but also inside every section except the built-in
table. This patch fixes a bug to actually implement this new behavior.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/config.c | 3 ---
 tests/hwtable.c       | 3 +--
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/libmultipath/config.c b/libmultipath/config.c
index 28b76dd2..50826a1d 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -527,9 +527,6 @@ factorize_hwtable (vector hw, int n, const char *table_desc)
 
 restart:
 	vector_foreach_slot(hw, hwe1, i) {
-		if (i == n)
-			break;
-		j = n;
 		/* drop invalid device configs */
 		if (i >= n && (!hwe1->vendor || !hwe1->product)) {
 			condlog(0, "device config in %s missing vendor or product parameter",
diff --git a/tests/hwtable.c b/tests/hwtable.c
index 3488640d..42127adf 100644
--- a/tests/hwtable.c
+++ b/tests/hwtable.c
@@ -661,8 +661,7 @@ static void test_broken_hwe(const struct hwt_state *hwt)
 
 	/* foo:bar doesn't match, as hwentry is ignored */
 	pp = mock_path(vnd_foo.value, prd_bar.value);
-	TEST_PROP_BROKEN("prio", prio_name(&pp->prio), prio_emc.value,
-			 DEFAULT_PRIO);
+	TEST_PROP(prio_name(&pp->prio), DEFAULT_PRIO);
 
 	/* boo:bar doesn't match */
 	pp = mock_path(vnd_boo.value, prd_bar.value);
-- 
2.17.1

  reply	other threads:[~2018-06-18  9:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 10:20 [PATCH 00/28] multipath-tools: improve config file handling Martin Wilck
2018-06-08 10:20 ` [PATCH 01/28] kpartx: no need to use FREE_CONST Martin Wilck
2018-06-08 10:20 ` [PATCH 02/28] libmultipath: fix memory leak in process_config_dir() Martin Wilck
2018-06-08 10:20 ` [PATCH 03/28] libmultipath: remove superfluous conditionals in load_config() Martin Wilck
2018-06-08 10:20 ` [PATCH 04/28] libmultipath/structs.c: constify some functions Martin Wilck
2018-06-08 10:20 ` [PATCH 05/28] libmultipath: some const usage in hwentry handling Martin Wilck
2018-06-08 10:20 ` [PATCH 06/28] libmultipath: change prototypes of hwe_regmatch() and find_hwe() Martin Wilck
2018-06-08 10:20 ` [PATCH 07/28] libmultipath/prio: constify simple getters Martin Wilck
2018-06-08 10:20 ` [PATCH 08/28] tests/Makefile: autogenerate list of symbols to be wrapped Martin Wilck
2018-06-08 10:20 ` [PATCH 09/28] tests/test-lib: cmocka helpers to simulate path and map discovery Martin Wilck
2018-06-08 10:20 ` [PATCH 10/28] tests/hwtable: tests for config file handling and hwentry merging Martin Wilck
2018-06-08 10:20 ` [PATCH 11/28] libmultipath: add debug messages to hwentry lookup/merging code Martin Wilck
2018-06-08 10:20 ` [PATCH 12/28] libmultipath: use vector for for pp->hwe and mp->hwe Martin Wilck
2018-06-08 10:20 ` [PATCH 13/28] libmultipath: allow more than one hwentry Martin Wilck
2018-06-08 10:20 ` [PATCH 14/28] libmultipath: don't merge hwentries by regex Martin Wilck
2018-06-08 10:20 ` [PATCH 15/28] libmultipath: merge hwentries inside a conf file Martin Wilck
2018-06-15 18:03   ` Benjamin Marzinski
2018-06-18  9:33     ` Martin Wilck
2018-06-18  9:54     ` [PATCH 29/30] tests/hwtable: add test for broken hwentry filtering Martin Wilck
2018-06-18  9:54       ` Martin Wilck [this message]
2018-06-08 10:20 ` [PATCH 16/28] libmultipath/hwtable: remove inherited props from ONTAP NVMe Martin Wilck
2018-06-08 10:20 ` [PATCH 17/28] libmultipath: don't merge by regex in setup_default_blist() Martin Wilck
2018-06-08 10:20 ` [PATCH 18/28] multipath, multipathd: consolidate config dumping Martin Wilck
2018-06-08 10:20 ` [PATCH 19/28] tests/hwtable: implement configuration dump + reload test Martin Wilck
2018-06-08 10:20 ` [PATCH 20/28] libmultipath: allow dumping only "local" hwtable in snprint_config Martin Wilck
2018-06-08 10:20 ` [PATCH 21/28] tests/hwtable: add test for local configuration dump Martin Wilck
2018-06-08 10:20 ` [PATCH 22/28] libmultipath: allow printing local maps in snprint_config Martin Wilck
2018-06-08 10:20 ` [PATCH 23/28] multipathd: implement "show config local" Martin Wilck
2018-06-08 10:20 ` [PATCH 24/28] multipath: implement "multipath -T" Martin Wilck
2018-06-08 10:20 ` [PATCH 25/28] libmultipath: merge "multipath" config sections by wwid Martin Wilck
2018-06-08 10:20 ` [PATCH 26/28] libmultipath: implement and use blacklist merging Martin Wilck
2018-06-08 10:20 ` [PATCH 27/28] libmultipath: escape '"' chars while dumping config Martin Wilck
2018-06-08 10:20 ` [PATCH 28/28] multipath.conf(5): various corrections and clarifications Martin Wilck
2018-06-18 21:20 ` [PATCH 00/28] multipath-tools: improve config file handling Benjamin Marzinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180618095436.22352-2-mwilck@suse.com \
    --to=mwilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=xose.vazquez@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.