tests: add path grouping policy unit tests.
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 23 Aug 2019 17:48:47 +0000 (12:48 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 1 Oct 2019 19:58:25 +0000 (21:58 +0200)
commit53956b51db829b70d5e6d50e6ecb2084a51d4e73
treee7bd17d5b08a0df72a4516f160d6cad53265012c
parentecdcbbc9d17448b6e3ae526e98543062ea9ed665
tests: add path grouping policy unit tests.

In preparation for changing the path grouping code, add some unit tests
to verify that it works correctly. The only test that currently fails
(and so it being skipped) is using MULTIBUS when mp->paths is empty. All
the other path grouping policies free mp->paths, even if it is empty.
one_group() should as well. This will be fixed when the path grouping
code is updated.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
tests/Makefile
tests/pgpolicy.c [new file with mode: 0644]