From 6c1605139f83c95051627e0bc796de90ebb502ce Mon Sep 17 00:00:00 2001 From: lixiaokeng Date: Wed, 11 Aug 2021 11:05:06 +0800 Subject: [PATCH] add make test --- ...property-blacklist-exception-builtin.patch | 26 +++++++++++++++++++ multipath-tools.spec | 12 ++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/0005-RH-Remove-the-property-blacklist-exception-builtin.patch b/0005-RH-Remove-the-property-blacklist-exception-builtin.patch index 8f6efb0..09c0087 100644 --- a/0005-RH-Remove-the-property-blacklist-exception-builtin.patch +++ b/0005-RH-Remove-the-property-blacklist-exception-builtin.patch @@ -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 diff --git a/multipath-tools.spec b/multipath-tools.spec index 217c455..0c4b234 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -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 - 0.8.4-9 +- Type:testcode +- ID:NA +- SUG:NA +- DESC:add make test + * Thu Aug 5 2021 lixiaokeng - 0.8.4-8 - Type:bugfix - ID:NA -- Gitee