diff --git a/tests/throtl/004 b/tests/throtl/004 index 6e286123..d1461b99 100755 --- a/tests/throtl/004 +++ b/tests/throtl/004 @@ -21,16 +21,13 @@ test() { _throtl_set_limits wbps=$((1024 * 1024)) { - sleep 0.1 + echo "$BASHPID" > "$CGROUP2_DIR/$THROTL_DIR/cgroup.procs" _throtl_issue_io write 10M 1 } & - local pid=$! - echo "$pid" > "$CGROUP2_DIR/$THROTL_DIR/cgroup.procs" - sleep 0.6 echo 0 > "/sys/kernel/config/nullb/$THROTL_DEV/power" - wait "$pid" + wait $! _clean_up_throtl echo "Test complete" diff --git a/tests/throtl/005 b/tests/throtl/005 index 07782589..86e52b3a 100755 --- a/tests/throtl/005 +++ b/tests/throtl/005 @@ -20,16 +20,13 @@ test() { _throtl_set_limits wbps=$((512 * 1024)) { - sleep 0.1 + echo "$BASHPID" > "$CGROUP2_DIR/$THROTL_DIR/cgroup.procs" _throtl_issue_io write 1M 1 } & - local pid=$! - echo "$pid" > "$CGROUP2_DIR/$THROTL_DIR/cgroup.procs" - sleep 1 _throtl_set_limits wbps=$((256 * 1024)) - wait $pid + wait $! _throtl_remove_limits _clean_up_throtl diff --git a/tests/throtl/rc b/tests/throtl/rc index 330e6b93..df54cb91 100644 --- a/tests/throtl/rc +++ b/tests/throtl/rc @@ -97,18 +97,15 @@ _throtl_issue_io() { # IO and then print time elapsed to the second, blk-throttle limits should be # set before this function. _throtl_test_io() { - local pid { local rw=$1 local bs=$2 local count=$3 - sleep 0.1 + echo "$BASHPID" > "$CGROUP2_DIR/$THROTL_DIR/cgroup.procs" _throtl_issue_io "$rw" "$bs" "$count" } & - pid=$! - echo "$pid" > "$CGROUP2_DIR/$THROTL_DIR/cgroup.procs" - wait $pid + wait $! }