fixup "libmultipath: merge hwentries inside a conf file"
authorMartin Wilck <mwilck@suse.com>
Mon, 18 Jun 2018 09:54:36 +0000 (11:54 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 21 Jun 2018 07:50:06 +0000 (09:50 +0200)
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
tests/hwtable.c

index a34a43c..fc0ec8d 100644 (file)
@@ -528,9 +528,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",
index 3488640..42127ad 100644 (file)
@@ -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);