diff --git a/0028-Assemble-skip-devices-that-don-t-match-uuid-instead-.patch b/0028-Assemble-skip-devices-that-don-t-match-uuid-instead-.patch new file mode 100644 index 0000000000000000000000000000000000000000..6912089978c16a67dae95ecfe90c172cd82ac3f1 --- /dev/null +++ b/0028-Assemble-skip-devices-that-don-t-match-uuid-instead-.patch @@ -0,0 +1,34 @@ +From e6878148c1742b1f78a659503f5e5067501ebf73 Mon Sep 17 00:00:00 2001 +From: Sudhakar Panneerselvam +Date: Thu, 22 Jul 2021 18:28:34 +0000 +Subject: [PATCH] Assemble: skip devices that don't match uuid instead of + aborting the assembly. + +This fixes '03r0assem' test as assembly fails when looking for specific +uuid among the device list. + +Signed-off-by: Sudhakar Panneerselvam +Signed-off-by: Jes Sorensen +--- + Assemble.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Assemble.c b/Assemble.c +index f954b4db..0df46244 100644 +--- a/Assemble.c ++++ b/Assemble.c +@@ -331,6 +331,11 @@ static int select_devices(struct mddev_dev *devlist, + /* Ignore unrecognised device if looking for + * specific array */ + goto loop; ++ if (ident->uuid_set) ++ /* ignore unrecognized device if looking for ++ * specific uuid ++ */ ++ goto loop; + + pr_err("%s has no superblock - assembly aborted\n", + devname); +-- +2.27.0 + diff --git a/0029-set-to-fix-errors-of-testcases.patch b/0029-set-to-fix-errors-of-testcases.patch new file mode 100644 index 0000000000000000000000000000000000000000..d551897f69561d1ff25151ab4519866cfbcb6f69 --- /dev/null +++ b/0029-set-to-fix-errors-of-testcases.patch @@ -0,0 +1,29 @@ +From 70c46df7e6c1e21276d25f86019ec59a979ee30b Mon Sep 17 00:00:00 2001 +From: wguanghao +Date: Fri, 10 Jun 2022 16:22:18 +0800 +Subject: [PATCH] set to fix errors of testcases + +Some testcases use "$dir" to specify the program path, +but the "$dir" isn't set correctly.So some testcases +will be failed. + +Signed-off-by: Wu Guanghao +--- + test | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test b/test +index 711a3c7..c47f24c 100755 +--- a/test ++++ b/test +@@ -7,6 +7,7 @@ logdir="$targetdir" + config=/tmp/mdadm.conf + testdir=$PWD/tests + devlist= ++dir=$PWD + + savelogs=0 + exitonerror=1 +-- +2.27.0 + diff --git a/mdadm.spec b/mdadm.spec index 3ec31a5d2fea5794f26a53d429c7c9d67ce69df6..c80cedb505c344c90c488c64899b106d38382258 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,6 +1,6 @@ Name: mdadm Version: 4.1 -Release: 5 +Release: 6 Summary: The software RAID arrays user manage tools License: GPLv2+ URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ @@ -37,8 +37,10 @@ Patch24: 0024-Block-overwriting-existing-links-while-manual-assemb.patch Patch25: 0025-Detect-too-small-device-error-rather-than-underflow-.patch Patch26: 0026-mdadm-Grow-prevent-md-s-fd-from-being-occupied-durin.patch Patch27: 0027-mdadm-remove-Werror-to-fix-Werror-address-of-packed-.patch +Patch28: 0028-Assemble-skip-devices-that-don-t-match-uuid-instead-.patch +Patch29: 0029-set-to-fix-errors-of-testcases.patch -BuildRequires: systemd gcc binutils +BuildRequires: systemd gcc binutils systemd-udev Requires(post): systemd coreutils Requires(preun): systemd Requires(postun): systemd coreutils @@ -65,6 +67,13 @@ This contains man files for the using of mdadm. %check make test +for ((i=0;i<7;i++)) +do + if [ "$i" != "1" ];then + ./test "0$i" + fi +done + %install make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} SYSTEMD_DIR=%{_unitdir} install install-systemd install -Dp -m 755 misc/mdcheck %{buildroot}%{_sbindir}/mdcheck @@ -102,6 +111,9 @@ install -d -m 710 %{buildroot}/var/run/mdadm/ %{_mandir}/man*/* %changelog +* Fri Jun 10 2022 wuguanghao - 4.1-6 +- fix errors of testcases and run some testcases + * Wed Nov 4 2020 lixiaokeng - 4.1-5 - add make test