summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorXiao Ni <xni@redhat.com>2024-05-22 10:50:41 +0200
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-05-24 10:04:23 +0200
commit6e8af9475cf0ac22f7ac167040dbf92fbfdd97ab (patch)
tree8e948ca90a100ce69014925cbd368f4fc19da698 /test
parentDon't control reshape speed in daemon (diff)
downloadmdadm-6e8af9475cf0ac22f7ac167040dbf92fbfdd97ab.tar.xz
mdadm-6e8af9475cf0ac22f7ac167040dbf92fbfdd97ab.zip
mdadm/tests: test enhance
There are two changes. First, if md module is not loaded, it gives error when reading speed_limit_max. So read the value after loading md module which is done in do_setup Second, sometimes the test reports error sync action doesn't happen. But dmesg shows sync action is done. So limit the sync speed before test. It doesn't affect the test run time. Because check wait sets the max speed before waiting sync action. And recording speed_limit_max/min in do_setup. Fixes: 4c12714d1ca0 ('test: run tests on system level mdadm') Signed-off-by: Xiao Ni <xni@redhat.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest10
1 files changed, 5 insertions, 5 deletions
diff --git a/test b/test
index 338c2db4..ff403293 100755
--- a/test
+++ b/test
@@ -6,7 +6,10 @@ targetdir="/var/tmp"
logdir="$targetdir"
config=/tmp/mdadm.conf
testdir=$PWD/tests
-system_speed_limit=`cat /proc/sys/dev/raid/speed_limit_max`
+system_speed_limit_max=0
+system_speed_limit_min=0
+test_speed_limit_min=100
+test_speed_limit_max=500
devlist=
savelogs=0
@@ -39,10 +42,6 @@ ctrl_c() {
ctrl_c_error=1
}
-restore_system_speed_limit() {
- echo $system_speed_limit > /proc/sys/dev/raid/speed_limit_max
-}
-
mdadm() {
rm -f $targetdir/stderr
case $* in
@@ -103,6 +102,7 @@ do_test() {
do_clean
# source script in a subshell, so it has access to our
# namespace, but cannot change it.
+ control_system_speed_limit
echo -ne "$_script... "
if ( set -ex ; . $_script ) &> $targetdir/log
then