-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test change config while IO is throttled, regression test for: commit a880ae93e5b5 ("blk-throttle: fix io hung due to configuration updates") Signed-off-by: Yu Kuai <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
- Loading branch information
1 parent
620f019
commit 3617edd
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-3.0+ | ||
# Copyright (C) 2024 Yu Kuai | ||
# | ||
# Test change config while IO is throttled, regression test for | ||
# commit a880ae93e5b5 ("blk-throttle: fix io hung due to configuration updates") | ||
|
||
. tests/throtl/rc | ||
|
||
DESCRIPTION="change config with throttled IO" | ||
QUICK=1 | ||
|
||
test() { | ||
echo "Running ${TEST_NAME}" | ||
|
||
if ! _set_up_throtl; then | ||
return 1; | ||
fi | ||
|
||
_throtl_set_limits wbps=$((512 * 1024)) | ||
|
||
{ | ||
sleep 0.1 | ||
_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 | ||
_throtl_remove_limits | ||
|
||
_clean_up_throtl | ||
echo "Test complete" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Running throtl/005 | ||
3 | ||
Test complete |