Skip to content

Commit 95b5003

Browse files
committed
throtl/004: adjust to scsi_debug
Currently, the test case throtl/004 assumes that the test target device is null_blk. When it verifies the dd command error message, it checks the string "/dev/dev_nullb" also. However, this test will fail when the test case is extended to support scsi_debug. To avoid the failure, remove dependency on the specific device name. Save the dd command error output to the FULL file, and check only the error message part in the FULL file. Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent c1a57de commit 95b5003

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

tests/throtl/004

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ test() {
2222

2323
{
2424
echo "$BASHPID" > "$CGROUP2_DIR/$THROTL_DIR/cgroup.procs"
25-
_throtl_issue_io write 10M 1
25+
_throtl_issue_io write 10M 1 &>> "$FULL"
2626
} &
2727

2828
sleep 0.6
2929
_delete_throtl_blkdev
3030
wait $!
3131

3232
_clean_up_throtl
33+
34+
grep --only-matching "Input/output error" "$FULL"
3335
echo "Test complete"
3436
}

tests/throtl/004.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
Running throtl/004
2-
dd: error writing '/dev/dev_nullb': Input/output error
3-
1
2+
Input/output error
43
Test complete

0 commit comments

Comments
 (0)