diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-05-15 12:17:39 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-05-15 12:17:39 +0100 |
commit | 8d2a04e139c44f4d157b36ccfe85a19b44da02e8 (patch) | |
tree | 2d2231aa4cd553bdaa89d9123505cd4df7373228 /debian/patches/0003-tests-func.sh-Fix-some-total-breakage-in-the-test-sc.patch | |
parent | a8860e1d7bee9524596cf3c5186219cf18d78ffe (diff) |
Import patches since rc1.
Diffstat (limited to 'debian/patches/0003-tests-func.sh-Fix-some-total-breakage-in-the-test-sc.patch')
-rw-r--r-- | debian/patches/0003-tests-func.sh-Fix-some-total-breakage-in-the-test-sc.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/debian/patches/0003-tests-func.sh-Fix-some-total-breakage-in-the-test-sc.patch b/debian/patches/0003-tests-func.sh-Fix-some-total-breakage-in-the-test-sc.patch new file mode 100644 index 00000000..320d1f07 --- /dev/null +++ b/debian/patches/0003-tests-func.sh-Fix-some-total-breakage-in-the-test-sc.patch @@ -0,0 +1,80 @@ +From 59416da78fc66084f721163b914913dc1da37b44 Mon Sep 17 00:00:00 2001 +From: Jes Sorensen <jsorensen@fb.com> +Date: Wed, 11 Apr 2018 17:01:50 -0400 +Subject: [PATCH 3/9] tests/func.sh: Fix some total breakage in the test + scripts + +We will never mandate an obsolete file system such as ext[2-4] for +running the test suite, nor should the test version of mdadm be +installed on the system for the tests to be run. + +Signed-off-by: Jes Sorensen <jsorensen@fb.com> +Fixes: 20d10b4be873ba ("mdadm/test: Refactor and revamp 'test' script") +--- + test | 2 +- + tests/func.sh | 22 +++------------------- + 2 files changed, 4 insertions(+), 20 deletions(-) + +diff --git a/test b/test +index 111a2e74..711a3c7a 100755 +--- a/test ++++ b/test +@@ -5,7 +5,7 @@ mdadm=$PWD/mdadm + targetdir="/var/tmp" + logdir="$targetdir" + config=/tmp/mdadm.conf +-testdir= ++testdir=$PWD/tests + devlist= + + savelogs=0 +diff --git a/tests/func.sh b/tests/func.sh +index a6995f1b..9710a53b 100644 +--- a/tests/func.sh ++++ b/tests/func.sh +@@ -101,8 +101,8 @@ check_env() { + echo "test: testing can only be done as 'root'." + exit 1 + } +- [ -x "raid6check" -a -x $mdadm ] || { +- echo "test: please run 'make everything' before perform testing." ++ [ \! -x $mdadm ] && { ++ echo "test: please run make everything before perform testing." + exit 1 + } + cmds=(mdadm lsblk df udevadm losetup mkfs.ext3 fsck seq) +@@ -113,23 +113,6 @@ check_env() { + exit 1 + } + done +- mdadm_src_ver="$($mdadm -V 2>&1)" +- mdadm_sbin_ver="$($(which mdadm) -V 2>&1)" +- if [ "$mdadm_src_ver" != "$mdadm_sbin_ver" ] +- then +- # it's nessesary to 'make install' mdadm to /SBIN/DIR, +- # such as systemd/mdadm-grow-continue@.service, would +- # run as an instance by systemd when reshape happens, +- # thus ensure that the correct mdadm is in testing. +- echo "test: please run 'make install' before testing." +- exit 1 +- fi +- if ! $(df -T . | grep -iq ext) +- then +- # 'external file' bitmap only supports with ext[2-4] file system +- echo "test: please run test suite with ext[2-4] file system." +- exit 1 +- fi + if $(lsblk -a | grep -iq raid) + then + # donot run mdadm -Ss directly if there are RAIDs working. +@@ -231,6 +214,7 @@ check() { + if [ $? -eq 0 ]; then + die "This command shouldn't run successfully" + fi ++ ;; + spares ) + spares=$(tr '] ' '\012\012' < /proc/mdstat | grep -c '(S)' || exit 0) + [ $spares -ne $2 ] && +-- +2.17.0 + |