summaryrefslogtreecommitdiff
path: root/debian/patches/0024-mdadm-test-mdadm-needn-t-make-install-on-the-system.patch
blob: 303480b64c6bd1a903abc747396f554eff181d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 38e955cbf030bc9e564bd87bc9f02f949884a83f Mon Sep 17 00:00:00 2001
From: Zhilong Liu <zlliu@suse.com>
Date: Wed, 30 May 2018 15:04:05 +0800
Subject: [PATCH 24/26] mdadm/test: mdadm needn't make install on the system

Fixes: beb71de04d31 ("mdadm/test: enable clustermd testing under clustermd_tests/")
clustermd_tests/func.sh:
remove unnecessary 'make install', just ensure 'make everything' has done.
the original idea is to make the /sbin/mdadm version same as ./mdadm, and
this breakage has pointed out by commit:
59416da78fc6 ("tests/func.sh: Fix some total breakage in the test scripts")

Signed-off-by: Zhilong Liu <zlliu@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
 clustermd_tests/func.sh | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/clustermd_tests/func.sh b/clustermd_tests/func.sh
index c2be0e59..642cc966 100644
--- a/clustermd_tests/func.sh
+++ b/clustermd_tests/func.sh
@@ -86,10 +86,13 @@ check_env()
 		echo "testing can only be done as 'root'."
 		exit 1
 	}
+	[ \! -x $mdadm ] && {
+		echo "test: please run make everything before perform testing."
+		exit 1
+	}
 	check_ssh
 	commands=(mdadm iscsiadm bc modinfo dlm_controld
 		  udevadm crm crm_mon lsblk pgrep sbd)
-	mdadm_src_ver="$($mdadm -V 2>&1)"
 	for ip in $NODE1 $NODE2
 	do
 		for cmd in ${commands[@]}
@@ -99,12 +102,6 @@ check_env()
 				exit 1
 			}
 		done
-		mdadm_sbin_ver="$(ssh $ip "mdadm -V 2>&1")"
-		if [ "$mdadm_src_ver" != "$mdadm_sbin_ver" ]
-		then
-			echo "$ip: please run 'make install' before testing."
-			exit 1
-		fi
 		mods=(raid1 raid10 md_mod dlm md-cluster)
 		for mod in ${mods[@]}
 		do
-- 
2.17.1