add make test

(cherry picked from commit 6c1605139f83c95051627e0bc796de90ebb502ce)
This commit is contained in:
lixiaokeng 2021-08-11 11:05:06 +08:00 committed by openeuler-sync-bot
parent a97a246a30
commit 35ac723976
2 changed files with 37 additions and 1 deletions

View File

@ -84,6 +84,32 @@ index 05a5e8f..2f2d8cc 100644
.TP
.B protocol
Regular expression for the protocol of a device to be excluded/included.
diff --git a/tests/blacklist.c b/tests/blacklist.c
index 6e7c186..6413d83 100644
--- a/tests/blacklist.c
+++ b/tests/blacklist.c
@@ -269,9 +269,8 @@ static void test_property_missing(void **state)
{
static struct udev_device udev = { "sdb", { "ID_FOO", "ID_BAZ", "ID_BAR", "ID_SERIAL", NULL } };
conf.blist_property = blist_property_wwn;
- expect_condlog(3, "sdb: blacklisted, udev property missing\n");
assert_int_equal(filter_property(&conf, &udev, 3, "ID_SERIAL"),
- MATCH_PROPERTY_BLIST_MISSING);
+ MATCH_NOTHING);
assert_int_equal(filter_property(&conf, &udev, 3, "ID_BLAH"),
MATCH_NOTHING);
assert_int_equal(filter_property(&conf, &udev, 3, ""),
@@ -363,9 +362,7 @@ static void test_filter_path_missing1(void **state)
conf.blist_device = blist_device_foo_bar;
conf.blist_protocol = blist_protocol_fcp;
conf.blist_wwid = blist_wwid_xyzzy;
- expect_condlog(3, "sdb: blacklisted, udev property missing\n");
- assert_int_equal(filter_path(&conf, &miss1_pp),
- MATCH_PROPERTY_BLIST_MISSING);
+ assert_int_equal(filter_path(&conf, &miss1_pp), MATCH_NOTHING);
}
/* This one matches the property whitelist, to test the other missing
--
1.8.3.1

View File

@ -1,6 +1,6 @@
Name: multipath-tools
Version: 0.8.4
Release: 8
Release: 9
Summary: Tools to manage multipath devices with the device-mapper
License: GPL-2.0-or-later and LGPL-2.0-only
URL: http://christophe.varoqui.free.fr/
@ -34,6 +34,7 @@ Patch23: 0023-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch
Patch24: 0024-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch
Patch25: 0025-fix-boolean-value-with-json-c-0.14.patch
BuildRequires: multipath-tools, libcmocka, libcmocka-devel
BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89
BuildRequires: libselinux-devel, libsepol-devel, readline-devel, ncurses-devel, git
BuildRequires: systemd-units, systemd-devel, json-c-devel, perl-interpreter, pkgconfig
@ -112,6 +113,9 @@ make install \
install -d %{buildroot}/etc/multipath
rm -rf %{buildroot}/%{_initrddir}
%check
make test
%post
/sbin/ldconfig
@ -175,6 +179,12 @@ fi
%changelog
* Wed Aug 11 2021 lixiaokeng<lixiaokeng@huawei.com> - 0.8.4-9
- Type:testcode
- ID:NA
- SUG:NA
- DESC:add make test
* Thu Aug 5 2021 lixiaokeng<lixiaokeng@huawei.com> - 0.8.4-8
- Type:bugfix
- ID:NA